N = int(eval(input()))

if N == 1:

    print((1))

    exit()

xy = [tuple(int(e) for e in input().split()) for _ in range(N)]

d_list = [(i[0] - j[0], i[1] - j[1]) for i in xy for j in xy if i != j]

items = list(set(d_list))

s = 1

for item in items:

    c = d_list.count(item)

    if c > s:

        s = c

print((N - s))
N = int(eval(input()))

if N == 1:

    print((1))

else:

    xy = [tuple(int(e) for e in input().split()) for _ in range(N)]

    xy.sort()

    d = {}

    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]

            if (p, q) in d:

                d[(p, q)] += 1

            else:

                d[(p, q)] = 1

    print((N - max(d.values())))
N = int(eval(input()))
if N == 1:
    print((1))
    exit()
xy = [tuple(int(e) for e in input().split()) for _ in range(N)]
d_list = [(i[0] - j[0], i[1] - j[1]) for i in xy for j in xy if i != j]
items = list(set(d_list))
s = 1
for item in items:
    c = d_list.count(item)
    if c > s:
        s = c
print((N - s))

N = int(eval(input()))
if N == 1:
    print((1))
else:
    xy = [tuple(int(e) for e in input().split()) for _ in range(N)]
    xy.sort()
    d = {}
    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]
            if (p, q) in d:
                d[(p, q)] += 1
            else:
                d[(p, q)] = 1
    print((N - max(d.values())))

-    exit() -xy = [tuple(int(e) for e in input().split()) for _ in range(N)] -d_list = [(i[0] - j[0], i[1] - j[1]) for i in xy for j in xy if i != j] -items = list(set(d_list)) -s = 1 -for item in items: -    c = d_list.count(item) -    if c > s: -        s = c -print((N - s)) +else: +    xy = [tuple(int(e) for e in input().split()) for _ in range(N)] +    xy.sort() +    d = {} +    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] +            if (p, q) in d: +                d[(p, q)] += 1 +            else: +                d[(p, q)] = 1 +    print((N - max(d.values())))