n=int(input())
if n==1:
    print(1)
    exit()
x=[]
for i in range(n):
    a,b=map(int,input().split())
    x.append([a,b])
x.sort()
ans=float("inf")
for i in range(n-1):
    for j in range(i+1,n):
        p,q=x[j][0]-x[i][0],x[j][1]-x[i][1]
        cnt=0
        flg=[False for i in range(n)]
        for k in range(n):
            if flg[k]==False:
                flg[k]=True
                cnt+=1
                fl=True
                xx,yy=x[k][0],x[k][1]
                while fl:
                    nx,ny=xx+p,yy+q
                    if [nx,ny] in x:
                        a=x.index([nx,ny])
                        flg[a]=True
                        xx,yy=nx,ny
                    else:
                        fl=False
        if cnt<ans:
            ans=cnt
print(ans) n=int(input()) n int(input()) int input() input if n==1:
    print(1)
    exit() n==1 n 1 print(1) print 1 exit() exit x=[] x [] for i in range(n):
    a,b=map(int,input().split())
    x.append([a,b]) i range(n) range n a,b=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b x.append([a,b]) x.append x append [a,b] a b x.sort() x.sort x sort ans=float("inf") ans float("inf") float "inf" for i in range(n-1):
    for j in range(i+1,n):
        p,q=x[j][0]-x[i][0],x[j][1]-x[i][1]
        cnt=0
        flg=[False for i in range(n)]
        for k in range(n):
            if flg[k]==False:
                flg[k]=True
                cnt+=1
                fl=True
                xx,yy=x[k][0],x[k][1]
                while fl:
                    nx,ny=xx+p,yy+q
                    if [nx,ny] in x:
                        a=x.index([nx,ny])
                        flg[a]=True
                        xx,yy=nx,ny
                    else:
                        fl=False
        if cnt<ans:
            ans=cnt i range(n-1) range n-1 n 1 for j in range(i+1,n):
        p,q=x[j][0]-x[i][0],x[j][1]-x[i][1]
        cnt=0
        flg=[False for i in range(n)]
        for k in range(n):
            if flg[k]==False:
                flg[k]=True
                cnt+=1
                fl=True
                xx,yy=x[k][0],x[k][1]
                while fl:
                    nx,ny=xx+p,yy+q
                    if [nx,ny] in x:
                        a=x.index([nx,ny])
                        flg[a]=True
                        xx,yy=nx,ny
                    else:
                        fl=False
        if cnt<ans:
            ans=cnt j range(i+1,n) range i+1 i 1 n p,q=x[j][0]-x[i][0],x[j][1]-x[i][1] p x[j][0]-x[i][0] x[j][0] [j] x j 0 x[i][0] [i] x i 0 q x[j][1]-x[i][1] x[j][1] [j] x j 1 x[i][1] [i] x i 1 cnt=0 cnt 0 False for i in range(n) for i in range(n) i range(n) range n for i in range(n) False flg=[False for i in range(n)] flg [False for i in range(n)] for k in range(n):
            if flg[k]==False:
                flg[k]=True
                cnt+=1
                fl=True
                xx,yy=x[k][0],x[k][1]
                while fl:
                    nx,ny=xx+p,yy+q
                    if [nx,ny] in x:
                        a=x.index([nx,ny])
                        flg[a]=True
                        xx,yy=nx,ny
                    else:
                        fl=False
         k range(n) range n if flg[k]==False:
                flg[k]=True
                cnt+=1
                fl=True
                xx,yy=x[k][0],x[k][1]
                while fl:
                    nx,ny=xx+p,yy+q
                    if [nx,ny] in x:
                        a=x.index([nx,ny])
                        flg[a]=True
                        xx,yy=nx,ny
                    else:
                        fl=False
         flg[k]==False flg[k] flg k False flg[k]=True flg[k] flg k True cnt+=1 cnt 1 fl=True fl True xx,yy=x[k][0],x[k][1] xx x[k][0] [k] x k 0 yy x[k][1] [k] x k 1 while fl:
                    nx,ny=xx+p,yy+q
                    if [nx,ny] in x:
                        a=x.index([nx,ny])
                        flg[a]=True
                        xx,yy=nx,ny
                    else:
                        fl=False
         fl nx,ny=xx+p,yy+q nx xx+p xx p ny yy+q yy q if [nx,ny] in x:
                        a=x.index([nx,ny])
                        flg[a]=True
                        xx,yy=nx,ny
                    else:
                        fl=False
         [nx,ny] in x [nx,ny] nx ny x a=x.index([nx,ny]) a x.index([nx,ny]) x.index x index [nx,ny] nx ny flg[a]=True flg[a] flg a True xx,yy=nx,ny xx nx yy ny fl=False fl False if cnt<ans:
            ans=cnt cnt<ans cnt ans ans=cnt ans cnt print(ans) print ans b=map(int,input().split()) map(int,input().split()) b flg=[False for i in range(n)] [False for i in range(n)] flg ny=xx+p,yy+q yy+q ny ans=float("inf") float("inf") ans a=x.index([nx,ny]) x.index([nx,ny]) a yy=x[k][0],x[k][1] x[k][1] yy n=int(input()) int(input()) n xx,yy=nx,ny nx xx q=x[j][0]-x[i][0],x[j][1]-x[i][1] x[j][1]-x[i][1] q nx,ny=xx+p,yy+q xx+p nx a,b=map(int,input().split()) map(int,input().split()) a x=[] [] x fl=True True fl yy=nx,ny ny yy ans=cnt cnt ans p,q=x[j][0]-x[i][0],x[j][1]-x[i][1] x[j][0]-x[i][0] p fl=False False fl cnt=0 0 cnt cnt+=1 1 cnt xx,yy=x[k][0],x[k][1] x[k][0] xx
n=int(input())
if n==1:
    print(1)
    exit()
x=[]
for i in range(n):
    a,b=map(int,input().split())
    x.append([a,b])
x.sort()
ans=float("inf")
for i in range(n-1):
    for j in range(i+1,n):
        p,q=x[j][0]-x[i][0],x[j][1]-x[i][1]
        cnt=0
        flg=[False for i in range(n)]
        for k in range(n):
            if flg[k]==False:
                flg[k]=True
                cnt+=1
                fl=True
                xx,yy=x[k][0],x[k][1]
                while fl:
                    nx,ny=xx+p,yy+q
                    if [nx,ny] in x:
                        a=x.index([nx,ny])
                        flg[a]=True
                        xx,yy=nx,ny
                    else:
                        fl=False
        if cnt<ans:
            ans=cnt
print(ans)