N = int(eval(input()))

x, y = (

    list(zip(*(list(map(int, input().split())) for _ in range(N)))) if N else

    ((), ())

)



class UnionFindTree:

    def __init__(self, n):

        self.p = [i for i in range(n + 1)]

        self.r = [0 for _ in range(n + 1)]



    def find(self, x):

        if self.p[x] != x:

            self.p[x] = self.find(self.p[x])

        return self.p[x]



    def union(self, x, y):

        px = self.find(x)

        py = self.find(y)

        if px != py:

            if self.r[px] < self.r[py]:

                self.p[px] = py

            else:

                self.p[py] = px

                if self.r[px] == self.r[py]:

                    self.r[px] += 1



    def same(self, x, y):

        return self.find(x) == self.find(y)





ans = 10**10



for i in range(N):

    for j in range(N):

        p, q = (x[i] - x[j], y[i] - y[j])

        uft = UnionFindTree(N)

        for u in range(N - 1):

            for v in range(u + 1, N):

                if (x[u] - x[v], y[u] - y[v]) == (p, q) or (x[u] - x[v], y[u] - y[v]) == (-p, -q):

                    uft.union(u, v)

        ans = min(ans, len({uft.find(z) for z in range(N)}))



print(ans)

from collections import Counter

from itertools import permutations



N = int(eval(input()))

x, y = (

    list(zip(*(list(map(int, input().split())) for _ in range(N)))) if N else

    ((), ())

)



# (p, q) = (x_i - x_j, y_i - y_j) を満たす組(i, j)の個数が最大となるように

# p, qを定めればよい

ans = (

    1 if N == 1 else

    N - max(

        Counter(

            (x[i] - x[j], y[i] - y[j])

            for i, j in permutations(list(range(N)), 2)

        ).values()

    )

)



print(ans)

N = int(eval(input()))
x, y = (
    list(zip(*(list(map(int, input().split())) for _ in range(N)))) if N else ((), ())
)


class UnionFindTree:
    def __init__(self, n):
        self.p = [i for i in range(n + 1)]
        self.r = [0 for _ in range(n + 1)]

    def find(self, x):
        if self.p[x] != x:
            self.p[x] = self.find(self.p[x])
        return self.p[x]

    def union(self, x, y):
        px = self.find(x)
        py = self.find(y)
        if px != py:
            if self.r[px] < self.r[py]:
                self.p[px] = py
            else:
                self.p[py] = px
                if self.r[px] == self.r[py]:
                    self.r[px] += 1

    def same(self, x, y):
        return self.find(x) == self.find(y)


ans = 10**10
for i in range(N):
    for j in range(N):
        p, q = (x[i] - x[j], y[i] - y[j])
        uft = UnionFindTree(N)
        for u in range(N - 1):
            for v in range(u + 1, N):
                if (x[u] - x[v], y[u] - y[v]) == (p, q) or (
                    x[u] - x[v],
                    y[u] - y[v],
                ) == (-p, -q):
                    uft.union(u, v)
        ans = min(ans, len({uft.find(z) for z in range(N)}))
print(ans)

from collections import Counter
from itertools import permutations

N = int(eval(input()))
x, y = (
    list(zip(*(list(map(int, input().split())) for _ in range(N)))) if N else ((), ())
)
# (p, q) = (x_i - x_j, y_i - y_j) を満たす組(i, j)の個数が最大となるように
# p, qを定めればよい
ans = (
    1
    if N == 1
    else N
    - max(
        Counter(
            (x[i] - x[j], y[i] - y[j]) for i, j in permutations(list(range(N)), 2)
        ).values()
    )
)
print(ans)

+from collections import Counter +from itertools import permutations + - - -class UnionFindTree: -    def __init__(self, n): -        self.p = [i for i in range(n + 1)] -        self.r = [0 for _ in range(n + 1)] - -    def find(self, x): -        if self.p[x] != x: -            self.p[x] = self.find(self.p[x]) -        return self.p[x] - -    def union(self, x, y): -        px = self.find(x) -        py = self.find(y) -        if px != py: -            if self.r[px] < self.r[py]: -                self.p[px] = py -            else: -                self.p[py] = px -                if self.r[px] == self.r[py]: -                    self.r[px] += 1 - -    def same(self, x, y): -        return self.find(x) == self.find(y) - - -ans = 10**10 -for i in range(N): -    for j in range(N): -        p, q = (x[i] - x[j], y[i] - y[j]) -        uft = UnionFindTree(N) -        for u in range(N - 1): -            for v in range(u + 1, N): -                if (x[u] - x[v], y[u] - y[v]) == (p, q) or ( -                    x[u] - x[v], -                    y[u] - y[v], -                ) == (-p, -q): -                    uft.union(u, v) -        ans = min(ans, len({uft.find(z) for z in range(N)})) +# (p, q) = (x_i - x_j, y_i - y_j) を満たす組(i, j)の個数が最大となるように +# p, qを定めればよい +ans = ( +    1 +    if N == 1 +    else N +    - max( +        Counter( +            (x[i] - x[j], y[i] - y[j]) for i, j in permutations(list(range(N)), 2) +        ).values() +    ) +)