import math
import collections
import fractions
import itertools

def solve():
    n = int(input())
    xy = [[int(x) for x in input().split()] for _ in range(n)]
    vec = list()
    for xy1, xy2 in itertools.combinations(xy, 2):
        p = xy2[0] - xy1[0]
        q = xy2[1] - xy1[1]
        vec.append((p, q))
        vec.append((-p, -q))
    c = collections.Counter(vec)
    if n >= 2:
        ans = max(c.values())
        print(n - ans)
    else:
        print(1)
    return 0

if __name__ == "__main__":
    solve() import math math import collections collections import fractions fractions import itertools itertools def solve():
    n = int(input())
    xy = [[int(x) for x in input().split()] for _ in range(n)]
    vec = list()
    for xy1, xy2 in itertools.combinations(xy, 2):
        p = xy2[0] - xy1[0]
        q = xy2[1] - xy1[1]
        vec.append((p, q))
        vec.append((-p, -q))
    c = collections.Counter(vec)
    if n >= 2:
        ans = max(c.values())
        print(n - ans)
    else:
        print(1)
    return 0 solve n = int(input()) n int(input()) int input() input [int(x) for x in input().split()] for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) [int(x) for x in input().split()] xy = [[int(x) for x in input().split()] for _ in range(n)] xy [[int(x) for x in input().split()] for _ in range(n)] vec = list() vec list() list for xy1, xy2 in itertools.combinations(xy, 2):
        p = xy2[0] - xy1[0]
        q = xy2[1] - xy1[1]
        vec.append((p, q))
        vec.append((-p, -q))
     xy1 xy2 itertools.combinations(xy, 2) itertools.combinations itertools combinations xy 2 p = xy2[0] - xy1[0] p xy2[0] - xy1[0] xy2[0] xy2 0 xy1[0] xy1 0 q = xy2[1] - xy1[1] q xy2[1] - xy1[1] xy2[1] xy2 1 xy1[1] xy1 1 vec.append((p, q)) vec.append vec append (p, q) p q vec.append((-p, -q)) vec.append vec append (-p, -q) -p p -q q c = collections.Counter(vec) c collections.Counter(vec) collections.Counter collections Counter vec if n >= 2:
        ans = max(c.values())
        print(n - ans)
    else:
        print(1)
     n >= 2 n 2 ans = max(c.values()) ans max(c.values()) max c.values() c.values c values print(n - ans) print n - ans n ans print(1) print 1 return 0 0 if __name__ == "__main__":
    solve() __name__ == "__main__" __name__ "__main__" solve() solve def solve():
    n = int(input())
    xy = [[int(x) for x in input().split()] for _ in range(n)]
    vec = list()
    for xy1, xy2 in itertools.combinations(xy, 2):
        p = xy2[0] - xy1[0]
        q = xy2[1] - xy1[1]
        vec.append((p, q))
        vec.append((-p, -q))
    c = collections.Counter(vec)
    if n >= 2:
        ans = max(c.values())
        print(n - ans)
    else:
        print(1)
    return 0 def solve():
    n = int(input())
    xy = [[int(x) for x in input().split()] for _ in range(n)]
    vec = list()
    for xy1, xy2 in itertools.combinations(xy, 2):
        p = xy2[0] - xy1[0]
        q = xy2[1] - xy1[1]
        vec.append((p, q))
        vec.append((-p, -q))
    c = collections.Counter(vec)
    if n >= 2:
        ans = max(c.values())
        print(n - ans)
    else:
        print(1)
    return 0 solve
import math
import collections
import fractions
import itertools

def solve():
    n = int(input())
    xy = [[int(x) for x in input().split()] for _ in range(n)]
    vec = list()
    for xy1, xy2 in itertools.combinations(xy, 2):
        p = xy2[0] - xy1[0]
        q = xy2[1] - xy1[1]
        vec.append((p, q))
        vec.append((-p, -q))
    c = collections.Counter(vec)
    if n >= 2:
        ans = max(c.values())
        print(n - ans)
    else:
        print(1)
    return 0

if __name__ == "__main__":
    solve()
