const
oo=maxlongint;
var
n,max,a,b,i,j,min,xx,yy,tot:longint;
s:real;
x,y:array[0..100]of longint;
procedure init;
var
i:longint;
begin
assign(input,'ppg.in'); reset(input);
assign(output,'ppg.out'); rewrite(output);
readln(n);
for i:=1 to n do readln(x[i],y[i]);
end;
begin
init;
min:=oo;
for i:=1 to n do
begin
max:=-oo;
xx:=x[i];
yy:=y[i];
for j:=1 to n do
if i<>j then
begin
a:=abs(x[j]-xx)+1;
b:=abs(y[j]-yy)+1;
s:=(b-a-1)/2;
if s<>trunc(s) then tot:=trunc(s-0.5)
else tot:=trunc(s);
tot:=tot+a;
if tot>max then max:=tot;
end;
if max<min then min:=max;
end;
writeln(min);
close(input);
close(output);
end.