from collections import Counter



N = int(eval(input()))



p = []

for _ in range(N):

    p.append(tuple(map(int, input().split())))



if N == 1:

    print((1))

    exit()



d = []

for i, p1 in enumerate(p):

    for j, p2 in enumerate(p):

        if i == j:

            continue

        x = p1[0] - p2[0]

        y = p1[1] - p2[1]

        d.append((x, y))



c = Counter(d)

# print(c)

print((N - c.most_common()[0][1]))

def main():

    from collections import Counter, namedtuple



    pt = namedtuple('pt', 'x y')



    def delta(a: pt, b: pt) -> pt:

        x = a.x - b.x

        y = a.y - b.y

        if (x < 0) or (x == 0 and y < 0):

            x = -x

            y = -y

        return pt(x=x, y=y)



    n = int(eval(input()))

    if n == 1:

        # deltaが計算できないので、

        # 別処理する

        print((1))

        return



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



    c = Counter(

        delta(a, b)

        for i, a in enumerate(ps)

        for j, b in enumerate(ps)

        if i < j

    )



    ma = max(c.values())



    print((n - ma))





if __name__ == '__main__':

    main()

from collections import Counter

N = int(eval(input()))
p = []
for _ in range(N):
    p.append(tuple(map(int, input().split())))
if N == 1:
    print((1))
    exit()
d = []
for i, p1 in enumerate(p):
    for j, p2 in enumerate(p):
        if i == j:
            continue
        x = p1[0] - p2[0]
        y = p1[1] - p2[1]
        d.append((x, y))
c = Counter(d)
# print(c)
print((N - c.most_common()[0][1]))

def main():
    from collections import Counter, namedtuple

    pt = namedtuple("pt", "x y")

    def delta(a: pt, b: pt) -> pt:
        x = a.x - b.x
        y = a.y - b.y
        if (x < 0) or (x == 0 and y < 0):
            x = -x
            y = -y
        return pt(x=x, y=y)

    n = int(eval(input()))
    if n == 1:
        # deltaが計算できないので、
        # 別処理する
        print((1))
        return
    ps = [pt(*list(map(int, input().split()))) for _ in range(n)]
    c = Counter(
        delta(a, b) for i, a in enumerate(ps) for j, b in enumerate(ps) if i < j
    )
    ma = max(c.values())
    print((n - ma))


if __name__ == "__main__":
    main()

-from collections import Counter +def main(): +    from collections import Counter, namedtuple -N = int(eval(input())) -p = [] -for _ in range(N): -    p.append(tuple(map(int, input().split()))) -if N == 1: -    print((1)) -    exit() -d = [] -for i, p1 in enumerate(p): -    for j, p2 in enumerate(p): -        if i == j: -            continue -        x = p1[0] - p2[0] -        y = p1[1] - p2[1] -        d.append((x, y)) -c = Counter(d) -# print(c) -print((N - c.most_common()[0][1])) +    pt = namedtuple("pt", "x y") + +    def delta(a: pt, b: pt) -> pt: +        x = a.x - b.x +        y = a.y - b.y +        if (x < 0) or (x == 0 and y < 0): +            x = -x +            y = -y +        return pt(x=x, y=y) + +    n = int(eval(input())) +    if n == 1: +        # deltaが計算できないので、 +        # 別処理する +        print((1)) +        return +    ps = [pt(*list(map(int, input().split()))) for _ in range(n)] +    c = Counter( +        delta(a, b) for i, a in enumerate(ps) for j, b in enumerate(ps) if i < j +    ) +    ma = max(c.values()) +    print((n - ma)) + + +if __name__ == "__main__": +    main()