from collections import deque
def solve():
    N = int(input())
    X = [0]*N
    Y = [0]*N
    balls = [0]*N
    ans = N
    dic = {}
    f = {}
    for i in range(N):
        X[i],Y[i] = map(int, input().split())
        dic[(X[i],Y[i])] = i
        balls[i] = [X[i],Y[i]]
    
    balls = sorted(balls, key=lambda x:(x[0],x[1]))

    for x1, y1 in zip(X,Y):
        for x2, y2 in zip(X,Y):
            p = x2 - x1
            q = y2 - y1
            if p == 0 and q == 0:
                continue
            collected = [False]*N
            collected[dic[(x1,y1)]]=True
            collected[dic[(x2,y2)]]=True
            d = deque(balls)
            cnt = 1
            x = x2 + p
            y = y2 + q
            while (x,y) in dic:
                collected[dic[(x,y)]] = True
                x += p
                y += q
            while len(d)>0: 
                if p<0 or p==0 and q<0:
                    x,y = d.pop()
                else:
                    x,y = d.popleft()
                if collected[dic[(x,y)]] == True:
                    continue
                cnt += 1
                while (x,y) in dic:
                    collected[dic[(x,y)]] = True
                    x += p
                    y += q
            ans = min(ans, cnt)
    return ans
