from collections import deque
N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]

d = dict()
for point in xy:
    d[str(point)] = 1


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

ans = N
que = deque()

for i in range(N):
    for j in range(i+1, N):
        p = xy[i][0] - xy[j][0]
        q = xy[i][1] - xy[j][1]

        ans_tmp = N

        for point in xy:
            add = [point[0] + p, point[1] + q]
            # sub = [point[0] - p, point[1] - q]
            if d.get(str(add)) == 1:
                ans_tmp -= 1
                d[str(add)] -= 1
                que.append(str(add))
            # if d.get(str(sub)) == 1:
            #     ans -= 1
            #     d[str(sub)] -= 1
        
        ans = min(ans, ans_tmp)
        
        while len(que):
            key = que.pop()
            d[key] += 1
        


print(ans)

 from collections import deque 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)] d = dict() d dict() dict for point in xy:
    d[str(point)] = 1 point xy d[str(point)] = 1 d[str(point)] d str(point) str point 1 if N == 1:
    print(1)
    exit() N == 1 N 1 print(1) print 1 exit() exit ans = N ans N que = deque() que deque() deque for i in range(N):
    for j in range(i+1, N):
        p = xy[i][0] - xy[j][0]
        q = xy[i][1] - xy[j][1]

        ans_tmp = N

        for point in xy:
            add = [point[0] + p, point[1] + q]
            # sub = [point[0] - p, point[1] - q]
            if d.get(str(add)) == 1:
                ans_tmp -= 1
                d[str(add)] -= 1
                que.append(str(add))
            # if d.get(str(sub)) == 1:
            #     ans -= 1
            #     d[str(sub)] -= 1
        
        ans = min(ans, ans_tmp)
        
        while len(que):
            key = que.pop()
            d[key] += 1
         i range(N) range N for j in range(i+1, N):
        p = xy[i][0] - xy[j][0]
        q = xy[i][1] - xy[j][1]

        ans_tmp = N

        for point in xy:
            add = [point[0] + p, point[1] + q]
            # sub = [point[0] - p, point[1] - q]
            if d.get(str(add)) == 1:
                ans_tmp -= 1
                d[str(add)] -= 1
                que.append(str(add))
            # if d.get(str(sub)) == 1:
            #     ans -= 1
            #     d[str(sub)] -= 1
        
        ans = min(ans, ans_tmp)
        
        while len(que):
            key = que.pop()
            d[key] += 1
         j range(i+1, N) range i+1 i 1 N p = xy[i][0] - xy[j][0] p xy[i][0] - xy[j][0] xy[i][0] [i] xy i 0 xy[j][0] [j] xy j 0 q = xy[i][1] - xy[j][1] q xy[i][1] - xy[j][1] xy[i][1] [i] xy i 1 xy[j][1] [j] xy j 1 ans_tmp = N ans_tmp N for point in xy:
            add = [point[0] + p, point[1] + q]
            # sub = [point[0] - p, point[1] - q]
            if d.get(str(add)) == 1:
                ans_tmp -= 1
                d[str(add)] -= 1
                que.append(str(add))
            # if d.get(str(sub)) == 1:
            #     ans -= 1
            #     d[str(sub)] -= 1
        
         point xy add = [point[0] + p, point[1] + q] add [point[0] + p, point[1] + q] point[0] + p point[0] point 0 p point[1] + q point[1] point 1 q if d.get(str(add)) == 1:
                ans_tmp -= 1
                d[str(add)] -= 1
                que.append(str(add))
            # if d.get(str(sub)) == 1:
            #     ans -= 1
            #     d[str(sub)] -= 1
        
         d.get(str(add)) == 1 d.get(str(add)) d.get d get str(add) str add 1 ans_tmp -= 1 ans_tmp 1 d[str(add)] -= 1 d[str(add)] d str(add) str add 1 que.append(str(add)) que.append que append str(add) str add ans = min(ans, ans_tmp) ans min(ans, ans_tmp) min ans ans_tmp while len(que):
            key = que.pop()
            d[key] += 1
         len(que) len que key = que.pop() key que.pop() que.pop que pop d[key] += 1 d[key] d key 1 print(ans) print ans q = xy[i][1] - xy[j][1] xy[i][1] - xy[j][1] q key = que.pop() que.pop() key ans = min(ans, ans_tmp) min(ans, ans_tmp) ans p = xy[i][0] - xy[j][0] xy[i][0] - xy[j][0] p add = [point[0] + p, point[1] + q] [point[0] + p, point[1] + q] add ans_tmp -= 1 1 ans_tmp xy = [list(map(int, input().split())) for _ in range(N)] [list(map(int, input().split())) for _ in range(N)] xy que = deque() deque() que ans = N N ans ans_tmp = N N ans_tmp N = int(input()) int(input()) N d = dict() dict() d
from collections import deque
N = int(input())
xy = [list(map(int, input().split())) for _ in range(N)]

d = dict()
for point in xy:
    d[str(point)] = 1


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

ans = N
que = deque()

for i in range(N):
    for j in range(i+1, N):
        p = xy[i][0] - xy[j][0]
        q = xy[i][1] - xy[j][1]

        ans_tmp = N

        for point in xy:
            add = [point[0] + p, point[1] + q]
            # sub = [point[0] - p, point[1] - q]
            if d.get(str(add)) == 1:
                ans_tmp -= 1
                d[str(add)] -= 1
                que.append(str(add))
            # if d.get(str(sub)) == 1:
            #     ans -= 1
            #     d[str(sub)] -= 1
        
        ans = min(ans, ans_tmp)
        
        while len(que):
            key = que.pop()
            d[key] += 1
        


print(ans)


