from collections import deque
N=int(input())
point=[list(map(int,input().split())) for _ in range(N)]
ans=float("inf")
for i in range(N):
    for j in range(i+1,N):
        x1,y1=point[i]
        x2,y2=point[j]
        vec=[x1-x2,y1-y2]
        tree=[[] for _ in range(N)]
        col=[-1]*N
        for k in range(N):
            for l in range(k+1,N):
                xa, ya = point[k]
                xb, yb = point[l]
                if ((vec[0]==xa-xb)and(vec[1]==ya-yb))or((-vec[0]==xa-xb)and(-vec[1]==ya-yb)):
                    tree[k-1].append(l-1)
                    tree[l-1].append(k-1)
        for k in range(N):
            d=deque()
            if col[k]==-1:
                d.append(k)
            while len(d)>0:
                v=d.popleft()
                col[v]=k
                for l in tree[v]:
                    if col[l]==-1:
                        d.append(l)
        #print(col)
        #print(set(col))
        ans=min(ans,len(set(col)))
if N==1:
    print(1)
else:
    print(ans) from collections import deque N=int(input()) N int(input()) int input() input list(map(int,input().split())) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split point=[list(map(int,input().split())) for _ in range(N)] point [list(map(int,input().split())) for _ in range(N)] ans=float("inf") ans float("inf") float "inf" for i in range(N):
    for j in range(i+1,N):
        x1,y1=point[i]
        x2,y2=point[j]
        vec=[x1-x2,y1-y2]
        tree=[[] for _ in range(N)]
        col=[-1]*N
        for k in range(N):
            for l in range(k+1,N):
                xa, ya = point[k]
                xb, yb = point[l]
                if ((vec[0]==xa-xb)and(vec[1]==ya-yb))or((-vec[0]==xa-xb)and(-vec[1]==ya-yb)):
                    tree[k-1].append(l-1)
                    tree[l-1].append(k-1)
        for k in range(N):
            d=deque()
            if col[k]==-1:
                d.append(k)
            while len(d)>0:
                v=d.popleft()
                col[v]=k
                for l in tree[v]:
                    if col[l]==-1:
                        d.append(l)
        #print(col)
        #print(set(col))
        ans=min(ans,len(set(col))) i range(N) range N for j in range(i+1,N):
        x1,y1=point[i]
        x2,y2=point[j]
        vec=[x1-x2,y1-y2]
        tree=[[] for _ in range(N)]
        col=[-1]*N
        for k in range(N):
            for l in range(k+1,N):
                xa, ya = point[k]
                xb, yb = point[l]
                if ((vec[0]==xa-xb)and(vec[1]==ya-yb))or((-vec[0]==xa-xb)and(-vec[1]==ya-yb)):
                    tree[k-1].append(l-1)
                    tree[l-1].append(k-1)
        for k in range(N):
            d=deque()
            if col[k]==-1:
                d.append(k)
            while len(d)>0:
                v=d.popleft()
                col[v]=k
                for l in tree[v]:
                    if col[l]==-1:
                        d.append(l)
        #print(col)
        #print(set(col))
        ans=min(ans,len(set(col))) j range(i+1,N) range i+1 i 1 N x1,y1=point[i] x1 point[i] point i y1 x2,y2=point[j] x2 point[j] point j y2 vec=[x1-x2,y1-y2] vec [x1-x2,y1-y2] x1-x2 x1 x2 y1-y2 y1 y2 [] for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) [] tree=[[] for _ in range(N)] tree [[] for _ in range(N)] col=[-1]*N col [-1]*N [-1] -1 N for k in range(N):
            for l in range(k+1,N):
                xa, ya = point[k]
                xb, yb = point[l]
                if ((vec[0]==xa-xb)and(vec[1]==ya-yb))or((-vec[0]==xa-xb)and(-vec[1]==ya-yb)):
                    tree[k-1].append(l-1)
                    tree[l-1].append(k-1)
         k range(N) range N for l in range(k+1,N):
                xa, ya = point[k]
                xb, yb = point[l]
                if ((vec[0]==xa-xb)and(vec[1]==ya-yb))or((-vec[0]==xa-xb)and(-vec[1]==ya-yb)):
                    tree[k-1].append(l-1)
                    tree[l-1].append(k-1)
         l range(k+1,N) range k+1 k 1 N xa, ya = point[k] xa point[k] point k ya xb, yb = point[l] xb point[l] point l yb if ((vec[0]==xa-xb)and(vec[1]==ya-yb))or((-vec[0]==xa-xb)and(-vec[1]==ya-yb)):
                    tree[k-1].append(l-1)
                    tree[l-1].append(k-1)
         ((vec[0]==xa-xb)and(vec[1]==ya-yb))or((-vec[0]==xa-xb)and(-vec[1]==ya-yb)) (vec[0]==xa-xb)and(vec[1]==ya-yb) vec[0]==xa-xb vec[0] vec 0 xa-xb xa xb vec[1]==ya-yb vec[1] vec 1 ya-yb ya yb (-vec[0]==xa-xb)and(-vec[1]==ya-yb) -vec[0]==xa-xb -vec[0] vec[0] vec 0 xa-xb xa xb -vec[1]==ya-yb -vec[1] vec[1] vec 1 ya-yb ya yb tree[k-1].append(l-1) [k-1].append [k-1] tree k-1 k 1 append l-1 l 1 tree[l-1].append(k-1) [l-1].append [l-1] tree l-1 l 1 append k-1 k 1 for k in range(N):
            d=deque()
            if col[k]==-1:
                d.append(k)
            while len(d)>0:
                v=d.popleft()
                col[v]=k
                for l in tree[v]:
                    if col[l]==-1:
                        d.append(l)
        #print(col)
        #print(set(col))
         k range(N) range N d=deque() d deque() deque if col[k]==-1:
                d.append(k)
             col[k]==-1 col[k] col k -1 d.append(k) d.append d append k while len(d)>0:
                v=d.popleft()
                col[v]=k
                for l in tree[v]:
                    if col[l]==-1:
                        d.append(l)
        #print(col)
        #print(set(col))
         len(d)>0 len(d) len d 0 v=d.popleft() v d.popleft() d.popleft d popleft col[v]=k col[v] col v k for l in tree[v]:
                    if col[l]==-1:
                        d.append(l)
        #print(col)
        #print(set(col))
         l tree[v] tree v if col[l]==-1:
                        d.append(l)
        #print(col)
        #print(set(col))
         col[l]==-1 col[l] col l -1 d.append(l) d.append d append l ans=min(ans,len(set(col))) ans min(ans,len(set(col))) min ans len(set(col)) len set(col) set col if N==1:
    print(1)
