import sys
import collections

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007

#+++++

def main():
	n = int(input())
	dd=[]
	for _ in range(n):
		b , c = tin()
		dd.append([b,c])
	#s = input()
	dist_dict=collections.defaultdict(lambda :0)
	for i,(xa, ya) in enumerate(dd):
		for xb, yb in dd:#[i+1:]:
			if xa==xb and ya == yb:
				continue
			dist_dict[str(xa-xb)+'_'+str(ya-yb)]+=1
			dist_dict[str(xb-xa)+'_'+str(yb-ya)]+=1
	rr=0
	for k in dist_dict:
		rr=max(rr,dist_dict[k])
		#print(k,dist_dict[k])
	return n-int(rr//2)
		
	
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret) import sys sys import collections collections input_methods=['clipboard','file','key'] input_methods ['clipboard','file','key'] 'clipboard' 'file' 'key' using_method=0 using_method 0 input_method=input_methods[using_method] input_method input_methods[using_method] input_methods using_method tin=lambda : map(int, input().split()) tin lambda : map(int, input().split()) map(int, input().split()) map int input().split() ().split () input split lin=lambda : list(tin()) lin lambda : list(tin()) list(tin()) list tin() tin mod=1000000007 mod 1000000007 def main():
	n = int(input())
	dd=[]
	for _ in range(n):
		b , c = tin()
		dd.append([b,c])
	#s = input()
	dist_dict=collections.defaultdict(lambda :0)
	for i,(xa, ya) in enumerate(dd):
		for xb, yb in dd:#[i+1:]:
			if xa==xb and ya == yb:
				continue
			dist_dict[str(xa-xb)+'_'+str(ya-yb)]+=1
			dist_dict[str(xb-xa)+'_'+str(yb-ya)]+=1
	rr=0
	for k in dist_dict:
		rr=max(rr,dist_dict[k])
		#print(k,dist_dict[k])
	return n-int(rr//2)
		
	
	
	
#+++++ main n = int(input()) n int(input()) int input() input dd=[] dd [] for _ in range(n):
		b , c = tin()
		dd.append([b,c])
	#s = input()
	 _ range(n) range n b , c = tin() b tin() tin c dd.append([b,c]) dd.append dd append [b,c] b c dist_dict=collections.defaultdict(lambda :0) dist_dict collections.defaultdict(lambda :0) collections.defaultdict collections defaultdict lambda :0 0 for i,(xa, ya) in enumerate(dd):
		for xb, yb in dd:#[i+1:]:
			if xa==xb and ya == yb:
				continue
			dist_dict[str(xa-xb)+'_'+str(ya-yb)]+=1
			dist_dict[str(xb-xa)+'_'+str(yb-ya)]+=1
	 i (xa, ya) xa ya enumerate(dd) enumerate dd for xb, yb in dd:#[i+1:]:
			if xa==xb and ya == yb:
				continue
			dist_dict[str(xa-xb)+'_'+str(ya-yb)]+=1
			dist_dict[str(xb-xa)+'_'+str(yb-ya)]+=1
	 xb yb dd if xa==xb and ya == yb:
				continue
			 xa==xb and ya == yb xa==xb xa xb ya == yb ya yb continue dist_dict[str(xa-xb)+'_'+str(ya-yb)]+=1 dist_dict[str(xa-xb)+'_'+str(ya-yb)] dist_dict str(xa-xb)+'_'+str(ya-yb) str(xa-xb)+'_' str(xa-xb) str xa-xb xa xb '_' str(ya-yb) str ya-yb ya yb 1 dist_dict[str(xb-xa)+'_'+str(yb-ya)]+=1 dist_dict[str(xb-xa)+'_'+str(yb-ya)] dist_dict str(xb-xa)+'_'+str(yb-ya) str(xb-xa)+'_' str(xb-xa) str xb-xa xb xa '_' str(yb-ya) str yb-ya yb ya 1 rr=0 rr 0 for k in dist_dict:
		rr=max(rr,dist_dict[k])
		#print(k,dist_dict[k])
	 k dist_dict rr=max(rr,dist_dict[k]) rr max(rr,dist_dict[k]) max rr dist_dict[k] dist_dict k return n-int(rr//2) n-int(rr//2) n int(rr//2) int rr//2 rr 2 isTest=False isTest False def pa(v):
	if isTest:
		print(v)
		 pa if isTest:
		print(v)
		 isTest print(v) print v v v def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l input_clipboard import clipboard clipboard input_text=clipboard.get() input_text clipboard.get() clipboard.get clipboard get input_l=input_text.splitlines() input_l input_text.splitlines() input_text.splitlines input_text splitlines for l in input_l:
		yield l l input_l yield l l if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret) __name__ == "__main__" __name__ "__main__" if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	 sys.platform =='ios' sys.platform sys platform 'ios' if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		 input_method==input_methods[0] input_method input_methods[0] input_methods 0 ic=input_clipboard() ic input_clipboard() input_clipboard input = lambda : ic.__next__() input lambda : ic.__next__() ic.__next__() ic.__next__ ic __next__ elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		 input_method==input_methods[1] input_method input_methods[1] input_methods 1 sys.stdin=open('inputFile.txt') sys.stdin sys stdin open('inputFile.txt') open 'inputFile.txt' isTest=True isTest True ret = main() ret main() main if ret is not None:
		print(ret) ret is not None ret None print(ret) print ret using_method=0 0 using_method def main():
	n = int(input())
	dd=[]
	for _ in range(n):
		b , c = tin()
		dd.append([b,c])
	#s = input()
	dist_dict=collections.defaultdict(lambda :0)
	for i,(xa, ya) in enumerate(dd):
		for xb, yb in dd:#[i+1:]:
			if xa==xb and ya == yb:
				continue
			dist_dict[str(xa-xb)+'_'+str(ya-yb)]+=1
			dist_dict[str(xb-xa)+'_'+str(yb-ya)]+=1
	rr=0
	for k in dist_dict:
		rr=max(rr,dist_dict[k])
		#print(k,dist_dict[k])
	return n-int(rr//2)
		
	
	
	
#+++++ def main():
	n = int(input())
	dd=[]
	for _ in range(n):
		b , c = tin()
		dd.append([b,c])
	#s = input()
	dist_dict=collections.defaultdict(lambda :0)
	for i,(xa, ya) in enumerate(dd):
		for xb, yb in dd:#[i+1:]:
			if xa==xb and ya == yb:
				continue
			dist_dict[str(xa-xb)+'_'+str(ya-yb)]+=1
			dist_dict[str(xb-xa)+'_'+str(yb-ya)]+=1
	rr=0
	for k in dist_dict:
		rr=max(rr,dist_dict[k])
		#print(k,dist_dict[k])
	return n-int(rr//2)
		
	
	
	
#+++++ main isTest=False False isTest input_methods=['clipboard','file','key'] ['clipboard','file','key'] input_methods ret = main() main() ret isTest=True True isTest input_method=input_methods[using_method] input_methods[using_method] input_method def pa(v):
	if isTest:
		print(v)
		 def pa(v):
	if isTest:
		print(v)
		 pa def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l input_clipboard input = lambda : ic.__next__() lambda : ic.__next__() input tin=lambda : map(int, input().split()) lambda : map(int, input().split()) tin ic=input_clipboard() input_clipboard() ic mod=1000000007 1000000007 mod lin=lambda : list(tin()) lambda : list(tin()) lin
import sys
import collections

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007

#+++++

def main():
	n = int(input())
	dd=[]
	for _ in range(n):
		b , c = tin()
		dd.append([b,c])
	#s = input()
	dist_dict=collections.defaultdict(lambda :0)
	for i,(xa, ya) in enumerate(dd):
		for xb, yb in dd:#[i+1:]:
			if xa==xb and ya == yb:
				continue
			dist_dict[str(xa-xb)+'_'+str(ya-yb)]+=1
			dist_dict[str(xb-xa)+'_'+str(yb-ya)]+=1
	rr=0
	for k in dist_dict:
		rr=max(rr,dist_dict[k])
		#print(k,dist_dict[k])
	return n-int(rr//2)
		
	
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)