from operator import itemgetter

N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]

XY.sort(key=itemgetter(1))
XY.sort(key=itemgetter(0))

ans = N
for i in range(N-1):
    for j in range(i+1, N):
        p = XY[j][0] - XY[i][0]
        q = XY[j][1] - XY[i][1]
        cost1 = N
        cost2 = N
        for x, y in XY:
            if [x+p, y+q] in XY:
                cost1 -= 1
            if [x-p, y-q] in XY:
                cost2 -= 1
        ans = min([ans, cost1, cost2])
print(ans) from operator import itemgetter 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(key=itemgetter(1)) XY.sort XY sort key=itemgetter(1) key itemgetter(1) itemgetter 1 XY.sort(key=itemgetter(0)) XY.sort XY sort key=itemgetter(0) key itemgetter(0) itemgetter 0 ans = N ans N for i in range(N-1):
    for j in range(i+1, N):
        p = XY[j][0] - XY[i][0]
        q = XY[j][1] - XY[i][1]
        cost1 = N
        cost2 = N
        for x, y in XY:
            if [x+p, y+q] in XY:
                cost1 -= 1
            if [x-p, y-q] in XY:
                cost2 -= 1
        ans = min([ans, cost1, cost2]) i range(N-1) range N-1 N 1 for j in range(i+1, N):
        p = XY[j][0] - XY[i][0]
        q = XY[j][1] - XY[i][1]
        cost1 = N
        cost2 = N
        for x, y in XY:
            if [x+p, y+q] in XY:
                cost1 -= 1
            if [x-p, y-q] in XY:
                cost2 -= 1
        ans = min([ans, cost1, cost2]) j range(i+1, N) range i+1 i 1 N p = XY[j][0] - XY[i][0] p XY[j][0] - XY[i][0] XY[j][0] [j] XY j 0 XY[i][0] [i] XY i 0 q = XY[j][1] - XY[i][1] q XY[j][1] - XY[i][1] XY[j][1] [j] XY j 1 XY[i][1] [i] XY i 1 cost1 = N cost1 N cost2 = N cost2 N for x, y in XY:
            if [x+p, y+q] in XY:
                cost1 -= 1
            if [x-p, y-q] in XY:
                cost2 -= 1
         x y XY if [x+p, y+q] in XY:
                cost1 -= 1
             [x+p, y+q] in XY [x+p, y+q] x+p x p y+q y q XY cost1 -= 1 cost1 1 if [x-p, y-q] in XY:
                cost2 -= 1
         [x-p, y-q] in XY [x-p, y-q] x-p x p y-q y q XY cost2 -= 1 cost2 1 ans = min([ans, cost1, cost2]) ans min([ans, cost1, cost2]) min [ans, cost1, cost2] ans cost1 cost2 print(ans) print ans cost2 = N N cost2 ans = N N ans cost1 -= 1 1 cost1 ans = min([ans, cost1, cost2]) min([ans, cost1, cost2]) ans XY = [list(map(int, input().split())) for _ in range(N)] [list(map(int, input().split())) for _ in range(N)] XY q = XY[j][1] - XY[i][1] XY[j][1] - XY[i][1] q cost1 = N N cost1 N = int(input()) int(input()) N cost2 -= 1 1 cost2 p = XY[j][0] - XY[i][0] XY[j][0] - XY[i][0] p
from operator import itemgetter

N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]

XY.sort(key=itemgetter(1))
XY.sort(key=itemgetter(0))

ans = N
for i in range(N-1):
    for j in range(i+1, N):
        p = XY[j][0] - XY[i][0]
        q = XY[j][1] - XY[i][1]
        cost1 = N
        cost2 = N
        for x, y in XY:
            if [x+p, y+q] in XY:
                cost1 -= 1
            if [x-p, y-q] in XY:
                cost2 -= 1
        ans = min([ans, cost1, cost2])
print(ans)