import sys
input = sys.stdin.readline
from collections import defaultdict


def read():
    N = int(input().strip())
    XY = []
    for i in range(N):
        x, y = map(int, input().strip().split())
        XY.append((x, y))
    return N, XY


def solve(N, XY):
    if N == 1:
        return 1

    min_cost = 1000000
    for j in range(N):
        for i in range(j):
            rdict = defaultdict(list)
            x0, y0 = XY[i]
            x1, y1 = XY[j]
            p, q = x1 - x0, y1 - y0
            for k in range(N):
                x, y = XY[k]
                rdict[q * x - p * y].append((x, y))
            cost = 0
            for v in rdict.values():
                vs = list(sorted(v))
                x0, y0 = vs[0]
                for x1, y1 in vs:
                    if x1 - x0 != p or y1 - y0 != q:
                        cost += 1
                    x0, y0 = x1, y1
            min_cost = min(min_cost, cost)
    return min_cost


if __name__ == '__main__':
    inputs = read()
    print(solve(*inputs)) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline from collections import defaultdict def read():
    N = int(input().strip())
    XY = []
    for i in range(N):
        x, y = map(int, input().strip().split())
        XY.append((x, y))
    return N, XY read N = int(input().strip()) N int(input().strip()) int input().strip() ().strip () input strip XY = [] XY [] for i in range(N):
        x, y = map(int, input().strip().split())
        XY.append((x, y))
     i range(N) range N x, y = map(int, input().strip().split()) x map(int, input().strip().split()) map int input().strip().split() ().strip().split ().strip() ().strip () input strip split y XY.append((x, y)) XY.append XY append (x, y) x y return N, XY return N, XY N XY def solve(N, XY):
    if N == 1:
        return 1

    min_cost = 1000000
    for j in range(N):
        for i in range(j):
            rdict = defaultdict(list)
            x0, y0 = XY[i]
            x1, y1 = XY[j]
            p, q = x1 - x0, y1 - y0
            for k in range(N):
                x, y = XY[k]
                rdict[q * x - p * y].append((x, y))
            cost = 0
            for v in rdict.values():
                vs = list(sorted(v))
                x0, y0 = vs[0]
                for x1, y1 in vs:
                    if x1 - x0 != p or y1 - y0 != q:
                        cost += 1
                    x0, y0 = x1, y1
            min_cost = min(min_cost, cost)
    return min_cost solve if N == 1:
        return 1

     N == 1 N 1 return 1 1 min_cost = 1000000 min_cost 1000000 for j in range(N):
        for i in range(j):
            rdict = defaultdict(list)
            x0, y0 = XY[i]
            x1, y1 = XY[j]
            p, q = x1 - x0, y1 - y0
            for k in range(N):
                x, y = XY[k]
                rdict[q * x - p * y].append((x, y))
            cost = 0
            for v in rdict.values():
                vs = list(sorted(v))
                x0, y0 = vs[0]
                for x1, y1 in vs:
                    if x1 - x0 != p or y1 - y0 != q:
                        cost += 1
                    x0, y0 = x1, y1
            min_cost = min(min_cost, cost)
     j range(N) range N for i in range(j):
            rdict = defaultdict(list)
            x0, y0 = XY[i]
            x1, y1 = XY[j]
            p, q = x1 - x0, y1 - y0
            for k in range(N):
                x, y = XY[k]
                rdict[q * x - p * y].append((x, y))
            cost = 0
            for v in rdict.values():
                vs = list(sorted(v))
                x0, y0 = vs[0]
                for x1, y1 in vs:
                    if x1 - x0 != p or y1 - y0 != q:
                        cost += 1
                    x0, y0 = x1, y1
            min_cost = min(min_cost, cost)
     i range(j) range j rdict = defaultdict(list) rdict defaultdict(list) defaultdict list x0, y0 = XY[i] x0 XY[i] XY i y0 x1, y1 = XY[j] x1 XY[j] XY j y1 p, q = x1 - x0, y1 - y0 p x1 - x0 x1 x0 q y1 - y0 y1 y0 for k in range(N):
                x, y = XY[k]
                rdict[q * x - p * y].append((x, y))
             k range(N) range N x, y = XY[k] x XY[k] XY k y rdict[q * x - p * y].append((x, y)) [q * x - p * y].append [q * x - p * y] rdict q * x - p * y q * x q x p * y p y append (x, y) x y cost = 0 cost 0 for v in rdict.values():
                vs = list(sorted(v))
                x0, y0 = vs[0]
                for x1, y1 in vs:
                    if x1 - x0 != p or y1 - y0 != q:
                        cost += 1
                    x0, y0 = x1, y1
             v rdict.values() rdict.values rdict values vs = list(sorted(v)) vs list(sorted(v)) list sorted(v) sorted v x0, y0 = vs[0] x0 vs[0] vs 0 y0 for x1, y1 in vs:
                    if x1 - x0 != p or y1 - y0 != q:
                        cost += 1
                    x0, y0 = x1, y1
             x1 y1 vs if x1 - x0 != p or y1 - y0 != q:
                        cost += 1
                     x1 - x0 != p or y1 - y0 != q x1 - x0 != p x1 - x0 x1 x0 p y1 - y0 != q y1 - y0 y1 y0 q cost += 1 cost 1 x0, y0 = x1, y1 x0 x1 y0 y1 min_cost = min(min_cost, cost) min_cost min(min_cost, cost) min min_cost cost return min_cost min_cost N N XY XY if __name__ == '__main__':
    inputs = read()
    print(solve(*inputs)) __name__ == '__main__' __name__ '__main__' inputs = read() inputs read() read print(solve(*inputs)) print solve(*inputs) solve *inputs inputs input = sys.stdin.readline sys.stdin.readline input inputs = read() read() inputs def read():
    N = int(input().strip())
    XY = []
    for i in range(N):
        x, y = map(int, input().strip().split())
        XY.append((x, y))
    return N, XY def read():
    N = int(input().strip())
    XY = []
    for i in range(N):
        x, y = map(int, input().strip().split())
        XY.append((x, y))
    return N, XY read def solve(N, XY):
    if N == 1:
        return 1

    min_cost = 1000000
    for j in range(N):
        for i in range(j):
            rdict = defaultdict(list)
            x0, y0 = XY[i]
            x1, y1 = XY[j]
            p, q = x1 - x0, y1 - y0
            for k in range(N):
                x, y = XY[k]
                rdict[q * x - p * y].append((x, y))
            cost = 0
            for v in rdict.values():
                vs = list(sorted(v))
                x0, y0 = vs[0]
                for x1, y1 in vs:
                    if x1 - x0 != p or y1 - y0 != q:
                        cost += 1
                    x0, y0 = x1, y1
            min_cost = min(min_cost, cost)
    return min_cost def solve(N, XY):
    if N == 1:
        return 1

    min_cost = 1000000
    for j in range(N):
        for i in range(j):
            rdict = defaultdict(list)
            x0, y0 = XY[i]
            x1, y1 = XY[j]
            p, q = x1 - x0, y1 - y0
            for k in range(N):
                x, y = XY[k]
                rdict[q * x - p * y].append((x, y))
            cost = 0
            for v in rdict.values():
                vs = list(sorted(v))
                x0, y0 = vs[0]
                for x1, y1 in vs:
                    if x1 - x0 != p or y1 - y0 != q:
                        cost += 1
                    x0, y0 = x1, y1
            min_cost = min(min_cost, cost)
    return min_cost solve
import sys
input = sys.stdin.readline
from collections import defaultdict


def read():
    N = int(input().strip())
    XY = []
    for i in range(N):
        x, y = map(int, input().strip().split())
        XY.append((x, y))
    return N, XY


def solve(N, XY):
    if N == 1:
        return 1

    min_cost = 1000000
    for j in range(N):
        for i in range(j):
            rdict = defaultdict(list)
            x0, y0 = XY[i]
            x1, y1 = XY[j]
            p, q = x1 - x0, y1 - y0
            for k in range(N):
                x, y = XY[k]
                rdict[q * x - p * y].append((x, y))
            cost = 0
            for v in rdict.values():
                vs = list(sorted(v))
                x0, y0 = vs[0]
                for x1, y1 in vs:
                    if x1 - x0 != p or y1 - y0 != q:
                        cost += 1
                    x0, y0 = x1, y1
            min_cost = min(min_cost, cost)
    return min_cost


if __name__ == '__main__':
    inputs = read()
    print(solve(*inputs))
