Var n, m, x, y, i, j: integer; begin write('n=');readln(n); write('m=');readln(m); write('x=');readln(x); write('y=');readln(y);
for i := -1 to 1 do for j := -1 to 1 do if (i <> j) and (i <> -j) and (x+i>0) and (x+i<n+1) and (y+j>0) and (y+j<m+1) then writeln('(', x+i, ',', y+j, ')'); end.
begin
write('n=');readln(n);
write('m=');readln(m);
write('x=');readln(x);
write('y=');readln(y);
for i := -1 to 1 do
for j := -1 to 1 do
if (i <> j) and (i <> -j) and
(x+i>0) and (x+i<n+1) and
(y+j>0) and (y+j<m+1) then
writeln('(', x+i, ',', y+j, ')');
end.