import sys
input = sys.stdin.readline
def main():
    N = int(input())
    C = [list(map(int, input().split())) for i in range(N)]
    ans = N
    for a,b in C:
        for x, y in C:
            if a == x and b == y:
                continue
            p, q = a -x , b - y
            CNT = 0
            for u, v in C:
                for s, t in C:
                    if u == s and v == t:
                        continue
                    if u-s == p and v-t == q:
                        CNT += 1
            ans = min(ans, N-CNT)
    print(ans)

if __name__ == '__main__':
    main() import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def main():
    N = int(input())
    C = [list(map(int, input().split())) for i in range(N)]
    ans = N
    for a,b in C:
        for x, y in C:
            if a == x and b == y:
                continue
            p, q = a -x , b - y
            CNT = 0
            for u, v in C:
                for s, t in C:
                    if u == s and v == t:
                        continue
                    if u-s == p and v-t == q:
                        CNT += 1
            ans = min(ans, N-CNT)
    print(ans) main N = int(input()) N int(input()) int input() input list(map(int, input().split())) for i in range(N) for i in range(N) i range(N) range N for i in range(N) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split C = [list(map(int, input().split())) for i in range(N)] C [list(map(int, input().split())) for i in range(N)] ans = N ans N for a,b in C:
        for x, y in C:
            if a == x and b == y:
                continue
            p, q = a -x , b - y
            CNT = 0
            for u, v in C:
                for s, t in C:
                    if u == s and v == t:
                        continue
                    if u-s == p and v-t == q:
                        CNT += 1
            ans = min(ans, N-CNT)
     a b C for x, y in C:
            if a == x and b == y:
                continue
            p, q = a -x , b - y
            CNT = 0
            for u, v in C:
                for s, t in C:
                    if u == s and v == t:
                        continue
                    if u-s == p and v-t == q:
                        CNT += 1
            ans = min(ans, N-CNT)
     x y C if a == x and b == y:
                continue
             a == x and b == y a == x a x b == y b y continue p, q = a -x , b - y p a -x a x q b - y b y CNT = 0 CNT 0 for u, v in C:
                for s, t in C:
                    if u == s and v == t:
                        continue
                    if u-s == p and v-t == q:
                        CNT += 1
             u v C for s, t in C:
                    if u == s and v == t:
                        continue
                    if u-s == p and v-t == q:
                        CNT += 1
             s t C if u == s and v == t:
                        continue
                     u == s and v == t u == s u s v == t v t continue if u-s == p and v-t == q:
                        CNT += 1
             u-s == p and v-t == q u-s == p u-s u s p v-t == q v-t v t q CNT += 1 CNT 1 ans = min(ans, N-CNT) ans min(ans, N-CNT) min ans N-CNT N CNT print(ans) print ans if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main input = sys.stdin.readline sys.stdin.readline input def main():
    N = int(input())
    C = [list(map(int, input().split())) for i in range(N)]
    ans = N
    for a,b in C:
        for x, y in C:
            if a == x and b == y:
                continue
            p, q = a -x , b - y
            CNT = 0
            for u, v in C:
                for s, t in C:
                    if u == s and v == t:
                        continue
                    if u-s == p and v-t == q:
                        CNT += 1
            ans = min(ans, N-CNT)
    print(ans) def main():
    N = int(input())
    C = [list(map(int, input().split())) for i in range(N)]
    ans = N
    for a,b in C:
        for x, y in C:
            if a == x and b == y:
                continue
            p, q = a -x , b - y
            CNT = 0
            for u, v in C:
                for s, t in C:
                    if u == s and v == t:
                        continue
                    if u-s == p and v-t == q:
                        CNT += 1
            ans = min(ans, N-CNT)
    print(ans) main
import sys
input = sys.stdin.readline
def main():
    N = int(input())
    C = [list(map(int, input().split())) for i in range(N)]
    ans = N
    for a,b in C:
        for x, y in C:
            if a == x and b == y:
                continue
            p, q = a -x , b - y
            CNT = 0
            for u, v in C:
                for s, t in C:
                    if u == s and v == t:
                        continue
                    if u-s == p and v-t == q:
                        CNT += 1
            ans = min(ans, N-CNT)
    print(ans)

if __name__ == '__main__':
    main()