import collections
n=int(input())
xy=[list(map(int,input().split())) for _ in range(n)]
xy.sort()
count={}
ans=0
for i in range(n):
    for j in range(i+1,n):
   #     print(i,j)
        x=xy[i][0]-xy[j][0]
        y=xy[i][1]-xy[j][1]
        if (x,y) in count:
            count[x,y]+=1
        else:
            count[x,y]=1
#print(count)
for v in count.values():
    ans=max(ans,v)
print(n-ans) import collections collections 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 xy=[list(map(int,input().split())) for _ in range(n)] xy [list(map(int,input().split())) for _ in range(n)] xy.sort() xy.sort xy sort count={} count {} ans=0 ans 0 for i in range(n):
    for j in range(i+1,n):
   #     print(i,j)
        x=xy[i][0]-xy[j][0]
        y=xy[i][1]-xy[j][1]
        if (x,y) in count:
            count[x,y]+=1
        else:
            count[x,y]=1
#print(count) i range(n) range n for j in range(i+1,n):
   #     print(i,j)
        x=xy[i][0]-xy[j][0]
        y=xy[i][1]-xy[j][1]
        if (x,y) in count:
            count[x,y]+=1
        else:
            count[x,y]=1
#print(count) j range(i+1,n) range i+1 i 1 n x=xy[i][0]-xy[j][0] x xy[i][0]-xy[j][0] xy[i][0] [i] xy i 0 xy[j][0] [j] xy j 0 y=xy[i][1]-xy[j][1] y xy[i][1]-xy[j][1] xy[i][1] [i] xy i 1 xy[j][1] [j] xy j 1 if (x,y) in count:
            count[x,y]+=1
        else:
            count[x,y]=1
#print(count) (x,y) in count (x,y) x y count count[x,y]+=1 count[x,y] count x 1 count[x,y]=1 count[x,y] count x 1 for v in count.values():
    ans=max(ans,v) v count.values() count.values count values ans=max(ans,v) ans max(ans,v) max ans v print(n-ans) print n-ans n ans x=xy[i][0]-xy[j][0] xy[i][0]-xy[j][0] x n=int(input()) int(input()) n xy=[list(map(int,input().split())) for _ in range(n)] [list(map(int,input().split())) for _ in range(n)] xy ans=0 0 ans count={} {} count y=xy[i][1]-xy[j][1] xy[i][1]-xy[j][1] y ans=max(ans,v) max(ans,v) ans
import collections
n=int(input())
xy=[list(map(int,input().split())) for _ in range(n)]
xy.sort()
count={}
ans=0
for i in range(n):
    for j in range(i+1,n):
   #     print(i,j)
        x=xy[i][0]-xy[j][0]
        y=xy[i][1]-xy[j][1]
        if (x,y) in count:
            count[x,y]+=1
        else:
            count[x,y]=1
#print(count)
for v in count.values():
    ans=max(ans,v)
print(n-ans)