import sys
def input(): return sys.stdin.readline().rstrip()
from itertools import combinations
from collections import Counter
def main():
    n=int(input())
    if n==1:
        print(1)
        sys.exit()
    XY=[tuple(map(int,input().split())) for i in range(n)]
    XY.sort()
    PQ=[]
    for i in range(n-1):
        x1=XY[i]
        for j in range(i+1,n):
            x2=XY[j]
            PQ.append((x2[0]-x1[0],x2[1]-x1[1]))
    print(n-Counter(PQ).most_common(1)[0][1])

if __name__=='__main__':
    main() import sys sys def input(): return sys.stdin.readline().rstrip() input from itertools import combinations from collections import Counter def main():
    n=int(input())
    if n==1:
        print(1)
        sys.exit()
    XY=[tuple(map(int,input().split())) for i in range(n)]
    XY.sort()
    PQ=[]
    for i in range(n-1):
        x1=XY[i]
        for j in range(i+1,n):
            x2=XY[j]
            PQ.append((x2[0]-x1[0],x2[1]-x1[1]))
    print(n-Counter(PQ).most_common(1)[0][1]) main n=int(input()) n int(input()) int input() input if n==1:
        print(1)
        sys.exit()
     n==1 n 1 print(1) print 1 sys.exit() sys.exit sys exit tuple(map(int,input().split())) for i in range(n) for i in range(n) i range(n) range n for i in range(n) tuple(map(int,input().split())) tuple map(int,input().split()) map int input().split() ().split () input split XY=[tuple(map(int,input().split())) for i in range(n)] XY [tuple(map(int,input().split())) for i in range(n)] XY.sort() XY.sort XY sort PQ=[] PQ [] for i in range(n-1):
        x1=XY[i]
        for j in range(i+1,n):
            x2=XY[j]
            PQ.append((x2[0]-x1[0],x2[1]-x1[1]))
     i range(n-1) range n-1 n 1 x1=XY[i] x1 XY[i] XY i for j in range(i+1,n):
            x2=XY[j]
            PQ.append((x2[0]-x1[0],x2[1]-x1[1]))
     j range(i+1,n) range i+1 i 1 n x2=XY[j] x2 XY[j] XY j PQ.append((x2[0]-x1[0],x2[1]-x1[1])) PQ.append PQ append (x2[0]-x1[0],x2[1]-x1[1]) x2[0]-x1[0] x2[0] x2 0 x1[0] x1 0 x2[1]-x1[1] x2[1] x2 1 x1[1] x1 1 print(n-Counter(PQ).most_common(1)[0][1]) print n-Counter(PQ).most_common(1)[0][1] n Counter(PQ).most_common(1)[0][1] [0] (PQ).most_common(1) (PQ).most_common (PQ) Counter PQ most_common 1 0 1 if __name__=='__main__':
    main() __name__=='__main__' __name__ '__main__' main() main def main():
    n=int(input())
    if n==1:
        print(1)
        sys.exit()
    XY=[tuple(map(int,input().split())) for i in range(n)]
    XY.sort()
    PQ=[]
    for i in range(n-1):
        x1=XY[i]
        for j in range(i+1,n):
            x2=XY[j]
            PQ.append((x2[0]-x1[0],x2[1]-x1[1]))
    print(n-Counter(PQ).most_common(1)[0][1]) def main():
    n=int(input())
    if n==1:
        print(1)
        sys.exit()
    XY=[tuple(map(int,input().split())) for i in range(n)]
    XY.sort()
    PQ=[]
    for i in range(n-1):
        x1=XY[i]
        for j in range(i+1,n):
            x2=XY[j]
            PQ.append((x2[0]-x1[0],x2[1]-x1[1]))
    print(n-Counter(PQ).most_common(1)[0][1]) main def input(): return sys.stdin.readline().rstrip() def input(): return sys.stdin.readline().rstrip() input
import sys
def input(): return sys.stdin.readline().rstrip()
from itertools import combinations
from collections import Counter
def main():
    n=int(input())
    if n==1:
        print(1)
        sys.exit()
    XY=[tuple(map(int,input().split())) for i in range(n)]
    XY.sort()
    PQ=[]
    for i in range(n-1):
        x1=XY[i]
        for j in range(i+1,n):
            x2=XY[j]
            PQ.append((x2[0]-x1[0],x2[1]-x1[1]))
    print(n-Counter(PQ).most_common(1)[0][1])

if __name__=='__main__':
    main()