def cal(dx,dy):

    cnt=0

    for x in s:

        flag=False

        for y in s:

            if(x==y):

                continue

            if(x[0]+dx==y[0] and x[1]+dy==y[1]):

                flag=True

        if(flag==False):

            cnt+=1

    return cnt



n=int(eval(input()))

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

ans=n

for x in s:

    for y in s:

        if(x==y):

            continue

        dx=x[0]-y[0]

        dy=x[1]-y[1]

        tmp=cal(dx,dy)

        if(tmp<ans):

            ans=tmp

print(ans)
N = int(eval(input()))



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



flag = True

if N == 1:

    print((1))

    flag = False



if flag:

    # p, qを求める

    d = {}  # [p, q]をkeyにもつ辞書

    cnt=0

    for a in coodinates:

        for b in coodinates:

            if a == b:

                continue

            p, q = a[0] - b[0], a[1] - b[1]

            if (p, q) in d:

                d[(p, q)] += 1

            else:

                d[(p, q)] = 1

            cnt=max(cnt,d[(p,q)])



    print((N - cnt))
def cal(dx, dy):
    cnt = 0
    for x in s:
        flag = False
        for y in s:
            if x == y:
                continue
            if x[0] + dx == y[0] and x[1] + dy == y[1]:
                flag = True
        if flag == False:
            cnt += 1
    return cnt


n = int(eval(input()))
s = [list(map(int, input().split())) for _ in range(n)]
ans = n
for x in s:
    for y in s:
        if x == y:
            continue
        dx = x[0] - y[0]
        dy = x[1] - y[1]
        tmp = cal(dx, dy)
        if tmp < ans:
            ans = tmp
print(ans)

N = int(eval(input()))
coodinates = [list(map(int, input().split())) for _ in range(N)]
flag = True
if N == 1:
    print((1))
    flag = False
if flag:
    # p, qを求める
    d = {}  # [p, q]をkeyにもつ辞書
    cnt = 0
    for a in coodinates:
        for b in coodinates:
            if a == b:
                continue
            p, q = a[0] - b[0], a[1] - b[1]
            if (p, q) in d:
                d[(p, q)] += 1
            else:
                d[(p, q)] = 1
            cnt = max(cnt, d[(p, q)])
    print((N - cnt))

-def cal(dx, dy): +N = int(eval(input())) +coodinates = [list(map(int, input().split())) for _ in range(N)] +flag = True +if N == 1: +    print((1)) +    flag = False +if flag: +    # p, qを求める +    d = {}  # [p, q]をkeyにもつ辞書 -    for x in s: -        flag = False -        for y in s: -            if x == y: +    for a in coodinates: +        for b in coodinates: +            if a == b: -            if x[0] + dx == y[0] and x[1] + dy == y[1]: -                flag = True -        if flag == False: -            cnt += 1 -    return cnt - - -n = int(eval(input())) -s = [list(map(int, input().split())) for _ in range(n)] -ans = n -for x in s: -    for y in s: -        if x == y: -            continue -        dx = x[0] - y[0] -        dy = x[1] - y[1] -        tmp = cal(dx, dy) -        if tmp < ans: -            ans = tmp -print(ans) +            p, q = a[0] - b[0], a[1] - b[1] +            if (p, q) in d: +                d[(p, q)] += 1 +            else: +                d[(p, q)] = 1 +            cnt = max(cnt, d[(p, q)]) +    print((N - cnt))