def main():
    N = int(input())
    X = []
    for _ in range(N):
        x, y = map(int,input().split())
        X.append([x,y])

    d = [[(0,0)] * N for _ in range(N)]
    b = set()
    for i in range(N):
        for j in range(N):
            d[i][j] = (X[i][0] - X[j][0], X[i][1] - X[j][1])
            if not (X[i][0] - X[j][0] == 0 and X[i][1] - X[j][1] == 0):
                b.add((X[i][0] - X[j][0], X[i][1] - X[j][1]))
    
    cnt = 0
    for a in b:
        tmp = 0
        for i in range(N):
            tmp += d[i].count(a)

        cnt = max(cnt, tmp)
    
    print(1 + (N - 1 - cnt))
            


if __name__ == "__main__":
    main() def main():
    N = int(input())
    X = []
    for _ in range(N):
        x, y = map(int,input().split())
        X.append([x,y])

    d = [[(0,0)] * N for _ in range(N)]
    b = set()
    for i in range(N):
        for j in range(N):
            d[i][j] = (X[i][0] - X[j][0], X[i][1] - X[j][1])
            if not (X[i][0] - X[j][0] == 0 and X[i][1] - X[j][1] == 0):
                b.add((X[i][0] - X[j][0], X[i][1] - X[j][1]))
    
    cnt = 0
    for a in b:
        tmp = 0
        for i in range(N):
            tmp += d[i].count(a)

        cnt = max(cnt, tmp)
    
    print(1 + (N - 1 - cnt))
             main N = int(input()) N int(input()) int input() input X = [] X [] for _ in range(N):
        x, y = map(int,input().split())
        X.append([x,y])

     _ range(N) range N x, y = map(int,input().split()) x map(int,input().split()) map int input().split() ().split () input split y X.append([x,y]) X.append X append [x,y] x y [(0,0)] * N for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) [(0,0)] * N [(0,0)] (0,0) 0 0 N d = [[(0,0)] * N for _ in range(N)] d [[(0,0)] * N for _ in range(N)] b = set() b set() set for i in range(N):
        for j in range(N):
            d[i][j] = (X[i][0] - X[j][0], X[i][1] - X[j][1])
            if not (X[i][0] - X[j][0] == 0 and X[i][1] - X[j][1] == 0):
                b.add((X[i][0] - X[j][0], X[i][1] - X[j][1]))
    
     i range(N) range N for j in range(N):
            d[i][j] = (X[i][0] - X[j][0], X[i][1] - X[j][1])
            if not (X[i][0] - X[j][0] == 0 and X[i][1] - X[j][1] == 0):
                b.add((X[i][0] - X[j][0], X[i][1] - X[j][1]))
    
     j range(N) range N d[i][j] = (X[i][0] - X[j][0], X[i][1] - X[j][1]) d[i][j] [i] d i j (X[i][0] - X[j][0], X[i][1] - X[j][1]) X[i][0] - X[j][0] X[i][0] [i] X i 0 X[j][0] [j] X j 0 X[i][1] - X[j][1] X[i][1] [i] X i 1 X[j][1] [j] X j 1 if not (X[i][0] - X[j][0] == 0 and X[i][1] - X[j][1] == 0):
                b.add((X[i][0] - X[j][0], X[i][1] - X[j][1]))
    
     not (X[i][0] - X[j][0] == 0 and X[i][1] - X[j][1] == 0) X[i][0] - X[j][0] == 0 and X[i][1] - X[j][1] == 0 X[i][0] - X[j][0] == 0 X[i][0] - X[j][0] X[i][0] [i] X i 0 X[j][0] [j] X j 0 0 X[i][1] - X[j][1] == 0 X[i][1] - X[j][1] X[i][1] [i] X i 1 X[j][1] [j] X j 1 0 b.add((X[i][0] - X[j][0], X[i][1] - X[j][1])) b.add b add (X[i][0] - X[j][0], X[i][1] - X[j][1]) X[i][0] - X[j][0] X[i][0] [i] X i 0 X[j][0] [j] X j 0 X[i][1] - X[j][1] X[i][1] [i] X i 1 X[j][1] [j] X j 1 cnt = 0 cnt 0 for a in b:
        tmp = 0
        for i in range(N):
            tmp += d[i].count(a)

        cnt = max(cnt, tmp)
    
     a b tmp = 0 tmp 0 for i in range(N):
            tmp += d[i].count(a)

         i range(N) range N tmp += d[i].count(a) tmp d[i].count(a) [i].count [i] d i count a cnt = max(cnt, tmp) cnt max(cnt, tmp) max cnt tmp print(1 + (N - 1 - cnt)) print 1 + (N - 1 - cnt) 1 N - 1 - cnt N - 1 N 1 cnt if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    N = int(input())
    X = []
    for _ in range(N):
        x, y = map(int,input().split())
        X.append([x,y])

    d = [[(0,0)] * N for _ in range(N)]
    b = set()
    for i in range(N):
        for j in range(N):
            d[i][j] = (X[i][0] - X[j][0], X[i][1] - X[j][1])
            if not (X[i][0] - X[j][0] == 0 and X[i][1] - X[j][1] == 0):
                b.add((X[i][0] - X[j][0], X[i][1] - X[j][1]))
    
    cnt = 0
    for a in b:
        tmp = 0
        for i in range(N):
            tmp += d[i].count(a)

        cnt = max(cnt, tmp)
    
    print(1 + (N - 1 - cnt))
             def main():
    N = int(input())
    X = []
    for _ in range(N):
        x, y = map(int,input().split())
        X.append([x,y])

    d = [[(0,0)] * N for _ in range(N)]
    b = set()
    for i in range(N):
        for j in range(N):
            d[i][j] = (X[i][0] - X[j][0], X[i][1] - X[j][1])
            if not (X[i][0] - X[j][0] == 0 and X[i][1] - X[j][1] == 0):
                b.add((X[i][0] - X[j][0], X[i][1] - X[j][1]))
    
    cnt = 0
    for a in b:
        tmp = 0
        for i in range(N):
            tmp += d[i].count(a)

        cnt = max(cnt, tmp)
    
    print(1 + (N - 1 - cnt))
             main
def main():
    N = int(input())
    X = []
    for _ in range(N):
        x, y = map(int,input().split())
        X.append([x,y])

    d = [[(0,0)] * N for _ in range(N)]
    b = set()
    for i in range(N):
        for j in range(N):
            d[i][j] = (X[i][0] - X[j][0], X[i][1] - X[j][1])
            if not (X[i][0] - X[j][0] == 0 and X[i][1] - X[j][1] == 0):
                b.add((X[i][0] - X[j][0], X[i][1] - X[j][1]))
    
    cnt = 0
    for a in b:
        tmp = 0
        for i in range(N):
            tmp += d[i].count(a)

        cnt = max(cnt, tmp)
    
    print(1 + (N - 1 - cnt))
            


if __name__ == "__main__":
    main()