print(solve()) from collections import deque def solve():
    N = int(input())
    X = [0]*N
    Y = [0]*N
    balls = [0]*N
    ans = N
    dic = {}
    f = {}
    for i in range(N):
        X[i],Y[i] = map(int, input().split())
        dic[(X[i],Y[i])] = i
        balls[i] = [X[i],Y[i]]
    
    balls = sorted(balls, key=lambda x:(x[0],x[1]))

    for x1, y1 in zip(X,Y):
        for x2, y2 in zip(X,Y):
            p = x2 - x1
            q = y2 - y1
            if p == 0 and q == 0:
                continue
            collected = [False]*N
            collected[dic[(x1,y1)]]=True
            collected[dic[(x2,y2)]]=True
            d = deque(balls)
            cnt = 1
            x = x2 + p
            y = y2 + q
            while (x,y) in dic:
                collected[dic[(x,y)]] = True
                x += p
                y += q
            while len(d)>0: 
                if p<0 or p==0 and q<0:
                    x,y = d.pop()
                else:
                    x,y = d.popleft()
                if collected[dic[(x,y)]] == True:
                    continue
                cnt += 1
                while (x,y) in dic:
                    collected[dic[(x,y)]] = True
                    x += p
                    y += q
            ans = min(ans, cnt)
    return ans solve N = int(input()) N int(input()) int input() input X = [0]*N X [0]*N [0] 0 N Y = [0]*N Y [0]*N [0] 0 N balls = [0]*N balls [0]*N [0] 0 N ans = N ans N dic = {} dic {} f = {} f {} for i in range(N):
        X[i],Y[i] = map(int, input().split())
        dic[(X[i],Y[i])] = i
        balls[i] = [X[i],Y[i]]
    
     i range(N) range N X[i],Y[i] = map(int, input().split()) X[i] X i map(int, input().split()) map int input().split() ().split () input split Y[i] Y i dic[(X[i],Y[i])] = i dic[(X[i],Y[i])] dic (X[i],Y[i]) X[i] X i Y[i] Y i i balls[i] = [X[i],Y[i]] balls[i] balls i [X[i],Y[i]] X[i] X i Y[i] Y i balls = sorted(balls, key=lambda x:(x[0],x[1])) balls sorted(balls, key=lambda x:(x[0],x[1])) sorted balls key=lambda x:(x[0],x[1]) key lambda x:(x[0],x[1]) (x[0],x[1]) x[0] x 0 x[1] x 1 x for x1, y1 in zip(X,Y):
        for x2, y2 in zip(X,Y):
            p = x2 - x1
            q = y2 - y1
            if p == 0 and q == 0:
                continue
            collected = [False]*N
            collected[dic[(x1,y1)]]=True
            collected[dic[(x2,y2)]]=True
            d = deque(balls)
            cnt = 1
            x = x2 + p
            y = y2 + q
            while (x,y) in dic:
                collected[dic[(x,y)]] = True
                x += p
                y += q
            while len(d)>0: 
                if p<0 or p==0 and q<0:
                    x,y = d.pop()
                else:
                    x,y = d.popleft()
                if collected[dic[(x,y)]] == True:
                    continue
                cnt += 1
                while (x,y) in dic:
                    collected[dic[(x,y)]] = True
                    x += p
                    y += q
            ans = min(ans, cnt)
     x1 y1 zip(X,Y) zip X Y for x2, y2 in zip(X,Y):
            p = x2 - x1
            q = y2 - y1
            if p == 0 and q == 0:
                continue
            collected = [False]*N
            collected[dic[(x1,y1)]]=True
            collected[dic[(x2,y2)]]=True
            d = deque(balls)
            cnt = 1
            x = x2 + p
            y = y2 + q
            while (x,y) in dic:
                collected[dic[(x,y)]] = True
                x += p
                y += q
            while len(d)>0: 
                if p<0 or p==0 and q<0:
                    x,y = d.pop()
                else:
                    x,y = d.popleft()
                if collected[dic[(x,y)]] == True:
                    continue
                cnt += 1
                while (x,y) in dic:
                    collected[dic[(x,y)]] = True
                    x += p
                    y += q
            ans = min(ans, cnt)
     x2 y2 zip(X,Y) zip X Y p = x2 - x1 p x2 - x1 x2 x1 q = y2 - y1 q y2 - y1 y2 y1 if p == 0 and q == 0:
                continue
             p == 0 and q == 0 p == 0 p 0 q == 0 q 0 continue collected = [False]*N collected [False]*N [False] False N collected[dic[(x1,y1)]]=True collected[dic[(x1,y1)]] collected dic[(x1,y1)] dic (x1,y1) x1 y1 True collected[dic[(x2,y2)]]=True collected[dic[(x2,y2)]] collected dic[(x2,y2)] dic (x2,y2) x2 y2 True d = deque(balls) d deque(balls) deque balls cnt = 1 cnt 1 x = x2 + p x x2 + p x2 p y = y2 + q y y2 + q y2 q while (x,y) in dic:
                collected[dic[(x,y)]] = True
                x += p
                y += q
             (x,y) in dic (x,y) x y dic collected[dic[(x,y)]] = True collected[dic[(x,y)]] collected dic[(x,y)] dic (x,y) x y True x += p x p y += q y q while len(d)>0: 
                if p<0 or p==0 and q<0:
                    x,y = d.pop()
                else:
                    x,y = d.popleft()
                if collected[dic[(x,y)]] == True:
                    continue
                cnt += 1
                while (x,y) in dic:
                    collected[dic[(x,y)]] = True
                    x += p
                    y += q
             len(d)>0 len(d) len d 0 if p<0 or p==0 and q<0:
                    x,y = d.pop()
                else:
                    x,y = d.popleft()
                 p<0 or p==0 and q<0 p<0 p 0 p==0 and q<0 p==0 p 0 q<0 q 0 x,y = d.pop() x d.pop() d.pop d pop y x,y = d.popleft() x d.popleft() d.popleft d popleft y if collected[dic[(x,y)]] == True:
                    continue
                 collected[dic[(x,y)]] == True collected[dic[(x,y)]] collected dic[(x,y)] dic (x,y) x y True continue cnt += 1 cnt 1 while (x,y) in dic:
                    collected[dic[(x,y)]] = True
                    x += p
                    y += q
             (x,y) in dic (x,y) x y dic collected[dic[(x,y)]] = True collected[dic[(x,y)]] collected dic[(x,y)] dic (x,y) x y True x += p x p y += q y q ans = min(ans, cnt) ans min(ans, cnt) min ans cnt return ans ans print(solve()) print solve() solve def solve():
    N = int(input())
    X = [0]*N
    Y = [0]*N
    balls = [0]*N
    ans = N
    dic = {}
    f = {}
    for i in range(N):
        X[i],Y[i] = map(int, input().split())
        dic[(X[i],Y[i])] = i
        balls[i] = [X[i],Y[i]]
    
    balls = sorted(balls, key=lambda x:(x[0],x[1]))

    for x1, y1 in zip(X,Y):
        for x2, y2 in zip(X,Y):
            p = x2 - x1
            q = y2 - y1
            if p == 0 and q == 0:
                continue
            collected = [False]*N
            collected[dic[(x1,y1)]]=True
            collected[dic[(x2,y2)]]=True
            d = deque(balls)
            cnt = 1
            x = x2 + p
            y = y2 + q
            while (x,y) in dic:
                collected[dic[(x,y)]] = True
                x += p
                y += q
            while len(d)>0: 
                if p<0 or p==0 and q<0:
                    x,y = d.pop()
                else:
                    x,y = d.popleft()
                if collected[dic[(x,y)]] == True:
                    continue
                cnt += 1
                while (x,y) in dic:
                    collected[dic[(x,y)]] = True
                    x += p
                    y += q
            ans = min(ans, cnt)
    return ans def solve():
    N = int(input())
    X = [0]*N
    Y = [0]*N
    balls = [0]*N
    ans = N
    dic = {}
    f = {}
    for i in range(N):
        X[i],Y[i] = map(int, input().split())
        dic[(X[i],Y[i])] = i
        balls[i] = [X[i],Y[i]]
    
    balls = sorted(balls, key=lambda x:(x[0],x[1]))

    for x1, y1 in zip(X,Y):
        for x2, y2 in zip(X,Y):
            p = x2 - x1
            q = y2 - y1
            if p == 0 and q == 0:
                continue
            collected = [False]*N
            collected[dic[(x1,y1)]]=True
            collected[dic[(x2,y2)]]=True
            d = deque(balls)
            cnt = 1
            x = x2 + p
            y = y2 + q
            while (x,y) in dic:
                collected[dic[(x,y)]] = True
                x += p
                y += q
            while len(d)>0: 
                if p<0 or p==0 and q<0:
                    x,y = d.pop()
                else:
                    x,y = d.popleft()
                if collected[dic[(x,y)]] == True:
                    continue
                cnt += 1
                while (x,y) in dic:
                    collected[dic[(x,y)]] = True
                    x += p
                    y += q
            ans = min(ans, cnt)
    return ans solve
