from collections import *
from heapq import *
from itertools import *
from fractions import gcd
import sys
from decimal import *
input=lambda :sys.stdin.readline().rstrip()

N=int(input())
if N==1:
    print(1)
    exit()
XY=[list(map(int,input().split())) for i in range(N)]
itelst=combinations(range(N),2)

alst=[]
for a,b in itelst:
    x1,y1=XY[a]
    x2,y2=XY[b]
    Y=y1-y2;X=x1-x2
    if X and Y:
        alst.append([X,Y])
    elif Y or X:
        alst.append([X,Y])



value=50
idlemax=10**18
for Xa,Ya in alst:
    n=set([x+idlemax*y for x,y in XY])

    count=0
    for x,y in XY:
        if x+idlemax*y in n:
            count+=1
            a=0;b=0
            A=x+Xa+a+idlemax*(y+Ya+b)
            while A in n:
                n.remove(A)
                a+=Xa;b+=Ya
                A=x+Xa+a+idlemax*(y+Ya+b)

            a=0;b=0
            A=x-Xa-a+idlemax*(y-Ya-b)
            while A in n:
                n.remove(A)
                a+=Xa;b+=Ya
                A=x-Xa-a+idlemax*(y-Ya-b)
    value=min(value,count)
print(value) from collections import * from heapq import * from itertools import * from fractions import gcd import sys sys from decimal import * input=lambda :sys.stdin.readline().rstrip() input lambda :sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip N=int(input()) N int(input()) int input() input if N==1:
    print(1)
    exit() N==1 N 1 print(1) print 1 exit() exit list(map(int,input().split())) for i in range(N) for i in range(N) i range(N) range N for i in range(N) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split XY=[list(map(int,input().split())) for i in range(N)] XY [list(map(int,input().split())) for i in range(N)] itelst=combinations(range(N),2) itelst combinations(range(N),2) combinations range(N) range N 2 alst=[] alst [] for a,b in itelst:
    x1,y1=XY[a]
    x2,y2=XY[b]
    Y=y1-y2;X=x1-x2
    if X and Y:
        alst.append([X,Y])
    elif Y or X:
        alst.append([X,Y]) a b itelst x1,y1=XY[a] x1 XY[a] XY a y1 x2,y2=XY[b] x2 XY[b] XY b y2 Y=y1-y2 Y y1-y2 y1 y2 X=x1-x2 X x1-x2 x1 x2 if X and Y:
        alst.append([X,Y])
    elif Y or X:
        alst.append([X,Y]) X and Y X Y alst.append([X,Y]) alst.append alst append [X,Y] X Y elif Y or X:
        alst.append([X,Y]) Y or X Y X alst.append([X,Y]) alst.append alst append [X,Y] X Y value=50 value 50 idlemax=10**18 idlemax 10**18 10 18 for Xa,Ya in alst:
    n=set([x+idlemax*y for x,y in XY])

    count=0
    for x,y in XY:
        if x+idlemax*y in n:
            count+=1
            a=0;b=0
            A=x+Xa+a+idlemax*(y+Ya+b)
            while A in n:
                n.remove(A)
                a+=Xa;b+=Ya
                A=x+Xa+a+idlemax*(y+Ya+b)

            a=0;b=0
            A=x-Xa-a+idlemax*(y-Ya-b)
            while A in n:
                n.remove(A)
                a+=Xa;b+=Ya
                A=x-Xa-a+idlemax*(y-Ya-b)
    value=min(value,count) Xa Ya alst x+idlemax*y for x,y in XY for x,y in XY x y XY for x,y in XY x+idlemax*y x idlemax*y idlemax y n=set([x+idlemax*y for x,y in XY]) n set([x+idlemax*y for x,y in XY]) set [x+idlemax*y for x,y in XY] count=0 count 0 for x,y in XY:
        if x+idlemax*y in n:
            count+=1
            a=0;b=0
            A=x+Xa+a+idlemax*(y+Ya+b)
            while A in n:
                n.remove(A)
                a+=Xa;b+=Ya
                A=x+Xa+a+idlemax*(y+Ya+b)

            a=0;b=0
            A=x-Xa-a+idlemax*(y-Ya-b)
            while A in n:
                n.remove(A)
                a+=Xa;b+=Ya
                A=x-Xa-a+idlemax*(y-Ya-b)
     x y XY if x+idlemax*y in n:
            count+=1
            a=0;b=0
            A=x+Xa+a+idlemax*(y+Ya+b)
            while A in n:
                n.remove(A)
                a+=Xa;b+=Ya
                A=x+Xa+a+idlemax*(y+Ya+b)

            a=0;b=0
            A=x-Xa-a+idlemax*(y-Ya-b)
            while A in n:
                n.remove(A)
                a+=Xa;b+=Ya
                A=x-Xa-a+idlemax*(y-Ya-b)
     x+idlemax*y in n x+idlemax*y x idlemax*y idlemax y n count+=1 count 1 a=0 a 0 b=0 b 0 A=x+Xa+a+idlemax*(y+Ya+b) A x+Xa+a+idlemax*(y+Ya+b) x+Xa+a x+Xa x Xa a idlemax*(y+Ya+b) idlemax y+Ya+b y+Ya y Ya b while A in n:
                n.remove(A)
                a+=Xa;b+=Ya
                A=x+Xa+a+idlemax*(y+Ya+b)

             A in n A n n.remove(A) n.remove n remove A a+=Xa a Xa b+=Ya b Ya A=x+Xa+a+idlemax*(y+Ya+b) A x+Xa+a+idlemax*(y+Ya+b) x+Xa+a x+Xa x Xa a idlemax*(y+Ya+b) idlemax y+Ya+b y+Ya y Ya b a=0 a 0 b=0 b 0 A=x-Xa-a+idlemax*(y-Ya-b) A x-Xa-a+idlemax*(y-Ya-b) x-Xa-a x-Xa x Xa a idlemax*(y-Ya-b) idlemax y-Ya-b y-Ya y Ya b while A in n:
                n.remove(A)
                a+=Xa;b+=Ya
                A=x-Xa-a+idlemax*(y-Ya-b)
     A in n A n n.remove(A) n.remove n remove A a+=Xa a Xa b+=Ya b Ya A=x-Xa-a+idlemax*(y-Ya-b) A x-Xa-a+idlemax*(y-Ya-b) x-Xa-a x-Xa x Xa a idlemax*(y-Ya-b) idlemax y-Ya-b y-Ya y Ya b value=min(value,count) value min(value,count) min value count print(value) print value N=int(input()) int(input()) N n=set([x+idlemax*y for x,y in XY]) set([x+idlemax*y for x,y in XY]) n A=x-Xa-a+idlemax*(y-Ya-b) x-Xa-a+idlemax*(y-Ya-b) A x2,y2=XY[b] XY[b] x2 x1,y1=XY[a] XY[a] x1 b=0 0 b a=0 0 a b=0 0 b input=lambda :sys.stdin.readline().rstrip() lambda :sys.stdin.readline().rstrip() input a+=Xa Xa a X=x1-x2 x1-x2 X a+=Xa Xa a alst=[] [] alst count+=1 1 count itelst=combinations(range(N),2) combinations(range(N),2) itelst Y=y1-y2 y1-y2 Y value=50 50 value b+=Ya Ya b value=min(value,count) min(value,count) value y1=XY[a] XY[a] y1 b+=Ya Ya b a=0 0 a A=x+Xa+a+idlemax*(y+Ya+b) x+Xa+a+idlemax*(y+Ya+b) A idlemax=10**18 10**18 idlemax y2=XY[b] XY[b] y2 A=x-Xa-a+idlemax*(y-Ya-b) x-Xa-a+idlemax*(y-Ya-b) A count=0 0 count XY=[list(map(int,input().split())) for i in range(N)] [list(map(int,input().split())) for i in range(N)] XY A=x+Xa+a+idlemax*(y+Ya+b) x+Xa+a+idlemax*(y+Ya+b) A
from collections import *
from heapq import *
from itertools import *
from fractions import gcd
import sys
from decimal import *
input=lambda :sys.stdin.readline().rstrip()

N=int(input())
if N==1:
    print(1)
    exit()
XY=[list(map(int,input().split())) for i in range(N)]
itelst=combinations(range(N),2)

alst=[]
for a,b in itelst:
    x1,y1=XY[a]
    x2,y2=XY[b]
    Y=y1-y2;X=x1-x2
    if X and Y:
        alst.append([X,Y])
    elif Y or X:
        alst.append([X,Y])



value=50
idlemax=10**18
for Xa,Ya in alst:
    n=set([x+idlemax*y for x,y in XY])

    count=0
    for x,y in XY:
        if x+idlemax*y in n:
            count+=1
            a=0;b=0
            A=x+Xa+a+idlemax*(y+Ya+b)
            while A in n:
                n.remove(A)
                a+=Xa;b+=Ya
                A=x+Xa+a+idlemax*(y+Ya+b)

            a=0;b=0
            A=x-Xa-a+idlemax*(y-Ya-b)
            while A in n:
                n.remove(A)
                a+=Xa;b+=Ya
                A=x-Xa-a+idlemax*(y-Ya-b)
    value=min(value,count)
print(value)
