import sys
input = sys.stdin.readline

def main():
    N = int(input())
    xy = sorted([list(map(int, input().split())) for i in range(N)], key=lambda x: (x[0], x[1]))
    
    dic = {}
    max_ = 0
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            p = xy[i][0] - xy[j][0]
            q = xy[i][1] - xy[j][1]
            if (p, q) in dic:
                dic[(p, q)] += 1
            else:
                dic[(p, q)] = 1
            max_ = max(max_, dic[(p, q)])
    
    print(N - max_)

if __name__ == "__main__":
    main() import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def main():
    N = int(input())
    xy = sorted([list(map(int, input().split())) for i in range(N)], key=lambda x: (x[0], x[1]))
    
    dic = {}
    max_ = 0
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            p = xy[i][0] - xy[j][0]
            q = xy[i][1] - xy[j][1]
            if (p, q) in dic:
                dic[(p, q)] += 1
            else:
                dic[(p, q)] = 1
            max_ = max(max_, dic[(p, q)])
    
    print(N - max_) main N = int(input()) N int(input()) int input() input list(map(int, input().split())) for i in range(N) for i in range(N) i range(N) range N for i in range(N) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split xy = sorted([list(map(int, input().split())) for i in range(N)], key=lambda x: (x[0], x[1])) xy sorted([list(map(int, input().split())) for i in range(N)], key=lambda x: (x[0], x[1])) sorted [list(map(int, input().split())) for i in range(N)] key=lambda x: (x[0], x[1]) key lambda x: (x[0], x[1]) (x[0], x[1]) x[0] x 0 x[1] x 1 x dic = {} dic {} max_ = 0 max_ 0 for i in range(N):
        for j in range(N):
            if i == j:
                continue
            p = xy[i][0] - xy[j][0]
            q = xy[i][1] - xy[j][1]
            if (p, q) in dic:
                dic[(p, q)] += 1
            else:
                dic[(p, q)] = 1
            max_ = max(max_, dic[(p, q)])
    
     i range(N) range N for j in range(N):
            if i == j:
                continue
            p = xy[i][0] - xy[j][0]
            q = xy[i][1] - xy[j][1]
            if (p, q) in dic:
                dic[(p, q)] += 1
            else:
                dic[(p, q)] = 1
            max_ = max(max_, dic[(p, q)])
    
     j range(N) range N if i == j:
                continue
             i == j i j continue p = xy[i][0] - xy[j][0] p xy[i][0] - xy[j][0] xy[i][0] [i] xy i 0 xy[j][0] [j] xy j 0 q = xy[i][1] - xy[j][1] q xy[i][1] - xy[j][1] xy[i][1] [i] xy i 1 xy[j][1] [j] xy j 1 if (p, q) in dic:
                dic[(p, q)] += 1
            else:
                dic[(p, q)] = 1
             (p, q) in dic (p, q) p q dic dic[(p, q)] += 1 dic[(p, q)] dic (p, q) p q 1 dic[(p, q)] = 1 dic[(p, q)] dic (p, q) p q 1 max_ = max(max_, dic[(p, q)]) max_ max(max_, dic[(p, q)]) max max_ dic[(p, q)] dic (p, q) p q print(N - max_) print N - max_ N max_ if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main input = sys.stdin.readline sys.stdin.readline input def main():
    N = int(input())
    xy = sorted([list(map(int, input().split())) for i in range(N)], key=lambda x: (x[0], x[1]))
    
    dic = {}
    max_ = 0
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            p = xy[i][0] - xy[j][0]
            q = xy[i][1] - xy[j][1]
            if (p, q) in dic:
                dic[(p, q)] += 1
            else:
                dic[(p, q)] = 1
            max_ = max(max_, dic[(p, q)])
    
    print(N - max_) def main():
    N = int(input())
    xy = sorted([list(map(int, input().split())) for i in range(N)], key=lambda x: (x[0], x[1]))
    
    dic = {}
    max_ = 0
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            p = xy[i][0] - xy[j][0]
            q = xy[i][1] - xy[j][1]
            if (p, q) in dic:
                dic[(p, q)] += 1
            else:
                dic[(p, q)] = 1
            max_ = max(max_, dic[(p, q)])
    
    print(N - max_) main
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    xy = sorted([list(map(int, input().split())) for i in range(N)], key=lambda x: (x[0], x[1]))
    
    dic = {}
    max_ = 0
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            p = xy[i][0] - xy[j][0]
            q = xy[i][1] - xy[j][1]
            if (p, q) in dic:
                dic[(p, q)] += 1
            else:
                dic[(p, q)] = 1
            max_ = max(max_, dic[(p, q)])
    
    print(N - max_)

if __name__ == "__main__":
    main()