# div2019-2B - Picking Up

from collections import defaultdict



n = int(eval(input()))

arr = sorted([list(map(int, input().rstrip().split())) for _ in range(n)])

cnt = defaultdict(int)

for i in range(n):

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

        dif = (arr[j][0] - arr[i][0], arr[j][1] - arr[i][1])

        cnt[dif] += 1

print((n - max(list(cnt.values()), default=0)))
n = int(eval(input()))

arr = sorted([list(map(int, input().rstrip().split())) for _ in range(n)])

cnt = {}

for i, j in arr:

    for k, l in arr:

        if (i, j) == (k, l):

            continue

        dif = (k - i, l - j)

        cnt.setdefault(dif, 0)

        cnt[dif] += 1

print((n - max(list(cnt.values()), default=0)))
# div2019-2B - Picking Up
from collections import defaultdict

n = int(eval(input()))
arr = sorted([list(map(int, input().rstrip().split())) for _ in range(n)])
cnt = defaultdict(int)
for i in range(n):
    for j in range(i + 1, n):
        dif = (arr[j][0] - arr[i][0], arr[j][1] - arr[i][1])
        cnt[dif] += 1
print((n - max(list(cnt.values()), default=0)))

n = int(eval(input()))
arr = sorted([list(map(int, input().rstrip().split())) for _ in range(n)])
cnt = {}
for i, j in arr:
    for k, l in arr:
        if (i, j) == (k, l):
            continue
        dif = (k - i, l - j)
        cnt.setdefault(dif, 0)
        cnt[dif] += 1
print((n - max(list(cnt.values()), default=0)))

-# div2019-2B - Picking Up -from collections import defaultdict - -cnt = defaultdict(int) -for i in range(n): -    for j in range(i + 1, n): -        dif = (arr[j][0] - arr[i][0], arr[j][1] - arr[i][1]) +cnt = {} +for i, j in arr: +    for k, l in arr: +        if (i, j) == (k, l): +            continue +        dif = (k - i, l - j) +        cnt.setdefault(dif, 0)