from bisect import bisect_left
N=int(input())
xy=[list(map(int,input().split())) for i in range(N)]
xy.sort()
inf=float("inf")
ans=inf
for i in range(N-1):
    for j in range(i+1,N):
        p=xy[j][0]-xy[i][0]
        q=xy[j][1]-xy[i][1]
        flag=[0]*N
        cnt=0
        for k in range(N):
            if flag[k]==0:
                flag[k]=1
                cnt+=1
                nx,ny=xy[k][0]+p,xy[k][1]+q
                b=bisect_left(xy,[nx,ny])
                while b<N and xy[b]==[nx,ny]:
                    flag[b]=1
                    nx,ny=nx+p,ny+q
                    b=bisect_left(xy,[nx,ny])
        ans=min(ans,cnt)
if N==1:
    print(1)
else:
    print(ans) from bisect import bisect_left N=int(input()) N int(input()) int input() input list(map(int,input().split())) for i in range(N) for i in range(N) i range(N) range N for i in range(N) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split xy=[list(map(int,input().split())) for i in range(N)] xy [list(map(int,input().split())) for i in range(N)] xy.sort() xy.sort xy sort inf=float("inf") inf float("inf") float "inf" ans=inf ans inf for i in range(N-1):
    for j in range(i+1,N):
        p=xy[j][0]-xy[i][0]
        q=xy[j][1]-xy[i][1]
        flag=[0]*N
        cnt=0
        for k in range(N):
            if flag[k]==0:
                flag[k]=1
                cnt+=1
                nx,ny=xy[k][0]+p,xy[k][1]+q
                b=bisect_left(xy,[nx,ny])
                while b<N and xy[b]==[nx,ny]:
                    flag[b]=1
                    nx,ny=nx+p,ny+q
                    b=bisect_left(xy,[nx,ny])
        ans=min(ans,cnt) i range(N-1) range N-1 N 1 for j in range(i+1,N):
        p=xy[j][0]-xy[i][0]
        q=xy[j][1]-xy[i][1]
        flag=[0]*N
        cnt=0
        for k in range(N):
            if flag[k]==0:
                flag[k]=1
                cnt+=1
                nx,ny=xy[k][0]+p,xy[k][1]+q
                b=bisect_left(xy,[nx,ny])
                while b<N and xy[b]==[nx,ny]:
                    flag[b]=1
                    nx,ny=nx+p,ny+q
                    b=bisect_left(xy,[nx,ny])
        ans=min(ans,cnt) j range(i+1,N) range i+1 i 1 N p=xy[j][0]-xy[i][0] p xy[j][0]-xy[i][0] xy[j][0] [j] xy j 0 xy[i][0] [i] xy i 0 q=xy[j][1]-xy[i][1] q xy[j][1]-xy[i][1] xy[j][1] [j] xy j 1 xy[i][1] [i] xy i 1 flag=[0]*N flag [0]*N [0] 0 N cnt=0 cnt 0 for k in range(N):
            if flag[k]==0:
                flag[k]=1
                cnt+=1
                nx,ny=xy[k][0]+p,xy[k][1]+q
                b=bisect_left(xy,[nx,ny])
                while b<N and xy[b]==[nx,ny]:
                    flag[b]=1
                    nx,ny=nx+p,ny+q
                    b=bisect_left(xy,[nx,ny])
         k range(N) range N if flag[k]==0:
                flag[k]=1
                cnt+=1
                nx,ny=xy[k][0]+p,xy[k][1]+q
                b=bisect_left(xy,[nx,ny])
                while b<N and xy[b]==[nx,ny]:
                    flag[b]=1
                    nx,ny=nx+p,ny+q
                    b=bisect_left(xy,[nx,ny])
         flag[k]==0 flag[k] flag k 0 flag[k]=1 flag[k] flag k 1 cnt+=1 cnt 1 nx,ny=xy[k][0]+p,xy[k][1]+q nx xy[k][0]+p xy[k][0] [k] xy k 0 p ny xy[k][1]+q xy[k][1] [k] xy k 1 q b=bisect_left(xy,[nx,ny]) b bisect_left(xy,[nx,ny]) bisect_left xy [nx,ny] nx ny while b<N and xy[b]==[nx,ny]:
                    flag[b]=1
                    nx,ny=nx+p,ny+q
                    b=bisect_left(xy,[nx,ny])
         b<N and xy[b]==[nx,ny] b<N b N xy[b]==[nx,ny] xy[b] xy b [nx,ny] nx ny flag[b]=1 flag[b] flag b 1 nx,ny=nx+p,ny+q nx nx+p nx p ny ny+q ny q b=bisect_left(xy,[nx,ny]) b bisect_left(xy,[nx,ny]) bisect_left xy [nx,ny] nx ny ans=min(ans,cnt) ans min(ans,cnt) min ans cnt if N==1:
    print(1)
else:
    print(ans) N==1 N 1 print(1) print 1 print(ans) print ans inf=float("inf") float("inf") inf q=xy[j][1]-xy[i][1] xy[j][1]-xy[i][1] q nx,ny=nx+p,ny+q nx+p nx ny=nx+p,ny+q ny+q ny ny=xy[k][0]+p,xy[k][1]+q xy[k][1]+q ny p=xy[j][0]-xy[i][0] xy[j][0]-xy[i][0] p ans=inf inf ans N=int(input()) int(input()) N cnt=0 0 cnt nx,ny=xy[k][0]+p,xy[k][1]+q xy[k][0]+p nx ans=min(ans,cnt) min(ans,cnt) ans xy=[list(map(int,input().split())) for i in range(N)] [list(map(int,input().split())) for i in range(N)] xy b=bisect_left(xy,[nx,ny]) bisect_left(xy,[nx,ny]) b b=bisect_left(xy,[nx,ny]) bisect_left(xy,[nx,ny]) b cnt+=1 1 cnt flag=[0]*N [0]*N flag
from bisect import bisect_left
N=int(input())
xy=[list(map(int,input().split())) for i in range(N)]
xy.sort()
inf=float("inf")
ans=inf
for i in range(N-1):
    for j in range(i+1,N):
        p=xy[j][0]-xy[i][0]
        q=xy[j][1]-xy[i][1]
        flag=[0]*N
        cnt=0
        for k in range(N):
            if flag[k]==0:
                flag[k]=1
                cnt+=1
                nx,ny=xy[k][0]+p,xy[k][1]+q
                b=bisect_left(xy,[nx,ny])
                while b<N and xy[b]==[nx,ny]:
                    flag[b]=1
                    nx,ny=nx+p,ny+q
                    b=bisect_left(xy,[nx,ny])
        ans=min(ans,cnt)
if N==1:
    print(1)
else:
    print(ans)