import sys,math,collections,itertools
input = sys.stdin.readline

N=int(input())
xy = []

if N == 1:
    print(1)
    exit()

for _ in range(N):
    xy.append(list(map(int,input().split())))

rxy = []
for i in range(N):
    for j in range(N):
        if i==j:
            continue
        rxy.append((xy[i][0]-xy[j][0],xy[i][1]-xy[j][1]))
cr = collections.Counter(rxy)
print(N-max(cr.values()))
 import sys,math,collections,itertools sys math collections itertools input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline N=int(input()) N int(input()) int input() input xy = [] xy [] if N == 1:
    print(1)
    exit() N == 1 N 1 print(1) print 1 exit() exit for _ in range(N):
    xy.append(list(map(int,input().split()))) _ range(N) range N xy.append(list(map(int,input().split()))) xy.append xy append list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split rxy = [] rxy [] for i in range(N):
    for j in range(N):
        if i==j:
            continue
        rxy.append((xy[i][0]-xy[j][0],xy[i][1]-xy[j][1])) i range(N) range N for j in range(N):
        if i==j:
            continue
        rxy.append((xy[i][0]-xy[j][0],xy[i][1]-xy[j][1])) j range(N) range N if i==j:
            continue
         i==j i j continue rxy.append((xy[i][0]-xy[j][0],xy[i][1]-xy[j][1])) rxy.append rxy append (xy[i][0]-xy[j][0],xy[i][1]-xy[j][1]) xy[i][0]-xy[j][0] xy[i][0] [i] xy i 0 xy[j][0] [j] xy j 0 xy[i][1]-xy[j][1] xy[i][1] [i] xy i 1 xy[j][1] [j] xy j 1 cr = collections.Counter(rxy) cr collections.Counter(rxy) collections.Counter collections Counter rxy print(N-max(cr.values())) print N-max(cr.values()) N max(cr.values()) max cr.values() cr.values cr values xy = [] [] xy cr = collections.Counter(rxy) collections.Counter(rxy) cr input = sys.stdin.readline sys.stdin.readline input N=int(input()) int(input()) N rxy = [] [] rxy
import sys,math,collections,itertools
input = sys.stdin.readline

N=int(input())
xy = []

if N == 1:
    print(1)
    exit()

for _ in range(N):
    xy.append(list(map(int,input().split())))

rxy = []
for i in range(N):
    for j in range(N):
        if i==j:
            continue
        rxy.append((xy[i][0]-xy[j][0],xy[i][1]-xy[j][1]))
cr = collections.Counter(rxy)
print(N-max(cr.values()))

