import sys

sys.setrecursionlimit(10 ** 5 + 10)


def input(): return sys.stdin.readline().strip()


def resolve():
    N = int(input())
    if N==1:
        print(1)
    else:
        X, Y = [0] * N, [0] * N
        for i in range(N):
            X[i], Y[i] = map(int, input().split())
        ans = 10 ** 10
        for i in range(N):
            for j in range(N):
                if i != j:
                    p = X[j] - X[i]
                    q = Y[j] - Y[i]
                else:
                    continue
                sub = 0
                for k in range(N):
                    for l in range(N):
                        if X[l] - X[k] == p and Y[l] - Y[k] == q:
                            sub += 1
                ans = min(ans, N - sub)
    
        print(ans)


resolve() import sys sys sys.setrecursionlimit(10 ** 5 + 10) sys.setrecursionlimit sys setrecursionlimit 10 ** 5 + 10 10 ** 5 10 5 10 def input(): return sys.stdin.readline().strip() input def resolve():
    N = int(input())
    if N==1:
        print(1)
    else:
        X, Y = [0] * N, [0] * N
        for i in range(N):
            X[i], Y[i] = map(int, input().split())
        ans = 10 ** 10
        for i in range(N):
            for j in range(N):
                if i != j:
                    p = X[j] - X[i]
                    q = Y[j] - Y[i]
                else:
                    continue
                sub = 0
                for k in range(N):
                    for l in range(N):
                        if X[l] - X[k] == p and Y[l] - Y[k] == q:
                            sub += 1
                ans = min(ans, N - sub)
    
        print(ans) resolve N = int(input()) N int(input()) int input() input if N==1:
        print(1)
    else:
        X, Y = [0] * N, [0] * N
        for i in range(N):
            X[i], Y[i] = map(int, input().split())
        ans = 10 ** 10
        for i in range(N):
            for j in range(N):
                if i != j:
                    p = X[j] - X[i]
                    q = Y[j] - Y[i]
                else:
                    continue
                sub = 0
                for k in range(N):
                    for l in range(N):
                        if X[l] - X[k] == p and Y[l] - Y[k] == q:
                            sub += 1
                ans = min(ans, N - sub)
    
        print(ans) N==1 N 1 print(1) print 1 X, Y = [0] * N, [0] * N X [0] * N [0] 0 N Y [0] * N [0] 0 N for i in range(N):
            X[i], Y[i] = map(int, input().split())
         i range(N) range N X[i], Y[i] = map(int, input().split()) X[i] X i map(int, input().split()) map int input().split() ().split () input split Y[i] Y i ans = 10 ** 10 ans 10 ** 10 10 10 for i in range(N):
            for j in range(N):
                if i != j:
                    p = X[j] - X[i]
                    q = Y[j] - Y[i]
                else:
                    continue
                sub = 0
                for k in range(N):
                    for l in range(N):
                        if X[l] - X[k] == p and Y[l] - Y[k] == q:
                            sub += 1
                ans = min(ans, N - sub)
    
         i range(N) range N for j in range(N):
                if i != j:
                    p = X[j] - X[i]
                    q = Y[j] - Y[i]
                else:
                    continue
                sub = 0
                for k in range(N):
                    for l in range(N):
                        if X[l] - X[k] == p and Y[l] - Y[k] == q:
                            sub += 1
                ans = min(ans, N - sub)
    
         j range(N) range N if i != j:
                    p = X[j] - X[i]
                    q = Y[j] - Y[i]
                else:
                    continue
                 i != j i j p = X[j] - X[i] p X[j] - X[i] X[j] X j X[i] X i q = Y[j] - Y[i] q Y[j] - Y[i] Y[j] Y j Y[i] Y i continue sub = 0 sub 0 for k in range(N):
                    for l in range(N):
                        if X[l] - X[k] == p and Y[l] - Y[k] == q:
                            sub += 1
                 k range(N) range N for l in range(N):
                        if X[l] - X[k] == p and Y[l] - Y[k] == q:
                            sub += 1
                 l range(N) range N if X[l] - X[k] == p and Y[l] - Y[k] == q:
                            sub += 1
                 X[l] - X[k] == p and Y[l] - Y[k] == q X[l] - X[k] == p X[l] - X[k] X[l] X l X[k] X k p Y[l] - Y[k] == q Y[l] - Y[k] Y[l] Y l Y[k] Y k 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 resolve() resolve def resolve():
    N = int(input())
    if N==1:
        print(1)
    else:
        X, Y = [0] * N, [0] * N
        for i in range(N):
            X[i], Y[i] = map(int, input().split())
        ans = 10 ** 10
        for i in range(N):
            for j in range(N):
                if i != j:
                    p = X[j] - X[i]
                    q = Y[j] - Y[i]
                else:
                    continue
                sub = 0
                for k in range(N):
                    for l in range(N):
                        if X[l] - X[k] == p and Y[l] - Y[k] == q:
                            sub += 1
                ans = min(ans, N - sub)
    
        print(ans) def resolve():
    N = int(input())
    if N==1:
        print(1)
    else:
        X, Y = [0] * N, [0] * N
        for i in range(N):
            X[i], Y[i] = map(int, input().split())
        ans = 10 ** 10
        for i in range(N):
            for j in range(N):
                if i != j:
                    p = X[j] - X[i]
                    q = Y[j] - Y[i]
                else:
                    continue
                sub = 0
                for k in range(N):
                    for l in range(N):
                        if X[l] - X[k] == p and Y[l] - Y[k] == q:
                            sub += 1
                ans = min(ans, N - sub)
    
        print(ans) resolve def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input
import sys

sys.setrecursionlimit(10 ** 5 + 10)


def input(): return sys.stdin.readline().strip()


def resolve():
    N = int(input())
    if N==1:
        print(1)
    else:
        X, Y = [0] * N, [0] * N
        for i in range(N):
            X[i], Y[i] = map(int, input().split())
        ans = 10 ** 10
        for i in range(N):
            for j in range(N):
                if i != j:
                    p = X[j] - X[i]
                    q = Y[j] - Y[i]
                else:
                    continue
                sub = 0
                for k in range(N):
                    for l in range(N):
                        if X[l] - X[k] == p and Y[l] - Y[k] == q:
                            sub += 1
                ans = min(ans, N - sub)
    
        print(ans)


resolve()