import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

from collections import defaultdict

n = int(readline())
xy = [tuple(map(int, readline().split())) for _ in range(n)]
dict = defaultdict(int)
dict[0] = 0
for i, check in enumerate(xy):
    for dxy in xy[i + 1:]:
        y, x = check[0], check[1]
        dy, dx = dxy[0], dxy[1]
        dict[(y - dy, x - dx)] += 1
        dict[(dy - y, dx - x)] += 1
print(n - max(dict.values())) import sys sys read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 from collections import defaultdict n = int(readline()) n int(readline()) int readline() readline tuple(map(int, readline().split())) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) tuple(map(int, readline().split())) tuple map(int, readline().split()) map int readline().split() ().split () readline split xy = [tuple(map(int, readline().split())) for _ in range(n)] xy [tuple(map(int, readline().split())) for _ in range(n)] dict = defaultdict(int) dict defaultdict(int) defaultdict int dict[0] = 0 dict[0] dict 0 0 for i, check in enumerate(xy):
    for dxy in xy[i + 1:]:
        y, x = check[0], check[1]
        dy, dx = dxy[0], dxy[1]
        dict[(y - dy, x - dx)] += 1
        dict[(dy - y, dx - x)] += 1 i check enumerate(xy) enumerate xy for dxy in xy[i + 1:]:
        y, x = check[0], check[1]
        dy, dx = dxy[0], dxy[1]
        dict[(y - dy, x - dx)] += 1
        dict[(dy - y, dx - x)] += 1 dxy xy[i + 1:] xy i + 1: i + 1 i 1 y, x = check[0], check[1] y check[0] check 0 x check[1] check 1 dy, dx = dxy[0], dxy[1] dy dxy[0] dxy 0 dx dxy[1] dxy 1 dict[(y - dy, x - dx)] += 1 dict[(y - dy, x - dx)] dict (y - dy, x - dx) y - dy y dy x - dx x dx 1 dict[(dy - y, dx - x)] += 1 dict[(dy - y, dx - x)] dict (dy - y, dx - x) dy - y dy y dx - x dx x 1 print(n - max(dict.values())) print n - max(dict.values()) n max(dict.values()) max dict.values() dict.values dict values dict = defaultdict(int) defaultdict(int) dict dx = dxy[0], dxy[1] dxy[1] dx x = check[0], check[1] check[1] x n = int(readline()) int(readline()) n y, x = check[0], check[1] check[0] y read = sys.stdin.buffer.read sys.stdin.buffer.read read dy, dx = dxy[0], dxy[1] dxy[0] dy readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline xy = [tuple(map(int, readline().split())) for _ in range(n)] [tuple(map(int, readline().split())) for _ in range(n)] xy readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

from collections import defaultdict

n = int(readline())
xy = [tuple(map(int, readline().split())) for _ in range(n)]
dict = defaultdict(int)
dict[0] = 0
for i, check in enumerate(xy):
    for dxy in xy[i + 1:]:
        y, x = check[0], check[1]
        dy, dx = dxy[0], dxy[1]
        dict[(y - dy, x - dx)] += 1
        dict[(dy - y, dx - x)] += 1
print(n - max(dict.values()))
