import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())
    XY = sorted([list(map(int, input().split())) for _ in range(n)])

    if n == 1:
        print(1)
        exit()

    res = n
    for i in range(n):
        x1, y1 = XY[i]
        for j in range(n):
            if i == j:
                continue
            x2, y2 = XY[j]
            dx, dy = x2 - x1, y2 - y1

            cnt = 0
            for k in range(n):
                x3, y3 = XY[k]
                for l in range(n):
                    if k == l:
                        continue
                    x4, y4 = XY[l]
                    if dx == x4 - x3 and dy == y4 - y3:
                        cnt += 1

            res = min(res, n - cnt)

    print(res)


if __name__ == '__main__':
    resolve() import sys sys sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 f_inf = float('inf') f_inf float('inf') float 'inf' mod = 10 ** 9 + 7 mod 10 ** 9 + 7 10 ** 9 10 9 7 def resolve():
    n = int(input())
    XY = sorted([list(map(int, input().split())) for _ in range(n)])

    if n == 1:
        print(1)
        exit()

    res = n
    for i in range(n):
        x1, y1 = XY[i]
        for j in range(n):
            if i == j:
                continue
            x2, y2 = XY[j]
            dx, dy = x2 - x1, y2 - y1

            cnt = 0
            for k in range(n):
                x3, y3 = XY[k]
                for l in range(n):
                    if k == l:
                        continue
                    x4, y4 = XY[l]
                    if dx == x4 - x3 and dy == y4 - y3:
                        cnt += 1

            res = min(res, n - cnt)

    print(res) resolve n = int(input()) n int(input()) int input() input list(map(int, input().split())) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split XY = sorted([list(map(int, input().split())) for _ in range(n)]) XY sorted([list(map(int, input().split())) for _ in range(n)]) sorted [list(map(int, input().split())) for _ in range(n)] if n == 1:
        print(1)
        exit()

     n == 1 n 1 print(1) print 1 exit() exit res = n res n for i in range(n):
        x1, y1 = XY[i]
        for j in range(n):
            if i == j:
                continue
            x2, y2 = XY[j]
            dx, dy = x2 - x1, y2 - y1

            cnt = 0
            for k in range(n):
                x3, y3 = XY[k]
                for l in range(n):
                    if k == l:
                        continue
                    x4, y4 = XY[l]
                    if dx == x4 - x3 and dy == y4 - y3:
                        cnt += 1

            res = min(res, n - cnt)

     i range(n) range n x1, y1 = XY[i] x1 XY[i] XY i y1 for j in range(n):
            if i == j:
                continue
            x2, y2 = XY[j]
            dx, dy = x2 - x1, y2 - y1

            cnt = 0
            for k in range(n):
                x3, y3 = XY[k]
                for l in range(n):
                    if k == l:
                        continue
                    x4, y4 = XY[l]
                    if dx == x4 - x3 and dy == y4 - y3:
                        cnt += 1

            res = min(res, n - cnt)

     j range(n) range n if i == j:
                continue
             i == j i j continue x2, y2 = XY[j] x2 XY[j] XY j y2 dx, dy = x2 - x1, y2 - y1 dx x2 - x1 x2 x1 dy y2 - y1 y2 y1 cnt = 0 cnt 0 for k in range(n):
                x3, y3 = XY[k]
                for l in range(n):
                    if k == l:
                        continue
                    x4, y4 = XY[l]
                    if dx == x4 - x3 and dy == y4 - y3:
                        cnt += 1

             k range(n) range n x3, y3 = XY[k] x3 XY[k] XY k y3 for l in range(n):
                    if k == l:
                        continue
                    x4, y4 = XY[l]
                    if dx == x4 - x3 and dy == y4 - y3:
                        cnt += 1

             l range(n) range n if k == l:
                        continue
                     k == l k l continue x4, y4 = XY[l] x4 XY[l] XY l y4 if dx == x4 - x3 and dy == y4 - y3:
                        cnt += 1

             dx == x4 - x3 and dy == y4 - y3 dx == x4 - x3 dx x4 - x3 x4 x3 dy == y4 - y3 dy y4 - y3 y4 y3 cnt += 1 cnt 1 res = min(res, n - cnt) res min(res, n - cnt) min res n - cnt n cnt print(res) print res if __name__ == '__main__':
    resolve() __name__ == '__main__' __name__ '__main__' resolve() resolve def resolve():
    n = int(input())
    XY = sorted([list(map(int, input().split())) for _ in range(n)])

    if n == 1:
        print(1)
        exit()

    res = n
    for i in range(n):
        x1, y1 = XY[i]
        for j in range(n):
            if i == j:
                continue
            x2, y2 = XY[j]
            dx, dy = x2 - x1, y2 - y1

            cnt = 0
            for k in range(n):
                x3, y3 = XY[k]
                for l in range(n):
                    if k == l:
                        continue
                    x4, y4 = XY[l]
                    if dx == x4 - x3 and dy == y4 - y3:
                        cnt += 1

            res = min(res, n - cnt)

    print(res) def resolve():
    n = int(input())
    XY = sorted([list(map(int, input().split())) for _ in range(n)])

    if n == 1:
        print(1)
        exit()

    res = n
    for i in range(n):
        x1, y1 = XY[i]
        for j in range(n):
            if i == j:
                continue
            x2, y2 = XY[j]
            dx, dy = x2 - x1, y2 - y1

            cnt = 0
            for k in range(n):
                x3, y3 = XY[k]
                for l in range(n):
                    if k == l:
                        continue
                    x4, y4 = XY[l]
                    if dx == x4 - x3 and dy == y4 - y3:
                        cnt += 1

            res = min(res, n - cnt)

    print(res) resolve mod = 10 ** 9 + 7 10 ** 9 + 7 mod f_inf = float('inf') float('inf') f_inf
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    n = int(input())
    XY = sorted([list(map(int, input().split())) for _ in range(n)])

    if n == 1:
        print(1)
        exit()

    res = n
    for i in range(n):
        x1, y1 = XY[i]
        for j in range(n):
            if i == j:
                continue
            x2, y2 = XY[j]
            dx, dy = x2 - x1, y2 - y1

            cnt = 0
            for k in range(n):
                x3, y3 = XY[k]
                for l in range(n):
                    if k == l:
                        continue
                    x4, y4 = XY[l]
                    if dx == x4 - x3 and dy == y4 - y3:
                        cnt += 1

            res = min(res, n - cnt)

    print(res)


if __name__ == '__main__':
    resolve()
