{ Autorius: Vilius Visockas }
program gar;
  const
    fin = 'garden.in';
    fout = '';
    max = 260;
    daug = 10000000;
  type
    TT = array [0 .. max] of longint;
    Tmatrix = array [0 .. max] of TT;
    Trow = array [0 .. max] of longint;
  var
    f1, f2: text;
    matrix, old, sumos: Tmatrix;
    N, K, i, j, l, w: longint;
    best, a1, a2: longint;
    per, x1, y1, x2, y2: longint;
    table1, table2: Trow;
    ytop, ydown, xleft, xright: Trow;

procedure csumos;
  var i, j: longint;
begin
  fillchar (sumos, sizeof (sumos), 0);
  for i := 1 to w do
    for j := 1 to l do
      sumos [i, j] :=
      sumos [i - 1, j] + sumos [i, j - 1] - sumos [i - 1, j - 1] + matrix [i, j];
end;

function kiek (y1, x1, y2, x2: longint): longint;
begin
  kiek := sumos [y2, x2] -
          sumos [y2, x1 - 1] -
          sumos [y1 - 1, x2] +
          sumos [y1 - 1, x1 - 1];
end;

function min (a, b: longint): longint;
begin
  if a < b then min := a else min := b;
end;

procedure mirror1;
  var i: longint;
begin
  old := matrix;
  for i := 1 to w do
    matrix [i] := old [w - i + 1];
end;

procedure mirror2;
  var temp: longint;
begin
  old := matrix;
  for i := 1 to w do
    for j := 1 to l do
      matrix [j, i] := old [i, j];
  temp := w; w := l; l := temp;
end;

begin
  assign (f1, fin);
  assign (f2, fout);
  reset (f1);
  rewrite (f2);

  readln (f1, l, w);
  fillchar (matrix, sizeof (matrix), 0);
  readln (f1, N, K);

  for i := 1 to n do begin
    readln (f1, a1, a2);
    inc (matrix [w + 1 - a2, a1]);
  end;
  best := daug;

  { x asis }
  csumos;
  fillchar (ytop, sizeof (ytop), 120);
  fillchar (ydown, sizeof (ydown), 120);
  fillchar (xleft, sizeof (xleft), 120);
  fillchar (xright, sizeof (xright), 120);

  for x1 := 1 to l do
    for y1 := 1 to w do
      for x2 := x1 to l do
        for y2 := y1 to w do
          if kiek (y1, x1, y2, x2) = k then begin
            writeln (y1, ' ', x1, ' ', y2, ' ', x2);
            per := 2 * (x2 - x1 + y2 - y1 + 2);
            for i := 1 to y1 do
              ydown [i] := min (ydown [i], per);
            for i := y2 to w do
              ytop [i] := min (ytop [i], per);

            for i := x2 to l do
              xleft [i] := min (xleft [i], per);
            for i := 1 to x1 do
              xright [i] := min (xright [i], per);
          end;


  for i := 1 to w - 1 do
    best := min (best, ytop [i] + ydown [i + 1]);
  for i := 1 to l - 1 do
    best := min (best, xleft [i] + xright [i + 1]);
  if best = daug
    then writeln (f2, 'NO')
    else writeln (f2, best);
  close (f1);
  close (f2);
end.

