import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(readline())
lst1 = [list(map(int,readline().split())) for i in range(n)]
lst1.sort()
cost = 1
if n == 1:
    print(cost)
    exit()
#同じベクトルでつなげる要素を最大化する。全点対象にベクトルを求め、多数決。
dic1 = dict()

for i in range(n-1):
    for j in range(i+1,n):
        x,y = lst1[i][0] - lst1[j][0] , lst1[i][1] - lst1[j][1]
        """
        if x < 0 and y < 0:
            x,y = -x,-y
        elif x < 0 and y >= 0:
            x,y = -x,-y"""
        if (x,y) in dic1:
            dic1[(x,y)] += 1
        else:
            dic1[(x,y)] = 1

#線分は頂点-1個。そのうち同ベクトル数が免除される。
cost += n-1
cost -= max(dic1.values())

print(cost) import sys sys read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines n = int(readline()) n int(readline()) int readline() readline list(map(int,readline().split())) for i in range(n) for i in range(n) i range(n) range n for i in range(n) list(map(int,readline().split())) list map(int,readline().split()) map int readline().split() ().split () readline split lst1 = [list(map(int,readline().split())) for i in range(n)] lst1 [list(map(int,readline().split())) for i in range(n)] lst1.sort() lst1.sort lst1 sort cost = 1 cost 1 if n == 1:
    print(cost)
    exit()
#同じベクトルでつなげる要素を最大化する。全点対象にベクトルを求め、多数決。 n == 1 n 1 print(cost) print cost exit() exit dic1 = dict() dic1 dict() dict for i in range(n-1):
    for j in range(i+1,n):
        x,y = lst1[i][0] - lst1[j][0] , lst1[i][1] - lst1[j][1]
        """
        if x < 0 and y < 0:
            x,y = -x,-y
        elif x < 0 and y >= 0:
            x,y = -x,-y"""
        if (x,y) in dic1:
            dic1[(x,y)] += 1
        else:
            dic1[(x,y)] = 1

#線分は頂点-1個。そのうち同ベクトル数が免除される。 i range(n-1) range n-1 n 1 for j in range(i+1,n):
        x,y = lst1[i][0] - lst1[j][0] , lst1[i][1] - lst1[j][1]
        """
        if x < 0 and y < 0:
            x,y = -x,-y
        elif x < 0 and y >= 0:
            x,y = -x,-y"""
        if (x,y) in dic1:
            dic1[(x,y)] += 1
        else:
            dic1[(x,y)] = 1

#線分は頂点-1個。そのうち同ベクトル数が免除される。 j range(i+1,n) range i+1 i 1 n x,y = lst1[i][0] - lst1[j][0] , lst1[i][1] - lst1[j][1] x lst1[i][0] - lst1[j][0] lst1[i][0] [i] lst1 i 0 lst1[j][0] [j] lst1 j 0 y lst1[i][1] - lst1[j][1] lst1[i][1] [i] lst1 i 1 lst1[j][1] [j] lst1 j 1 """
        if x < 0 and y < 0:
            x,y = -x,-y
        elif x < 0 and y >= 0:
            x,y = -x,-y""" if (x,y) in dic1:
            dic1[(x,y)] += 1
        else:
            dic1[(x,y)] = 1

#線分は頂点-1個。そのうち同ベクトル数が免除される。 (x,y) in dic1 (x,y) x y dic1 dic1[(x,y)] += 1 dic1[(x,y)] dic1 (x,y) x y 1 dic1[(x,y)] = 1 dic1[(x,y)] dic1 (x,y) x y 1 cost += n-1 cost n-1 n 1 cost -= max(dic1.values()) cost max(dic1.values()) max dic1.values() dic1.values dic1 values print(cost) print cost read = sys.stdin.buffer.read sys.stdin.buffer.read read cost -= max(dic1.values()) max(dic1.values()) cost readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines cost = 1 1 cost y = lst1[i][0] - lst1[j][0] , lst1[i][1] - lst1[j][1] lst1[i][1] - lst1[j][1] y dic1 = dict() dict() dic1 lst1 = [list(map(int,readline().split())) for i in range(n)] [list(map(int,readline().split())) for i in range(n)] lst1 x,y = lst1[i][0] - lst1[j][0] , lst1[i][1] - lst1[j][1] lst1[i][0] - lst1[j][0] x readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline n = int(readline()) int(readline()) n cost += n-1 n-1 cost
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(readline())
lst1 = [list(map(int,readline().split())) for i in range(n)]
lst1.sort()
cost = 1
if n == 1:
    print(cost)
    exit()
#同じベクトルでつなげる要素を最大化する。全点対象にベクトルを求め、多数決。
dic1 = dict()

for i in range(n-1):
    for j in range(i+1,n):
        x,y = lst1[i][0] - lst1[j][0] , lst1[i][1] - lst1[j][1]
        """
        if x < 0 and y < 0:
            x,y = -x,-y
        elif x < 0 and y >= 0:
            x,y = -x,-y"""
        if (x,y) in dic1:
            dic1[(x,y)] += 1
        else:
            dic1[(x,y)] = 1

#線分は頂点-1個。そのうち同ベクトル数が免除される。
cost += n-1
cost -= max(dic1.values())

print(cost)