import copy
import math

N = int(input())
xy = []
for _ in range(N):
    xy.append(tuple(map(int, input().split())))

def dfs(parent, p, q):
    seen[parent] = True
    for child in range(N):
        # print(child)
        if seen[child] == False:
            x, y = xy[child]
            if x + p == xy[parent][0] and y + q == xy[parent][1] or \
                    x - p == xy[parent][0] and y - q == xy[parent][1]:
                dfs(child, p, q)


m = N
for i in range(N - 1):
    for j in range(i + 1, N):
        p = xy[i][0] - xy[j][0]
        q = xy[i][1] - xy[j][1]
        cnt = 0
        seen = [False] * N
        for start in range(N):
            if seen[start] == False:
                dfs(start, p, q)
                cnt += 1
                # print(tosee)
        m = min(cnt, m)
        # print(p, q, group)
print(m) import copy copy import math math N = int(input()) N int(input()) int input() input xy = [] xy [] for _ in range(N):
    xy.append(tuple(map(int, input().split()))) _ range(N) range N xy.append(tuple(map(int, input().split()))) xy.append xy append tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split def dfs(parent, p, q):
    seen[parent] = True
    for child in range(N):
        # print(child)
        if seen[child] == False:
            x, y = xy[child]
            if x + p == xy[parent][0] and y + q == xy[parent][1] or \
                    x - p == xy[parent][0] and y - q == xy[parent][1]:
                dfs(child, p, q) dfs seen[parent] = True seen[parent] seen parent True for child in range(N):
        # print(child)
        if seen[child] == False:
            x, y = xy[child]
            if x + p == xy[parent][0] and y + q == xy[parent][1] or \
                    x - p == xy[parent][0] and y - q == xy[parent][1]:
                dfs(child, p, q) child range(N) range N if seen[child] == False:
            x, y = xy[child]
            if x + p == xy[parent][0] and y + q == xy[parent][1] or \
                    x - p == xy[parent][0] and y - q == xy[parent][1]:
                dfs(child, p, q) seen[child] == False seen[child] seen child False x, y = xy[child] x xy[child] xy child y if x + p == xy[parent][0] and y + q == xy[parent][1] or \
                    x - p == xy[parent][0] and y - q == xy[parent][1]:
                dfs(child, p, q) x + p == xy[parent][0] and y + q == xy[parent][1] or \
                    x - p == xy[parent][0] and y - q == xy[parent][1] x + p == xy[parent][0] and y + q == xy[parent][1] x + p == xy[parent][0] x + p x p xy[parent][0] [parent] xy parent 0 y + q == xy[parent][1] y + q y q xy[parent][1] [parent] xy parent 1 x - p == xy[parent][0] and y - q == xy[parent][1] x - p == xy[parent][0] x - p x p xy[parent][0] [parent] xy parent 0 y - q == xy[parent][1] y - q y q xy[parent][1] [parent] xy parent 1 dfs(child, p, q) dfs child p q parent parent p p q q m = N m N for i in range(N - 1):
    for j in range(i + 1, N):
        p = xy[i][0] - xy[j][0]
        q = xy[i][1] - xy[j][1]
        cnt = 0
        seen = [False] * N
        for start in range(N):
            if seen[start] == False:
                dfs(start, p, q)
                cnt += 1
                # print(tosee)
        m = min(cnt, m)
        # print(p, q, group) i range(N - 1) range N - 1 N 1 for j in range(i + 1, N):
        p = xy[i][0] - xy[j][0]
        q = xy[i][1] - xy[j][1]
        cnt = 0
        seen = [False] * N
        for start in range(N):
            if seen[start] == False:
                dfs(start, p, q)
                cnt += 1
                # print(tosee)
        m = min(cnt, m)
        # print(p, q, group) j range(i + 1, N) range i + 1 i 1 N p = xy[i][0] - xy[j][0] p xy[i][0] - xy[j][0] xy[i][0] [i] xy i 0 xy[j][0] [j] xy j 0 q = xy[i][1] - xy[j][1] q xy[i][1] - xy[j][1] xy[i][1] [i] xy i 1 xy[j][1] [j] xy j 1 cnt = 0 cnt 0 seen = [False] * N seen [False] * N [False] False N for start in range(N):
            if seen[start] == False:
                dfs(start, p, q)
                cnt += 1
                # print(tosee)
         start range(N) range N if seen[start] == False:
                dfs(start, p, q)
                cnt += 1
                # print(tosee)
         seen[start] == False seen[start] seen start False dfs(start, p, q) dfs start p q cnt += 1 cnt 1 m = min(cnt, m) m min(cnt, m) min cnt m print(m) print m q = xy[i][1] - xy[j][1] xy[i][1] - xy[j][1] q cnt = 0 0 cnt def dfs(parent, p, q):
    seen[parent] = True
    for child in range(N):
        # print(child)
        if seen[child] == False:
            x, y = xy[child]
            if x + p == xy[parent][0] and y + q == xy[parent][1] or \
                    x - p == xy[parent][0] and y - q == xy[parent][1]:
                dfs(child, p, q) def dfs(parent, p, q):
    seen[parent] = True
    for child in range(N):
        # print(child)
        if seen[child] == False:
            x, y = xy[child]
            if x + p == xy[parent][0] and y + q == xy[parent][1] or \
                    x - p == xy[parent][0] and y - q == xy[parent][1]:
                dfs(child, p, q) dfs m = min(cnt, m) min(cnt, m) m xy = [] [] xy m = N N m cnt += 1 1 cnt N = int(input()) int(input()) N p = xy[i][0] - xy[j][0] xy[i][0] - xy[j][0] p seen = [False] * N [False] * N seen
import copy
import math

N = int(input())
xy = []
for _ in range(N):
    xy.append(tuple(map(int, input().split())))

def dfs(parent, p, q):
    seen[parent] = True
    for child in range(N):
        # print(child)
        if seen[child] == False:
            x, y = xy[child]
            if x + p == xy[parent][0] and y + q == xy[parent][1] or \
                    x - p == xy[parent][0] and y - q == xy[parent][1]:
                dfs(child, p, q)


m = N
for i in range(N - 1):
    for j in range(i + 1, N):
        p = xy[i][0] - xy[j][0]
        q = xy[i][1] - xy[j][1]
        cnt = 0
        seen = [False] * N
        for start in range(N):
            if seen[start] == False:
                dfs(start, p, q)
                cnt += 1
                # print(tosee)
        m = min(cnt, m)
        # print(p, q, group)
print(m)