import sys,os
from collections import defaultdict, deque
from math import ceil, floor
if sys.version_info[1] >= 5:
    from math import gcd
else:
    from fractions import gcd
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    MOD = 10**9+7

    
    N = II()
    coordinates = []
    diffs = defaultdict(int)
    for i in range(N):
        coordinates.append(LMIIS())
    coordinates.sort()
    for i in range(N):
        x1,y1 = coordinates[i]
        for j in range(i+1,N):
            x2,y2 = coordinates[j]
            diffs[(x1-x2,y1-y2)] += 1
    
    max_diff = ()
    max_count = 0

    for k,v in diffs.items():
        if max_count < v:
            max_count = v
            max_diff = k
    print(N-max_count)


if __name__ == '__main__':
    main() import sys,os sys os from collections import defaultdict, deque from math import ceil, floor if sys.version_info[1] >= 5:
    from math import gcd
else:
    from fractions import gcd sys.version_info[1] >= 5 sys.version_info[1] sys.version_info sys version_info 1 5 from math import gcd from fractions import gcd sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 write = sys.stdout.write write sys.stdout.write sys.stdout sys stdout write dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0 dbg (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0 'TERM_PROGRAM' in os.environ 'TERM_PROGRAM' os.environ os environ lambda *something: print(*something) print(*something) print *something something *something lambda *x: 0 0 *x def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    MOD = 10**9+7

    
    N = II()
    coordinates = []
    diffs = defaultdict(int)
    for i in range(N):
        coordinates.append(LMIIS())
    coordinates.sort()
    for i in range(N):
        x1,y1 = coordinates[i]
        for j in range(i+1,N):
            x2,y2 = coordinates[j]
            diffs[(x1-x2,y1-y2)] += 1
    
    max_diff = ()
    max_count = 0

    for k,v in diffs.items():
        if max_count < v:
            max_count = v
            max_diff = k
    print(N-max_count) main input = lambda: given().rstrip() input lambda: given().rstrip() given().rstrip() ().rstrip () given rstrip LMIIS = lambda: list(map(int,input().split())) LMIIS lambda: list(map(int,input().split())) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split II = lambda: int(input()) II lambda: int(input()) int(input()) int input() input MOD = 10**9+7 MOD 10**9+7 10**9 10 9 7 N = II() N II() II coordinates = [] coordinates [] diffs = defaultdict(int) diffs defaultdict(int) defaultdict int for i in range(N):
        coordinates.append(LMIIS())
     i range(N) range N coordinates.append(LMIIS()) coordinates.append coordinates append LMIIS() LMIIS coordinates.sort() coordinates.sort coordinates sort for i in range(N):
        x1,y1 = coordinates[i]
        for j in range(i+1,N):
            x2,y2 = coordinates[j]
            diffs[(x1-x2,y1-y2)] += 1
    
     i range(N) range N x1,y1 = coordinates[i] x1 coordinates[i] coordinates i y1 for j in range(i+1,N):
            x2,y2 = coordinates[j]
            diffs[(x1-x2,y1-y2)] += 1
    
     j range(i+1,N) range i+1 i 1 N x2,y2 = coordinates[j] x2 coordinates[j] coordinates j y2 diffs[(x1-x2,y1-y2)] += 1 diffs[(x1-x2,y1-y2)] diffs (x1-x2,y1-y2) x1-x2 x1 x2 y1-y2 y1 y2 1 max_diff = () max_diff () max_count = 0 max_count 0 for k,v in diffs.items():
        if max_count < v:
            max_count = v
            max_diff = k
     k v diffs.items() diffs.items diffs items if max_count < v:
            max_count = v
            max_diff = k
     max_count < v max_count v max_count = v max_count v max_diff = k max_diff k print(N-max_count) print N-max_count N max_count given=sys.stdin.readline given sys.stdin.readline sys.stdin sys stdin readline if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    MOD = 10**9+7

    
    N = II()
    coordinates = []
    diffs = defaultdict(int)
    for i in range(N):
        coordinates.append(LMIIS())
    coordinates.sort()
    for i in range(N):
        x1,y1 = coordinates[i]
        for j in range(i+1,N):
            x2,y2 = coordinates[j]
            diffs[(x1-x2,y1-y2)] += 1
    
    max_diff = ()
    max_count = 0

    for k,v in diffs.items():
        if max_count < v:
            max_count = v
            max_diff = k
    print(N-max_count) def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    MOD = 10**9+7

    
    N = II()
    coordinates = []
    diffs = defaultdict(int)
    for i in range(N):
        coordinates.append(LMIIS())
    coordinates.sort()
    for i in range(N):
        x1,y1 = coordinates[i]
        for j in range(i+1,N):
            x2,y2 = coordinates[j]
            diffs[(x1-x2,y1-y2)] += 1
    
    max_diff = ()
    max_count = 0

    for k,v in diffs.items():
        if max_count < v:
            max_count = v
            max_diff = k
    print(N-max_count) main dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0 (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0 dbg write = sys.stdout.write sys.stdout.write write
import sys,os
from collections import defaultdict, deque
from math import ceil, floor
if sys.version_info[1] >= 5:
    from math import gcd
else:
    from fractions import gcd
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = (lambda *something: print(*something)) if 'TERM_PROGRAM' in os.environ else lambda *x: 0
def main(given=sys.stdin.readline):
    input = lambda: given().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    MOD = 10**9+7

    
    N = II()
    coordinates = []
    diffs = defaultdict(int)
    for i in range(N):
        coordinates.append(LMIIS())
    coordinates.sort()
    for i in range(N):
        x1,y1 = coordinates[i]
        for j in range(i+1,N):
            x2,y2 = coordinates[j]
            diffs[(x1-x2,y1-y2)] += 1
    
    max_diff = ()
    max_count = 0

    for k,v in diffs.items():
        if max_count < v:
            max_count = v
            max_diff = k
    print(N-max_count)


if __name__ == '__main__':
    main()