#

# 　　  ⋀_⋀　 

#　　  (･ω･)  

# .／ Ｕ ∽ Ｕ＼

#  │＊　合　＊│

#  │＊　格　＊│ 

#  │＊　祈　＊│ 

#  │＊　願　＊│ 

#  │＊　　　＊│ 

#      ￣

#

import sys

input=sys.stdin.readline

from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ

from heapq import heappop, heappush, heappushpop

from collections import Counter,defaultdict

from itertools import accumulate,permutations,combinations,product,combinations_with_replacement

from bisect import bisect_left, bisect_right

from copy import copy

inf=float('inf')

mod = 10**9+7

def INT_(n): return int(n)-1

def MI(): return list(map(int,input().split()))

def MF(): return list(map(float, input().split()))

def MI_(): return list(map(INT_,input().split()))

def LI(): return list(MI())

def LI_(): return [int(x) - 1 for x in input().split()]

def LF(): return list(MF())

def LIN(n:int): return [I() for _ in range(n)]

def LLIN(n: int): return [LI() for _ in range(n)]

def LLIN_(n: int): return [LI_() for _ in range(n)]

def LLI(): return [list(map(int, l.split() )) for l in eval(input())]

def I(): return int(eval(input()))

def F(): return float(eval(input()))

def ST(): return input().replace('\n', '')

def main():



    N = I()

    XY = LLIN(N)

    if N == 1:

        print((1))

        exit()

    XY.sort()



    count = defaultdict(int)

    for i, (x1, y1) in enumerate(XY):

        for j, (x2, y2) in enumerate(XY[i+1:]):

            dx, dy = x1 - x2, y1 - y2

            count[(dx, dy)] += 1

    maxim = -inf

    for v in list(count.values()):

        maxim = max(maxim, v)

    print((N - maxim))

    

    

                        

if __name__ == '__main__':

    main()
#

# 　　  ⋀_⋀　 

#　　  (･ω･)  

# .／ Ｕ ∽ Ｕ＼

#  │＊　合　＊│

#  │＊　格　＊│ 

#  │＊　祈　＊│ 

#  │＊　願　＊│ 

#  │＊　　　＊│ 

#      ￣

#

import sys

input=sys.stdin.readline

from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ

from heapq import heappop, heappush, heappushpop

from collections import Counter,defaultdict

from itertools import accumulate,permutations,combinations,product,combinations_with_replacement

from bisect import bisect_left, bisect_right

from copy import copy

inf=float('inf')

mod = 10**9+7

def INT_(n): return int(n)-1

def MI(): return list(map(int,input().split()))

def MF(): return list(map(float, input().split()))

def MI_(): return list(map(INT_,input().split()))

def LI(): return list(MI())

def LI_(): return [int(x) - 1 for x in input().split()]

def LF(): return list(MF())

def LIN(n:int): return [I() for _ in range(n)]

def LLIN(n: int): return [LI() for _ in range(n)]

def LLIN_(n: int): return [LI_() for _ in range(n)]

def LLI(): return [list(map(int, l.split() )) for l in eval(input())]

def I(): return int(eval(input()))

def F(): return float(eval(input()))

def ST(): return input().replace('\n', '')

def main():



    N = I()

    XY = LLIN(N)

    XY.sort()

    if N == 1:

        print((1))

        exit()

    

    count = defaultdict(int)

    for i, (x1, y1) in enumerate(XY):

        for j, (x2, y2) in enumerate(XY[i+1:]):

            dx, dy = x1 - x2, y1 - y2

            count[(dx, dy)] += 1

    print((N - max(count.values())))

    

    

                        

if __name__ == '__main__':

    main()
#
# 　　  ⋀_⋀
# 　　  (･ω･)
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│
#  │＊　祈　＊│
#  │＊　願　＊│
#  │＊　　　＊│
#      ￣
#
import sys

input = sys.stdin.readline
from math import floor, ceil, sqrt, factorial, log  # log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter, defaultdict
from itertools import (
    accumulate,
    permutations,
    combinations,
    product,
    combinations_with_replacement,
)
from bisect import bisect_left, bisect_right
from copy import copy

inf = float("inf")
mod = 10**9 + 7


def INT_(n):
    return int(n) - 1


def MI():
    return list(map(int, input().split()))


def MF():
    return list(map(float, input().split()))


def MI_():
    return list(map(INT_, input().split()))


def LI():
    return list(MI())


def LI_():
    return [int(x) - 1 for x in input().split()]


def LF():
    return list(MF())


def LIN(n: int):
    return [I() for _ in range(n)]


def LLIN(n: int):
    return [LI() for _ in range(n)]


def LLIN_(n: int):
    return [LI_() for _ in range(n)]


def LLI():
    return [list(map(int, l.split())) for l in eval(input())]


def I():
    return int(eval(input()))


def F():
    return float(eval(input()))


def ST():
    return input().replace("\n", "")


def main():
    N = I()
    XY = LLIN(N)
    if N == 1:
        print((1))
        exit()
    XY.sort()
    count = defaultdict(int)
    for i, (x1, y1) in enumerate(XY):
        for j, (x2, y2) in enumerate(XY[i + 1 :]):
            dx, dy = x1 - x2, y1 - y2
            count[(dx, dy)] += 1
    maxim = -inf
    for v in list(count.values()):
        maxim = max(maxim, v)
    print((N - maxim))


if __name__ == "__main__":
    main()

#
# 　　  ⋀_⋀
# 　　  (･ω･)
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│
#  │＊　祈　＊│
#  │＊　願　＊│
#  │＊　　　＊│
#      ￣
#
import sys

input = sys.stdin.readline
from math import floor, ceil, sqrt, factorial, log  # log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter, defaultdict
from itertools import (
    accumulate,
    permutations,
    combinations,
    product,
    combinations_with_replacement,
)
from bisect import bisect_left, bisect_right
from copy import copy

inf = float("inf")
mod = 10**9 + 7


def INT_(n):
    return int(n) - 1


def MI():
    return list(map(int, input().split()))


def MF():
    return list(map(float, input().split()))


def MI_():
    return list(map(INT_, input().split()))


def LI():
    return list(MI())


def LI_():
    return [int(x) - 1 for x in input().split()]


def LF():
    return list(MF())


def LIN(n: int):
    return [I() for _ in range(n)]


def LLIN(n: int):
    return [LI() for _ in range(n)]


def LLIN_(n: int):
    return [LI_() for _ in range(n)]


def LLI():
    return [list(map(int, l.split())) for l in eval(input())]


def I():
    return int(eval(input()))


def F():
    return float(eval(input()))


def ST():
    return input().replace("\n", "")


def main():
    N = I()
    XY = LLIN(N)
    XY.sort()
    if N == 1:
        print((1))
        exit()
    count = defaultdict(int)
    for i, (x1, y1) in enumerate(XY):
        for j, (x2, y2) in enumerate(XY[i + 1 :]):
            dx, dy = x1 - x2, y1 - y2
            count[(dx, dy)] += 1
    print((N - max(count.values())))


if __name__ == "__main__":
    main()

+    XY.sort() -    XY.sort() -    maxim = -inf -    for v in list(count.values()): -        maxim = max(maxim, v) -    print((N - maxim)) +    print((N - max(count.values())))