import sys
N = int(sys.stdin.readline().rstrip())

if N == 1:
    print(1)
    exit()

zahyo = []
for _ in range(N):
    x, y = map(int, sys.stdin.readline().rstrip().split())
    zahyo.append((x, y))
zahyo.sort()

p_q = set()
for i in range(N - 1):
    for j in range(i + 1, N):
        p = zahyo[j][0] - zahyo[i][0]
        q = zahyo[j][1] - zahyo[i][1]
        p_q.add((p, q))

ans = float("inf")
for p, q in p_q:
    used = set()
    ans_tmp = 0
    for i in range(N):
        if i not in used:
            x_base = zahyo[i][0]
            y_base = zahyo[i][1]
            ans_tmp += 1
            for j, (x, y) in enumerate(zahyo[i + 1:], 1):
                if x - x_base == p and y - y_base == q:
                    used.add(i + j)
                    x_base = x
                    y_base = y
    ans = min(ans_tmp, ans)
print(ans) import sys sys N = int(sys.stdin.readline().rstrip()) N int(sys.stdin.readline().rstrip()) int sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip if N == 1:
    print(1)
    exit() N == 1 N 1 print(1) print 1 exit() exit zahyo = [] zahyo [] for _ in range(N):
    x, y = map(int, sys.stdin.readline().rstrip().split())
    zahyo.append((x, y)) _ range(N) range N x, y = map(int, sys.stdin.readline().rstrip().split()) x map(int, sys.stdin.readline().rstrip().split()) map int sys.stdin.readline().rstrip().split() sys.stdin.readline().rstrip().split sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip split y zahyo.append((x, y)) zahyo.append zahyo append (x, y) x y zahyo.sort() zahyo.sort zahyo sort p_q = set() p_q set() set for i in range(N - 1):
    for j in range(i + 1, N):
        p = zahyo[j][0] - zahyo[i][0]
        q = zahyo[j][1] - zahyo[i][1]
        p_q.add((p, q)) i range(N - 1) range N - 1 N 1 for j in range(i + 1, N):
        p = zahyo[j][0] - zahyo[i][0]
        q = zahyo[j][1] - zahyo[i][1]
        p_q.add((p, q)) j range(i + 1, N) range i + 1 i 1 N p = zahyo[j][0] - zahyo[i][0] p zahyo[j][0] - zahyo[i][0] zahyo[j][0] [j] zahyo j 0 zahyo[i][0] [i] zahyo i 0 q = zahyo[j][1] - zahyo[i][1] q zahyo[j][1] - zahyo[i][1] zahyo[j][1] [j] zahyo j 1 zahyo[i][1] [i] zahyo i 1 p_q.add((p, q)) p_q.add p_q add (p, q) p q ans = float("inf") ans float("inf") float "inf" for p, q in p_q:
    used = set()
    ans_tmp = 0
    for i in range(N):
        if i not in used:
            x_base = zahyo[i][0]
            y_base = zahyo[i][1]
            ans_tmp += 1
            for j, (x, y) in enumerate(zahyo[i + 1:], 1):
                if x - x_base == p and y - y_base == q:
                    used.add(i + j)
                    x_base = x
                    y_base = y
    ans = min(ans_tmp, ans) p q p_q used = set() used set() set ans_tmp = 0 ans_tmp 0 for i in range(N):
        if i not in used:
            x_base = zahyo[i][0]
            y_base = zahyo[i][1]
            ans_tmp += 1
            for j, (x, y) in enumerate(zahyo[i + 1:], 1):
                if x - x_base == p and y - y_base == q:
                    used.add(i + j)
                    x_base = x
                    y_base = y
     i range(N) range N if i not in used:
            x_base = zahyo[i][0]
            y_base = zahyo[i][1]
            ans_tmp += 1
            for j, (x, y) in enumerate(zahyo[i + 1:], 1):
                if x - x_base == p and y - y_base == q:
                    used.add(i + j)
                    x_base = x
                    y_base = y
     i not in used i used x_base = zahyo[i][0] x_base zahyo[i][0] [i] zahyo i 0 y_base = zahyo[i][1] y_base zahyo[i][1] [i] zahyo i 1 ans_tmp += 1 ans_tmp 1 for j, (x, y) in enumerate(zahyo[i + 1:], 1):
                if x - x_base == p and y - y_base == q:
                    used.add(i + j)
                    x_base = x
                    y_base = y
     j (x, y) x y enumerate(zahyo[i + 1:], 1) enumerate zahyo[i + 1:] zahyo i + 1: i + 1 i 1 1 if x - x_base == p and y - y_base == q:
                    used.add(i + j)
                    x_base = x
                    y_base = y
     x - x_base == p and y - y_base == q x - x_base == p x - x_base x x_base p y - y_base == q y - y_base y y_base q used.add(i + j) used.add used add i + j i j x_base = x x_base x y_base = y y_base y ans = min(ans_tmp, ans) ans min(ans_tmp, ans) min ans_tmp ans print(ans) print ans ans_tmp += 1 1 ans_tmp zahyo = [] [] zahyo x_base = zahyo[i][0] zahyo[i][0] x_base ans = float("inf") float("inf") ans ans = min(ans_tmp, ans) min(ans_tmp, ans) ans x_base = x x x_base N = int(sys.stdin.readline().rstrip()) int(sys.stdin.readline().rstrip()) N ans_tmp = 0 0 ans_tmp x, y = map(int, sys.stdin.readline().rstrip().split()) map(int, sys.stdin.readline().rstrip().split()) x p_q = set() set() p_q p = zahyo[j][0] - zahyo[i][0] zahyo[j][0] - zahyo[i][0] p q = zahyo[j][1] - zahyo[i][1] zahyo[j][1] - zahyo[i][1] q y = map(int, sys.stdin.readline().rstrip().split()) map(int, sys.stdin.readline().rstrip().split()) y y_base = y y y_base y_base = zahyo[i][1] zahyo[i][1] y_base used = set() set() used
import sys
N = int(sys.stdin.readline().rstrip())

if N == 1:
    print(1)
    exit()

zahyo = []
for _ in range(N):
    x, y = map(int, sys.stdin.readline().rstrip().split())
    zahyo.append((x, y))
zahyo.sort()

p_q = set()
for i in range(N - 1):
    for j in range(i + 1, N):
        p = zahyo[j][0] - zahyo[i][0]
        q = zahyo[j][1] - zahyo[i][1]
        p_q.add((p, q))

ans = float("inf")
for p, q in p_q:
    used = set()
    ans_tmp = 0
    for i in range(N):
        if i not in used:
            x_base = zahyo[i][0]
            y_base = zahyo[i][1]
            ans_tmp += 1
            for j, (x, y) in enumerate(zahyo[i + 1:], 1):
                if x - x_base == p and y - y_base == q:
                    used.add(i + j)
                    x_base = x
                    y_base = y
    ans = min(ans_tmp, ans)
print(ans)