program crusade(input,output);
type
point=record
x,y:integer;
end;
var
sou,goal:array[1..250000]of point;
ans:array[1..250000]of longint;
m,n,a,b:longint;
procedure ini;
var i:integer;
begin
assign(input,'crusade.in');assign(output,'crusade.out');
reset(input);rewrite(output);
readln(n,m,a,b);
for i:=1 to a do readln(sou[i].x,sou[i].y);
for i:=1 to b do readln(goal[i].x,goal[i].y);
for i:=1 to b do ans[i]:=999999999;
end;
procedure main;
var i,j:integer;
begin
for i:=1 to a do
for j:=1 to b do
if abs(sou[i].x-goal[j].x)+abs(sou[i].y-goal[j].y)<ans[j] then
ans[j]:=abs(sou[i].x-goal[j].x)+abs(sou[i].y-goal[j].y);
for i:=1 to b do writeln(ans[i]);
close(input);close(output);
end;
begin
ini;
main;
end.