#include #include #include #include #include using namespace std; int n,ans; struct Data { int x,y; Data(){} Data(int x,int y):x(x),y(y) {} Data operator - (Data p) { return Data(x-p.x,y-p.y); } }bone[10],loc[100]; bool isv(Data b1,Data b2) { int ans=b1.x*b2.x+b1.y*b2.y; if(ans==0) return true; return false; } int dist(Data b) { int sum=b.x*b.x+b.y*b.y; return sum; } bool issame(Data b1,Data b2) { if(dist(b1)==dist(b2)) return true; return false; } bool solve() { int num=0,a[4]={0,1,2,3}; do { num=0; for(int i=0;i<4;i++) { Data b1=bone[a[i]]-bone[a[(i+1)%4]]; Data b2=bone[a[(i+1)%4]]-bone[a[(i+2)%4]]; if(isv(b1,b2)&&issame(b1,b2)) num++; else continue; } if(num==4) return true; } while(next_permutation(a,a+4)); return false; } int main() { while(~scanf("%d",&n)) { for(int i=0;i