from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def MI(): return map(int, input().split())


def S(): return input()


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


def print_matrix(mat):
    for i in range(len(mat)):
        print(*mat[i])


YNL = {False: 'No', True: 'Yes'}
YNU = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
# sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']


# show_flg = True
show_flg = False

def cost(x, y, initial, N):
    a = x[initial]
    b = y[initial]
    for i in range(N):
        if i == initial:
            continue

    return 0


def main():
    N = I()
    x = [0] * N
    y = [0] * N
    ans = 0
    dist = [[None] * N for i in range(N)]

    if N == 1:
        print(1)
        return

    for i in range(N):
        x[i], y[i] = MI()

    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            dist[i][j] = str(x[j] - x[i]) + "," + str(y[j] - y[i])

    # print_matrix(dist)

    c = defaultdict(int)
    ans = 1
    for i in range(N):
        for j in range(N):
            if dist[i][j] == None:
                continue
            c[dist[i][j]] += 1

    mcost = max(c.values())
    print(N - mcost)


if __name__ == '__main__':
    main() from heapq import heappush, heappop, heapify from collections import deque, defaultdict, Counter import itertools itertools from itertools import permutations, combinations, accumulate import sys sys import bisect bisect import string string import math math import time time def I(): return int(input()) I def MI(): return map(int, input().split()) MI def S(): return input() S def MS(): return map(str, input().split()) MS int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i def LI(): return [int(i) for i in input().split()] LI int(i)-1 for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i)-1 int(i) int i 1 def LI_(): return [int(i)-1 for i in input().split()] LI_ ord(i)-97 for i in input() for i in input() i input() input for i in input() ord(i)-97 ord(i) ord i 97 def StoI(): return [ord(i)-97 for i in input()] StoI def ItoS(nn): return chr(nn+97) ItoS nn nn def input(): return sys.stdin.readline().rstrip() input def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end) show if show_flg:
        print(*inp, end=end) show_flg print(*inp, end=end) print *inp inp end=end end end end='\n' end '\n' *inp def print_matrix(mat):
    for i in range(len(mat)):
        print(*mat[i]) print_matrix for i in range(len(mat)):
        print(*mat[i]) i range(len(mat)) range len(mat) len mat print(*mat[i]) print *mat[i] mat[i] mat i mat mat YNL = {False: 'No', True: 'Yes'} YNL {False: 'No', True: 'Yes'} False False 'No' True True 'Yes' YNU = {False: 'NO', True: 'YES'} YNU {False: 'NO', True: 'YES'} False False 'NO' True True 'YES' MOD = 10**9+7 MOD 10**9+7 10**9 10 9 7 inf = float('inf') inf float('inf') float 'inf' IINF = 10**10 IINF 10**10 10 10 l_alp = string.ascii_lowercase l_alp string.ascii_lowercase string ascii_lowercase u_alp = string.ascii_uppercase u_alp string.ascii_uppercase string ascii_uppercase ts = time.time() ts time.time() time.time time time nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] nums ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] '1' '2' '3' '4' '5' '6' '7' '8' '9' '10' show_flg = False show_flg False def cost(x, y, initial, N):
    a = x[initial]
    b = y[initial]
    for i in range(N):
        if i == initial:
            continue

    return 0 cost a = x[initial] a x[initial] x initial b = y[initial] b y[initial] y initial for i in range(N):
        if i == initial:
            continue

     i range(N) range N if i == initial:
            continue

     i == initial i initial continue return 0 0 x x y y initial initial N N def main():
    N = I()
    x = [0] * N
    y = [0] * N
    ans = 0
    dist = [[None] * N for i in range(N)]

    if N == 1:
        print(1)
        return

    for i in range(N):
        x[i], y[i] = MI()

    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            dist[i][j] = str(x[j] - x[i]) + "," + str(y[j] - y[i])

    # print_matrix(dist)

    c = defaultdict(int)
    ans = 1
    for i in range(N):
        for j in range(N):
            if dist[i][j] == None:
                continue
            c[dist[i][j]] += 1

    mcost = max(c.values())
    print(N - mcost) main N = I() N I() I x = [0] * N x [0] * N [0] 0 N y = [0] * N y [0] * N [0] 0 N ans = 0 ans 0 [None] * N for i in range(N) for i in range(N) i range(N) range N for i in range(N) [None] * N [None] None N dist = [[None] * N for i in range(N)] dist [[None] * N for i in range(N)] if N == 1:
        print(1)
        return

     N == 1 N 1 print(1) print 1 return for i in range(N):
        x[i], y[i] = MI()

     i range(N) range N x[i], y[i] = MI() x[i] x i MI() MI y[i] y i for i in range(N):
        for j in range(N):
            if i == j:
                continue
            dist[i][j] = str(x[j] - x[i]) + "," + str(y[j] - y[i])

    # print_matrix(dist)

     i range(N) range N for j in range(N):
            if i == j:
                continue
            dist[i][j] = str(x[j] - x[i]) + "," + str(y[j] - y[i])

    # print_matrix(dist)

     j range(N) range N if i == j:
                continue
             i == j i j continue dist[i][j] = str(x[j] - x[i]) + "," + str(y[j] - y[i]) dist[i][j] [i] dist i j str(x[j] - x[i]) + "," + str(y[j] - y[i]) str(x[j] - x[i]) + "," str(x[j] - x[i]) str x[j] - x[i] x[j] x j x[i] x i "," str(y[j] - y[i]) str y[j] - y[i] y[j] y j y[i] y i c = defaultdict(int) c defaultdict(int) defaultdict int ans = 1 ans 1 for i in range(N):
        for j in range(N):
            if dist[i][j] == None:
                continue
            c[dist[i][j]] += 1

     i range(N) range N for j in range(N):
            if dist[i][j] == None:
                continue
            c[dist[i][j]] += 1

     j range(N) range N if dist[i][j] == None:
                continue
             dist[i][j] == None dist[i][j] [i] dist i j None continue c[dist[i][j]] += 1 c[dist[i][j]] c dist[i][j] [i] dist i j 1 mcost = max(c.values()) mcost max(c.values()) max c.values() c.values c values print(N - mcost) print N - mcost N mcost if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def LI(): return [int(i) for i in input().split()] def LI(): return [int(i) for i in input().split()] LI nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] nums inf = float('inf') float('inf') inf def MS(): return map(str, input().split()) def MS(): return map(str, input().split()) MS def MI(): return map(int, input().split()) def MI(): return map(int, input().split()) MI def S(): return input() def S(): return input() S def I(): return int(input()) def I(): return int(input()) I def StoI(): return [ord(i)-97 for i in input()] def StoI(): return [ord(i)-97 for i in input()] StoI l_alp = string.ascii_lowercase string.ascii_lowercase l_alp u_alp = string.ascii_uppercase string.ascii_uppercase u_alp show_flg = False False show_flg def ItoS(nn): return chr(nn+97) def ItoS(nn): return chr(nn+97) ItoS def cost(x, y, initial, N):
    a = x[initial]
    b = y[initial]
    for i in range(N):
        if i == initial:
            continue

    return 0 def cost(x, y, initial, N):
    a = x[initial]
    b = y[initial]
    for i in range(N):
        if i == initial:
            continue

    return 0 cost ts = time.time() time.time() ts def main():
    N = I()
    x = [0] * N
    y = [0] * N
    ans = 0
    dist = [[None] * N for i in range(N)]

    if N == 1:
        print(1)
        return

    for i in range(N):
        x[i], y[i] = MI()

    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            dist[i][j] = str(x[j] - x[i]) + "," + str(y[j] - y[i])

    # print_matrix(dist)

    c = defaultdict(int)
    ans = 1
    for i in range(N):
        for j in range(N):
            if dist[i][j] == None:
                continue
            c[dist[i][j]] += 1

    mcost = max(c.values())
    print(N - mcost) def main():
    N = I()
    x = [0] * N
    y = [0] * N
    ans = 0
    dist = [[None] * N for i in range(N)]

    if N == 1:
        print(1)
        return

    for i in range(N):
        x[i], y[i] = MI()

    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            dist[i][j] = str(x[j] - x[i]) + "," + str(y[j] - y[i])

    # print_matrix(dist)

    c = defaultdict(int)
    ans = 1
    for i in range(N):
        for j in range(N):
            if dist[i][j] == None:
                continue
            c[dist[i][j]] += 1

    mcost = max(c.values())
    print(N - mcost) main def input(): return sys.stdin.readline().rstrip() def input(): return sys.stdin.readline().rstrip() input MOD = 10**9+7 10**9+7 MOD def print_matrix(mat):
    for i in range(len(mat)):
        print(*mat[i]) def print_matrix(mat):
    for i in range(len(mat)):
        print(*mat[i]) print_matrix YNU = {False: 'NO', True: 'YES'} {False: 'NO', True: 'YES'} YNU IINF = 10**10 10**10 IINF def LI_(): return [int(i)-1 for i in input().split()] def LI_(): return [int(i)-1 for i in input().split()] LI_ def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end) def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end) show YNL = {False: 'No', True: 'Yes'} {False: 'No', True: 'Yes'} YNL
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time


def I(): return int(input())


def MI(): return map(int, input().split())


def S(): return input()


def MS(): return map(str, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


def print_matrix(mat):
    for i in range(len(mat)):
        print(*mat[i])


YNL = {False: 'No', True: 'Yes'}
YNU = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
# sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']


# show_flg = True
show_flg = False

def cost(x, y, initial, N):
    a = x[initial]
    b = y[initial]
    for i in range(N):
        if i == initial:
            continue

    return 0


def main():
    N = I()
    x = [0] * N
    y = [0] * N
    ans = 0
    dist = [[None] * N for i in range(N)]

    if N == 1:
        print(1)
        return

    for i in range(N):
        x[i], y[i] = MI()

    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            dist[i][j] = str(x[j] - x[i]) + "," + str(y[j] - y[i])

    # print_matrix(dist)

    c = defaultdict(int)
    ans = 1
    for i in range(N):
        for j in range(N):
            if dist[i][j] == None:
                continue
            c[dist[i][j]] += 1

    mcost = max(c.values())
    print(N - mcost)


if __name__ == '__main__':
    main()
