def main():
    balls = int(input())
    coordinates = []
    answer = 1
    count_delta = {}
    for _ in range(balls):
        coordinates.append(list(map(int, input().split())))
    coordinates.sort()
    if balls > 1:
        for i in range(balls):
            for j in range(i + 1, balls):
                d = (coordinates[j][0] - coordinates[i][0], coordinates[j][1] - coordinates[i][1])
                if d in count_delta:
                    count_delta[d] += 1
                else:
                    count_delta[d] = 1
        answer = balls - max(count_delta.values())
    print(answer)


if __name__ == '__main__':
    main()
 def main():
    balls = int(input())
    coordinates = []
    answer = 1
    count_delta = {}
    for _ in range(balls):
        coordinates.append(list(map(int, input().split())))
    coordinates.sort()
    if balls > 1:
        for i in range(balls):
            for j in range(i + 1, balls):
                d = (coordinates[j][0] - coordinates[i][0], coordinates[j][1] - coordinates[i][1])
                if d in count_delta:
                    count_delta[d] += 1
                else:
                    count_delta[d] = 1
        answer = balls - max(count_delta.values())
    print(answer) main balls = int(input()) balls int(input()) int input() input coordinates = [] coordinates [] answer = 1 answer 1 count_delta = {} count_delta {} for _ in range(balls):
        coordinates.append(list(map(int, input().split())))
     _ range(balls) range balls coordinates.append(list(map(int, input().split()))) coordinates.append coordinates append list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split coordinates.sort() coordinates.sort coordinates sort if balls > 1:
        for i in range(balls):
            for j in range(i + 1, balls):
                d = (coordinates[j][0] - coordinates[i][0], coordinates[j][1] - coordinates[i][1])
                if d in count_delta:
                    count_delta[d] += 1
                else:
                    count_delta[d] = 1
        answer = balls - max(count_delta.values())
     balls > 1 balls 1 for i in range(balls):
            for j in range(i + 1, balls):
                d = (coordinates[j][0] - coordinates[i][0], coordinates[j][1] - coordinates[i][1])
                if d in count_delta:
                    count_delta[d] += 1
                else:
                    count_delta[d] = 1
         i range(balls) range balls for j in range(i + 1, balls):
                d = (coordinates[j][0] - coordinates[i][0], coordinates[j][1] - coordinates[i][1])
                if d in count_delta:
                    count_delta[d] += 1
                else:
                    count_delta[d] = 1
         j range(i + 1, balls) range i + 1 i 1 balls d = (coordinates[j][0] - coordinates[i][0], coordinates[j][1] - coordinates[i][1]) d (coordinates[j][0] - coordinates[i][0], coordinates[j][1] - coordinates[i][1]) coordinates[j][0] - coordinates[i][0] coordinates[j][0] [j] coordinates j 0 coordinates[i][0] [i] coordinates i 0 coordinates[j][1] - coordinates[i][1] coordinates[j][1] [j] coordinates j 1 coordinates[i][1] [i] coordinates i 1 if d in count_delta:
                    count_delta[d] += 1
                else:
                    count_delta[d] = 1
         d in count_delta d count_delta count_delta[d] += 1 count_delta[d] count_delta d 1 count_delta[d] = 1 count_delta[d] count_delta d 1 answer = balls - max(count_delta.values()) answer balls - max(count_delta.values()) balls max(count_delta.values()) max count_delta.values() count_delta.values count_delta values print(answer) print answer if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    balls = int(input())
    coordinates = []
    answer = 1
    count_delta = {}
    for _ in range(balls):
        coordinates.append(list(map(int, input().split())))
    coordinates.sort()
    if balls > 1:
        for i in range(balls):
            for j in range(i + 1, balls):
                d = (coordinates[j][0] - coordinates[i][0], coordinates[j][1] - coordinates[i][1])
                if d in count_delta:
                    count_delta[d] += 1
                else:
                    count_delta[d] = 1
        answer = balls - max(count_delta.values())
    print(answer) def main():
    balls = int(input())
    coordinates = []
    answer = 1
    count_delta = {}
    for _ in range(balls):
        coordinates.append(list(map(int, input().split())))
    coordinates.sort()
    if balls > 1:
        for i in range(balls):
            for j in range(i + 1, balls):
                d = (coordinates[j][0] - coordinates[i][0], coordinates[j][1] - coordinates[i][1])
                if d in count_delta:
                    count_delta[d] += 1
                else:
                    count_delta[d] = 1
        answer = balls - max(count_delta.values())
    print(answer) main
def main():
    balls = int(input())
    coordinates = []
    answer = 1
    count_delta = {}
    for _ in range(balls):
        coordinates.append(list(map(int, input().split())))
    coordinates.sort()
    if balls > 1:
        for i in range(balls):
            for j in range(i + 1, balls):
                d = (coordinates[j][0] - coordinates[i][0], coordinates[j][1] - coordinates[i][1])
                if d in count_delta:
                    count_delta[d] += 1
                else:
                    count_delta[d] = 1
        answer = balls - max(count_delta.values())
    print(answer)


if __name__ == '__main__':
    main()

