import std.stdio, std.conv, std.string, std.array, std.range, std.algorithm, std.container;
import std.math, std.random, std.bigint, std.datetime, std.format;
void main(string[] args){ if(args.length > 1) if(args[1] == "-debug") DEBUG = 1; solve(); }
void log()(){ writeln(""); } void log(T, A ...)(T t, lazy A a){ if(DEBUG) write(t, " "), log(a); } bool DEBUG = 0; 
string read(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }
// ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- //

void solve(){
	int n = read.to!int;
	
	S[] ss;
	foreach(i; 0 .. n) ss ~= S(read.to!long, read.to!long);
	
	int[long[2]] cnt;
	foreach(i; 0 .. n) foreach(j; 0 .. i){
		long[2] k = [ss[i].x - ss[j].x, ss[i].y - ss[j].y];
		if(k[0] < 0 || k[0] == 0 && k[1] < 0) k = [-k[0], -k[1]];
		if(k !in cnt) cnt[k] = 0;
		cnt[k] += 1;
	}
	log("cnt:", cnt);
	
	int best = -1;
	auto ks = cnt.keys;
	foreach(k; ks) best = max(best, cnt[k]);
	
	int ans = n - best;
	ans.writeln;
}
struct S{
	long x, y;
}
