from collections import defaultdict


def solve():
    N = int(input())
    if N == 1:
        print(1)
        exit()
    xy = [[0, 0] for _ in range(N)]
    for i in range(N):
        xy[i][0], xy[i][1] = map(int, input().split())
    
    dxy = defaultdict(int)
    for i in range(N - 1):
        for j in range(i + 1, N):
            dxy[(xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])] += 1
            dxy[(xy[j][0] - xy[i][0], xy[j][1] - xy[i][1])] += 1
    
    zeros = max(dxy.values())
    print(N - zeros)


if __name__ == '__main__':
    solve() from collections import defaultdict def solve():
    N = int(input())
    if N == 1:
        print(1)
        exit()
    xy = [[0, 0] for _ in range(N)]
    for i in range(N):
        xy[i][0], xy[i][1] = map(int, input().split())
    
    dxy = defaultdict(int)
    for i in range(N - 1):
        for j in range(i + 1, N):
            dxy[(xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])] += 1
            dxy[(xy[j][0] - xy[i][0], xy[j][1] - xy[i][1])] += 1
    
    zeros = max(dxy.values())
    print(N - zeros) solve N = int(input()) N int(input()) int input() input if N == 1:
        print(1)
        exit()
     N == 1 N 1 print(1) print 1 exit() exit [0, 0] for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) [0, 0] 0 0 xy = [[0, 0] for _ in range(N)] xy [[0, 0] for _ in range(N)] for i in range(N):
        xy[i][0], xy[i][1] = map(int, input().split())
    
     i range(N) range N xy[i][0], xy[i][1] = map(int, input().split()) xy[i][0] [i] xy i 0 map(int, input().split()) map int input().split() ().split () input split xy[i][1] [i] xy i 1 dxy = defaultdict(int) dxy defaultdict(int) defaultdict int for i in range(N - 1):
        for j in range(i + 1, N):
            dxy[(xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])] += 1
            dxy[(xy[j][0] - xy[i][0], xy[j][1] - xy[i][1])] += 1
    
     i range(N - 1) range N - 1 N 1 for j in range(i + 1, N):
            dxy[(xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])] += 1
            dxy[(xy[j][0] - xy[i][0], xy[j][1] - xy[i][1])] += 1
    
     j range(i + 1, N) range i + 1 i 1 N dxy[(xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])] += 1 dxy[(xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])] dxy (xy[i][0] - xy[j][0], xy[i][1] - xy[j][1]) xy[i][0] - xy[j][0] xy[i][0] [i] xy i 0 xy[j][0] [j] xy j 0 xy[i][1] - xy[j][1] xy[i][1] [i] xy i 1 xy[j][1] [j] xy j 1 1 dxy[(xy[j][0] - xy[i][0], xy[j][1] - xy[i][1])] += 1 dxy[(xy[j][0] - xy[i][0], xy[j][1] - xy[i][1])] dxy (xy[j][0] - xy[i][0], xy[j][1] - xy[i][1]) xy[j][0] - xy[i][0] xy[j][0] [j] xy j 0 xy[i][0] [i] xy i 0 xy[j][1] - xy[i][1] xy[j][1] [j] xy j 1 xy[i][1] [i] xy i 1 1 zeros = max(dxy.values()) zeros max(dxy.values()) max dxy.values() dxy.values dxy values print(N - zeros) print N - zeros N zeros if __name__ == '__main__':
    solve() __name__ == '__main__' __name__ '__main__' solve() solve def solve():
    N = int(input())
    if N == 1:
        print(1)
        exit()
    xy = [[0, 0] for _ in range(N)]
    for i in range(N):
        xy[i][0], xy[i][1] = map(int, input().split())
    
    dxy = defaultdict(int)
    for i in range(N - 1):
        for j in range(i + 1, N):
            dxy[(xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])] += 1
            dxy[(xy[j][0] - xy[i][0], xy[j][1] - xy[i][1])] += 1
    
    zeros = max(dxy.values())
    print(N - zeros) def solve():
    N = int(input())
    if N == 1:
        print(1)
        exit()
    xy = [[0, 0] for _ in range(N)]
    for i in range(N):
        xy[i][0], xy[i][1] = map(int, input().split())
    
    dxy = defaultdict(int)
    for i in range(N - 1):
        for j in range(i + 1, N):
            dxy[(xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])] += 1
            dxy[(xy[j][0] - xy[i][0], xy[j][1] - xy[i][1])] += 1
    
    zeros = max(dxy.values())
    print(N - zeros) solve
from collections import defaultdict


def solve():
    N = int(input())
    if N == 1:
        print(1)
        exit()
    xy = [[0, 0] for _ in range(N)]
    for i in range(N):
        xy[i][0], xy[i][1] = map(int, input().split())
    
    dxy = defaultdict(int)
    for i in range(N - 1):
        for j in range(i + 1, N):
            dxy[(xy[i][0] - xy[j][0], xy[i][1] - xy[j][1])] += 1
            dxy[(xy[j][0] - xy[i][0], xy[j][1] - xy[i][1])] += 1
    
    zeros = max(dxy.values())
    print(N - zeros)


if __name__ == '__main__':
    solve()
