import sys
from collections import defaultdict

read = sys.stdin.read
readline = sys.stdin.buffer.readline

sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    N = int(readline())
    if N==1:
        print(1)
        sys.exit()
    XY = list(list(map(int, readline().split())) for _ in range(N))
    d = defaultdict(int)
    for i in range(N-1):
        x1, y1 = XY[i]
        for j in range(i+1,N):
            x2, y2 = XY[j]
            x = x2-x1
            y = y2-y1
            d[x,y] += 1
            d[-x,-y] += 1
    print(N-max(d.values()))



if __name__ == '__main__':
    main() import sys sys from collections import defaultdict read = sys.stdin.read read sys.stdin.read sys.stdin sys stdin read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline sys.setrecursionlimit(10 ** 8) sys.setrecursionlimit sys setrecursionlimit 10 ** 8 10 8 INF = float('inf') INF float('inf') float 'inf' MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 def main():
    N = int(readline())
    if N==1:
        print(1)
        sys.exit()
    XY = list(list(map(int, readline().split())) for _ in range(N))
    d = defaultdict(int)
    for i in range(N-1):
        x1, y1 = XY[i]
        for j in range(i+1,N):
            x2, y2 = XY[j]
            x = x2-x1
            y = y2-y1
            d[x,y] += 1
            d[-x,-y] += 1
    print(N-max(d.values())) main N = int(readline()) N int(readline()) int readline() readline if N==1:
        print(1)
        sys.exit()
     N==1 N 1 print(1) print 1 sys.exit() sys.exit sys exit XY = list(list(map(int, readline().split())) for _ in range(N)) XY list(list(map(int, readline().split())) for _ in range(N)) list list(map(int, readline().split())) list map(int, readline().split()) map int readline().split() ().split () readline split d = defaultdict(int) d defaultdict(int) defaultdict int for i in range(N-1):
        x1, y1 = XY[i]
        for j in range(i+1,N):
            x2, y2 = XY[j]
            x = x2-x1
            y = y2-y1
            d[x,y] += 1
            d[-x,-y] += 1
     i range(N-1) range N-1 N 1 x1, y1 = XY[i] x1 XY[i] XY i y1 for j in range(i+1,N):
            x2, y2 = XY[j]
            x = x2-x1
            y = y2-y1
            d[x,y] += 1
            d[-x,-y] += 1
     j range(i+1,N) range i+1 i 1 N x2, y2 = XY[j] x2 XY[j] XY j y2 x = x2-x1 x x2-x1 x2 x1 y = y2-y1 y y2-y1 y2 y1 d[x,y] += 1 d[x,y] d x 1 d[-x,-y] += 1 d[-x,-y] d -x x 1 print(N-max(d.values())) print N-max(d.values()) N max(d.values()) max d.values() d.values d values if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main read = sys.stdin.read sys.stdin.read read INF = float('inf') float('inf') INF MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD def main():
    N = int(readline())
    if N==1:
        print(1)
        sys.exit()
    XY = list(list(map(int, readline().split())) for _ in range(N))
    d = defaultdict(int)
    for i in range(N-1):
        x1, y1 = XY[i]
        for j in range(i+1,N):
            x2, y2 = XY[j]
            x = x2-x1
            y = y2-y1
            d[x,y] += 1
            d[-x,-y] += 1
    print(N-max(d.values())) def main():
    N = int(readline())
    if N==1:
        print(1)
        sys.exit()
    XY = list(list(map(int, readline().split())) for _ in range(N))
    d = defaultdict(int)
    for i in range(N-1):
        x1, y1 = XY[i]
        for j in range(i+1,N):
            x2, y2 = XY[j]
            x = x2-x1
            y = y2-y1
            d[x,y] += 1
            d[-x,-y] += 1
    print(N-max(d.values())) main readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline
import sys
from collections import defaultdict

read = sys.stdin.read
readline = sys.stdin.buffer.readline

sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    N = int(readline())
    if N==1:
        print(1)
        sys.exit()
    XY = list(list(map(int, readline().split())) for _ in range(N))
    d = defaultdict(int)
    for i in range(N-1):
        x1, y1 = XY[i]
        for j in range(i+1,N):
            x2, y2 = XY[j]
            x = x2-x1
            y = y2-y1
            d[x,y] += 1
            d[-x,-y] += 1
    print(N-max(d.values()))



if __name__ == '__main__':
    main()