else:
    print(ans) N==1 N 1 print(1) print 1 print(ans) print ans tree=[[] for _ in range(N)] [[] for _ in range(N)] tree d=deque() deque() d yb = point[l] point[l] yb x2,y2=point[j] point[j] x2 ans=min(ans,len(set(col))) min(ans,len(set(col))) ans vec=[x1-x2,y1-y2] [x1-x2,y1-y2] vec v=d.popleft() d.popleft() v x1,y1=point[i] point[i] x1 ans=float("inf") float("inf") ans point=[list(map(int,input().split())) for _ in range(N)] [list(map(int,input().split())) for _ in range(N)] point xa, ya = point[k] point[k] xa y2=point[j] point[j] y2 col=[-1]*N [-1]*N col ya = point[k] point[k] ya N=int(input()) int(input()) N y1=point[i] point[i] y1 xb, yb = point[l] point[l] xb
from collections import deque
N=int(input())
point=[list(map(int,input().split())) for _ in range(N)]
ans=float("inf")
for i in range(N):
    for j in range(i+1,N):
        x1,y1=point[i]
        x2,y2=point[j]
        vec=[x1-x2,y1-y2]
        tree=[[] for _ in range(N)]
        col=[-1]*N
        for k in range(N):
            for l in range(k+1,N):
                xa, ya = point[k]
                xb, yb = point[l]
                if ((vec[0]==xa-xb)and(vec[1]==ya-yb))or((-vec[0]==xa-xb)and(-vec[1]==ya-yb)):
                    tree[k-1].append(l-1)
                    tree[l-1].append(k-1)
        for k in range(N):
            d=deque()
            if col[k]==-1:
                d.append(k)
            while len(d)>0:
                v=d.popleft()
                col[v]=k
                for l in tree[v]:
                    if col[l]==-1:
                        d.append(l)
        #print(col)
        #print(set(col))
        ans=min(ans,len(set(col)))
if N==1:
    print(1)
else:
    print(ans)