from collections import deque
def solve():
    N = int(input())
    X = [0]*N
    Y = [0]*N
    balls = [0]*N
    ans = N
    dic = {}
    f = {}
    for i in range(N):
        X[i],Y[i] = map(int, input().split())
        dic[(X[i],Y[i])] = i
        balls[i] = [X[i],Y[i]]
    
    balls = sorted(balls, key=lambda x:(x[0],x[1]))

    for x1, y1 in zip(X,Y):
        for x2, y2 in zip(X,Y):
            p = x2 - x1
            q = y2 - y1
            if p == 0 and q == 0:
                continue
            collected = [False]*N
            collected[dic[(x1,y1)]]=True
            collected[dic[(x2,y2)]]=True
            d = deque(balls)
            cnt = 1
            x = x2 + p
            y = y2 + q
            while (x,y) in dic:
                collected[dic[(x,y)]] = True
                x += p
                y += q
            while len(d)>0: 
                if p<0 or p==0 and q<0:
                    x,y = d.pop()
                else:
                    x,y = d.popleft()
                if collected[dic[(x,y)]] == True:
                    continue
                cnt += 1
                while (x,y) in dic:
                    collected[dic[(x,y)]] = True
                    x += p
                    y += q
            ans = min(ans, cnt)
    return ans
print(solve())