from collections import defaultdict

inpl = lambda: list(map(int,input().split()))



N = int(eval(input()))

xy = []

field = defaultdict(int)

for _ in range(N):

    x, y = inpl()

    xy.append((x,y))

    field[(x,y)] = 1

xy.sort()



pq = set()

for i in range(N):

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

        x1, y1 = xy[i]

        x2, y2 = xy[j]

        p, q = x2-x1, y2-y1

        pq.add((p,q))



ans = N

for p, q in pq:

    removed = defaultdict(int)

    cost = 0

    for x, y in xy:

        if removed[(x,y)]:

            continue

        else:

            removed[(x,y)] = 1

            cost += 1

            while True:

                x += p

                y += q

                if field[(x,y)]:

                    removed[(x,y)] = 1

                else:

                    break

    if cost < ans:

        ans = cost



print(ans)
from collections import defaultdict

inpl = lambda: list(map(int,input().split()))

 

N = int(eval(input()))

xy = []

for _ in range(N):

    x, y = inpl()

    xy.append((x,y))

xy.sort()



edges = defaultdict(int)

edges[(0,0)] = 0

for i in range(N):

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

        x1, y1 = xy[i]

        x2, y2 = xy[j]

        p, q = x2-x1, y2-y1

        edges[(p,q)] += 1

 

print((N - max(edges.values())))
from collections import defaultdict

inpl = lambda: list(map(int, input().split()))
N = int(eval(input()))
xy = []
field = defaultdict(int)
for _ in range(N):
    x, y = inpl()
    xy.append((x, y))
    field[(x, y)] = 1
xy.sort()
pq = set()
for i in range(N):
    for j in range(i + 1, N):
        x1, y1 = xy[i]
        x2, y2 = xy[j]
        p, q = x2 - x1, y2 - y1
        pq.add((p, q))
ans = N
for p, q in pq:
    removed = defaultdict(int)
    cost = 0
    for x, y in xy:
        if removed[(x, y)]:
            continue
        else:
            removed[(x, y)] = 1
            cost += 1
            while True:
                x += p
                y += q
                if field[(x, y)]:
                    removed[(x, y)] = 1
                else:
                    break
    if cost < ans:
        ans = cost
print(ans)

from collections import defaultdict

inpl = lambda: list(map(int, input().split()))
N = int(eval(input()))
xy = []
for _ in range(N):
    x, y = inpl()
    xy.append((x, y))
xy.sort()
edges = defaultdict(int)
edges[(0, 0)] = 0
for i in range(N):
    for j in range(i + 1, N):
        x1, y1 = xy[i]
        x2, y2 = xy[j]
        p, q = x2 - x1, y2 - y1
        edges[(p, q)] += 1
print((N - max(edges.values())))

-field = defaultdict(int) -    field[(x, y)] = 1 -pq = set() +edges = defaultdict(int) +edges[(0, 0)] = 0 -        pq.add((p, q)) -ans = N -for p, q in pq: -    removed = defaultdict(int) -    cost = 0 -    for x, y in xy: -        if removed[(x, y)]: -            continue -        else: -            removed[(x, y)] = 1 -            cost += 1 -            while True: -                x += p -                y += q -                if field[(x, y)]: -                    removed[(x, y)] = 1 -                else: -                    break -    if cost < ans: -        ans = cost -print(ans) +        edges[(p, q)] += 1 +print((N - max(edges.values())))