def main():
    import sys
    input = sys.stdin.buffer.readline
    N = int(input())
    XY = [[int(i) for i in input().split()] for j in range(N)]
    XY.sort()
    from collections import Counter
    c = Counter()
    for i in range(N-1):
        for j in range(i+1, N):
            p = XY[j][0] - XY[i][0]
            q = XY[j][1] - XY[i][1]
            c[(p, q)] += 1
    ans = N - (c.most_common()[0][1] if c else 0)
    print(ans)


if __name__ == '__main__':
    main() def main():
    import sys
    input = sys.stdin.buffer.readline
    N = int(input())
    XY = [[int(i) for i in input().split()] for j in range(N)]
    XY.sort()
    from collections import Counter
    c = Counter()
    for i in range(N-1):
        for j in range(i+1, N):
            p = XY[j][0] - XY[i][0]
            q = XY[j][1] - XY[i][1]
            c[(p, q)] += 1
    ans = N - (c.most_common()[0][1] if c else 0)
    print(ans) main import sys sys input = sys.stdin.buffer.readline input sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline N = int(input()) N int(input()) int input() input [int(i) for i in input().split()] for j in range(N) for j in range(N) j range(N) range N for j in range(N) [int(i) for i in input().split()] XY = [[int(i) for i in input().split()] for j in range(N)] XY [[int(i) for i in input().split()] for j in range(N)] XY.sort() XY.sort XY sort from collections import Counter c = Counter() c Counter() Counter for i in range(N-1):
        for j in range(i+1, N):
            p = XY[j][0] - XY[i][0]
            q = XY[j][1] - XY[i][1]
            c[(p, q)] += 1
     i range(N-1) range N-1 N 1 for j in range(i+1, N):
            p = XY[j][0] - XY[i][0]
            q = XY[j][1] - XY[i][1]
            c[(p, q)] += 1
     j range(i+1, N) range i+1 i 1 N p = XY[j][0] - XY[i][0] p XY[j][0] - XY[i][0] XY[j][0] [j] XY j 0 XY[i][0] [i] XY i 0 q = XY[j][1] - XY[i][1] q XY[j][1] - XY[i][1] XY[j][1] [j] XY j 1 XY[i][1] [i] XY i 1 c[(p, q)] += 1 c[(p, q)] c (p, q) p q 1 ans = N - (c.most_common()[0][1] if c else 0) ans N - (c.most_common()[0][1] if c else 0) N c.most_common()[0][1] if c else 0 c c.most_common()[0][1] [0] c.most_common() c.most_common c most_common 0 1 0 print(ans) print ans if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    import sys
    input = sys.stdin.buffer.readline
    N = int(input())
    XY = [[int(i) for i in input().split()] for j in range(N)]
    XY.sort()
    from collections import Counter
    c = Counter()
    for i in range(N-1):
        for j in range(i+1, N):
            p = XY[j][0] - XY[i][0]
            q = XY[j][1] - XY[i][1]
            c[(p, q)] += 1
    ans = N - (c.most_common()[0][1] if c else 0)
    print(ans) def main():
    import sys
    input = sys.stdin.buffer.readline
    N = int(input())
    XY = [[int(i) for i in input().split()] for j in range(N)]
    XY.sort()
    from collections import Counter
    c = Counter()
    for i in range(N-1):
        for j in range(i+1, N):
            p = XY[j][0] - XY[i][0]
            q = XY[j][1] - XY[i][1]
            c[(p, q)] += 1
    ans = N - (c.most_common()[0][1] if c else 0)
    print(ans) main
def main():
    import sys
    input = sys.stdin.buffer.readline
    N = int(input())
    XY = [[int(i) for i in input().split()] for j in range(N)]
    XY.sort()
    from collections import Counter
    c = Counter()
    for i in range(N-1):
        for j in range(i+1, N):
            p = XY[j][0] - XY[i][0]
            q = XY[j][1] - XY[i][1]
            c[(p, q)] += 1
    ans = N - (c.most_common()[0][1] if c else 0)
    print(ans)


if __name__ == '__main__':
    main()
