def main():
    from collections import Counter, namedtuple

    pt = namedtuple('pt', 'x y')

    def delta(a: pt, b: pt) -> pt:
        x = a.x - b.x
        y = a.y - b.y
        if (x < 0) or (x == 0 and y < 0):
            x = -x
            y = -y
        return pt(x=x, y=y)

    n = int(input())
    if n == 1:
        # deltaが計算できないので、
        # 別処理する
        print(1)
        return

    ps = [pt(*map(int, input().split())) for _ in range(n)]

    c = Counter(
        delta(a, b)
        for i, a in enumerate(ps)
        for j, b in enumerate(ps)
        if i < j
    )

    ma = max(c.values())

    print(n - ma)


if __name__ == '__main__':
    main() def main():
    from collections import Counter, namedtuple

    pt = namedtuple('pt', 'x y')

    def delta(a: pt, b: pt) -> pt:
        x = a.x - b.x
        y = a.y - b.y
        if (x < 0) or (x == 0 and y < 0):
            x = -x
            y = -y
        return pt(x=x, y=y)

    n = int(input())
    if n == 1:
        # deltaが計算できないので、
        # 別処理する
        print(1)
        return

    ps = [pt(*map(int, input().split())) for _ in range(n)]

    c = Counter(
        delta(a, b)
        for i, a in enumerate(ps)
        for j, b in enumerate(ps)
        if i < j
    )

    ma = max(c.values())

    print(n - ma) main from collections import Counter, namedtuple pt = namedtuple('pt', 'x y') pt namedtuple('pt', 'x y') namedtuple 'pt' 'x y' def delta(a: pt, b: pt) -> pt:
        x = a.x - b.x
        y = a.y - b.y
        if (x < 0) or (x == 0 and y < 0):
            x = -x
            y = -y
        return pt(x=x, y=y)

     delta x = a.x - b.x x a.x - b.x a.x a x b.x b x y = a.y - b.y y a.y - b.y a.y a y b.y b y if (x < 0) or (x == 0 and y < 0):
            x = -x
            y = -y
         (x < 0) or (x == 0 and y < 0) x < 0 x 0 x == 0 and y < 0 x == 0 x 0 y < 0 y 0 x = -x x -x x y = -y y -y y return pt(x=x, y=y) pt(x=x, y=y) pt x=x x x y=y y y a: pt a b: pt b n = int(input()) n int(input()) int input() input if n == 1:
        # deltaが計算できないので、
        # 別処理する
        print(1)
        return

     n == 1 n 1 print(1) print 1 return pt(*map(int, input().split())) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) pt(*map(int, input().split())) pt *map(int, input().split()) map(int, input().split()) map int input().split() ().split () input split ps = [pt(*map(int, input().split())) for _ in range(n)] ps [pt(*map(int, input().split())) for _ in range(n)] c = Counter(
        delta(a, b)
        for i, a in enumerate(ps)
        for j, b in enumerate(ps)
        if i < j
    ) c Counter(
        delta(a, b)
        for i, a in enumerate(ps)
        for j, b in enumerate(ps)
        if i < j
    ) Counter delta(a, b) delta a b ma = max(c.values()) ma max(c.values()) max c.values() c.values c values print(n - ma) print n - ma n ma if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    from collections import Counter, namedtuple

    pt = namedtuple('pt', 'x y')

    def delta(a: pt, b: pt) -> pt:
        x = a.x - b.x
        y = a.y - b.y
        if (x < 0) or (x == 0 and y < 0):
            x = -x
            y = -y
        return pt(x=x, y=y)

    n = int(input())
    if n == 1:
        # deltaが計算できないので、
        # 別処理する
        print(1)
        return

    ps = [pt(*map(int, input().split())) for _ in range(n)]

    c = Counter(
        delta(a, b)
        for i, a in enumerate(ps)
        for j, b in enumerate(ps)
        if i < j
    )

    ma = max(c.values())

    print(n - ma) def main():
    from collections import Counter, namedtuple

    pt = namedtuple('pt', 'x y')

    def delta(a: pt, b: pt) -> pt:
        x = a.x - b.x
        y = a.y - b.y
        if (x < 0) or (x == 0 and y < 0):
            x = -x
            y = -y
        return pt(x=x, y=y)

    n = int(input())
    if n == 1:
        # deltaが計算できないので、
        # 別処理する
        print(1)
        return

    ps = [pt(*map(int, input().split())) for _ in range(n)]

    c = Counter(
        delta(a, b)
        for i, a in enumerate(ps)
        for j, b in enumerate(ps)
        if i < j
    )

    ma = max(c.values())

    print(n - ma) main
def main():
    from collections import Counter, namedtuple

    pt = namedtuple('pt', 'x y')

    def delta(a: pt, b: pt) -> pt:
        x = a.x - b.x
        y = a.y - b.y
        if (x < 0) or (x == 0 and y < 0):
            x = -x
            y = -y
        return pt(x=x, y=y)

    n = int(input())
    if n == 1:
        # deltaが計算できないので、
        # 別処理する
        print(1)
        return

    ps = [pt(*map(int, input().split())) for _ in range(n)]

    c = Counter(
        delta(a, b)
        for i, a in enumerate(ps)
        for j, b in enumerate(ps)
        if i < j
    )

    ma = max(c.values())

    print(n - ma)


if __name__ == '__main__':
    main()
