def solve():
    N = int(input())
    x = []
    y = [] 

    if N == 1:
        print("1")
        return

    ans = float('inf')
    for i in range(N):
        input_x, input_y = map(int,input().split())
        x.append(input_x)
        y.append(input_y)

    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            p = x[i] - x[j]
            q = y[i] - y[j]

            sub = 0
            for i2 in range(N):
                for j2 in range(N):
                    if i2 == j2:
                        continue

                    if x[i2] - x[j2] == p and y[i2] - y[j2] == q:
                        sub += 1
            ans = min(ans, N-sub)
    
    print(ans)

if __name__ == '__main__':
    solve() def solve():
    N = int(input())
    x = []
    y = [] 

    if N == 1:
        print("1")
        return

    ans = float('inf')
    for i in range(N):
        input_x, input_y = map(int,input().split())
        x.append(input_x)
        y.append(input_y)

    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            p = x[i] - x[j]
            q = y[i] - y[j]

            sub = 0
            for i2 in range(N):
                for j2 in range(N):
                    if i2 == j2:
                        continue

                    if x[i2] - x[j2] == p and y[i2] - y[j2] == q:
                        sub += 1
            ans = min(ans, N-sub)
    
    print(ans) solve N = int(input()) N int(input()) int input() input x = [] x [] y = [] y [] if N == 1:
        print("1")
        return

     N == 1 N 1 print("1") print "1" return ans = float('inf') ans float('inf') float 'inf' for i in range(N):
        input_x, input_y = map(int,input().split())
        x.append(input_x)
        y.append(input_y)

     i range(N) range N input_x, input_y = map(int,input().split()) input_x map(int,input().split()) map int input().split() ().split () input split input_y x.append(input_x) x.append x append input_x y.append(input_y) y.append y append input_y for i in range(N):
        for j in range(N):
            if i == j:
                continue
            p = x[i] - x[j]
            q = y[i] - y[j]

            sub = 0
            for i2 in range(N):
                for j2 in range(N):
                    if i2 == j2:
                        continue

                    if x[i2] - x[j2] == p and y[i2] - y[j2] == q:
                        sub += 1
            ans = min(ans, N-sub)
    
     i range(N) range N for j in range(N):
            if i == j:
                continue
            p = x[i] - x[j]
            q = y[i] - y[j]

            sub = 0
            for i2 in range(N):
                for j2 in range(N):
                    if i2 == j2:
                        continue

                    if x[i2] - x[j2] == p and y[i2] - y[j2] == q:
                        sub += 1
            ans = min(ans, N-sub)
    
     j range(N) range N if i == j:
                continue
             i == j i j continue p = x[i] - x[j] p x[i] - x[j] x[i] x i x[j] x j q = y[i] - y[j] q y[i] - y[j] y[i] y i y[j] y j sub = 0 sub 0 for i2 in range(N):
                for j2 in range(N):
                    if i2 == j2:
                        continue

                    if x[i2] - x[j2] == p and y[i2] - y[j2] == q:
                        sub += 1
             i2 range(N) range N for j2 in range(N):
                    if i2 == j2:
                        continue

                    if x[i2] - x[j2] == p and y[i2] - y[j2] == q:
                        sub += 1
             j2 range(N) range N if i2 == j2:
                        continue

                     i2 == j2 i2 j2 continue if x[i2] - x[j2] == p and y[i2] - y[j2] == q:
                        sub += 1
             x[i2] - x[j2] == p and y[i2] - y[j2] == q x[i2] - x[j2] == p x[i2] - x[j2] x[i2] x i2 x[j2] x j2 p y[i2] - y[j2] == q y[i2] - y[j2] y[i2] y i2 y[j2] y j2 q sub += 1 sub 1 ans = min(ans, N-sub) ans min(ans, N-sub) min ans N-sub N sub print(ans) print ans if __name__ == '__main__':
    solve() __name__ == '__main__' __name__ '__main__' solve() solve def solve():
    N = int(input())
    x = []
    y = [] 

    if N == 1:
        print("1")
        return

    ans = float('inf')
    for i in range(N):
        input_x, input_y = map(int,input().split())
        x.append(input_x)
        y.append(input_y)

    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            p = x[i] - x[j]
            q = y[i] - y[j]

            sub = 0
            for i2 in range(N):
                for j2 in range(N):
                    if i2 == j2:
                        continue

                    if x[i2] - x[j2] == p and y[i2] - y[j2] == q:
                        sub += 1
            ans = min(ans, N-sub)
    
    print(ans) def solve():
    N = int(input())
    x = []
    y = [] 

    if N == 1:
        print("1")
        return

    ans = float('inf')
    for i in range(N):
        input_x, input_y = map(int,input().split())
        x.append(input_x)
        y.append(input_y)

    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            p = x[i] - x[j]
            q = y[i] - y[j]

            sub = 0
            for i2 in range(N):
                for j2 in range(N):
                    if i2 == j2:
                        continue

                    if x[i2] - x[j2] == p and y[i2] - y[j2] == q:
                        sub += 1
            ans = min(ans, N-sub)
    
    print(ans) solve
def solve():
    N = int(input())
    x = []
    y = [] 

    if N == 1:
        print("1")
        return

    ans = float('inf')
    for i in range(N):
        input_x, input_y = map(int,input().split())
        x.append(input_x)
        y.append(input_y)

    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            p = x[i] - x[j]
            q = y[i] - y[j]

            sub = 0
            for i2 in range(N):
                for j2 in range(N):
                    if i2 == j2:
                        continue

                    if x[i2] - x[j2] == p and y[i2] - y[j2] == q:
                        sub += 1
            ans = min(ans, N-sub)
    
    print(ans)

if __name__ == '__main__':
    solve()