n = int(eval(input()))

xy = [tuple(map(int, input().split())) for _ in range(n)]

s_xy = set(xy)



count = 0

for i in range(n-1):

    for j in range(i+1, n):

        ix, iy = xy[i]

        jx, jy = xy[j]

        p = jx - ix

        q = jy - iy

        tc = sum((x-p,y-q) in xy for x, y in s_xy)



        count = max(count, tc)



print((n-count))
#https://atcoder.jp/contests/diverta2019-2/submissions/11229318

n = int(eval(input()))

t = [tuple(map(int, input().split())) for _ in range(n)]

s = set(t)

cnt = 0

for i in range(n-1):

  for j in range(i+1,n):

    u,v = t[i]

    x,y = t[j]

    p = u-x; q = v-y

    c = sum((x-p, y-q) in s for x,y in t)

    if cnt < c: cnt = c

print((n-cnt))

n = int(eval(input()))
xy = [tuple(map(int, input().split())) for _ in range(n)]
s_xy = set(xy)
count = 0
for i in range(n - 1):
    for j in range(i + 1, n):
        ix, iy = xy[i]
        jx, jy = xy[j]
        p = jx - ix
        q = jy - iy
        tc = sum((x - p, y - q) in xy for x, y in s_xy)
        count = max(count, tc)
print((n - count))

# https://atcoder.jp/contests/diverta2019-2/submissions/11229318
n = int(eval(input()))
t = [tuple(map(int, input().split())) for _ in range(n)]
s = set(t)
cnt = 0
for i in range(n - 1):
    for j in range(i + 1, n):
        u, v = t[i]
        x, y = t[j]
        p = u - x
        q = v - y
        c = sum((x - p, y - q) in s for x, y in t)
        if cnt < c:
            cnt = c
print((n - cnt))

+# https://atcoder.jp/contests/diverta2019-2/submissions/11229318 -xy = [tuple(map(int, input().split())) for _ in range(n)] -s_xy = set(xy) -count = 0 +t = [tuple(map(int, input().split())) for _ in range(n)] +s = set(t) +cnt = 0 -        ix, iy = xy[i] -        jx, jy = xy[j] -        p = jx - ix -        q = jy - iy -        tc = sum((x - p, y - q) in xy for x, y in s_xy) -        count = max(count, tc) -print((n - count)) +        u, v = t[i] +        x, y = t[j] +        p = u - x +        q = v - y +        c = sum((x - p, y - q) in s for x, y in t) +        if cnt < c: +            cnt = c +print((n - cnt))