{$apptype console}

const v: int64 = int64(5 * 13 * 17 * 29) * 37 * 41;

var t, c: longint;
    x, y: array[0..1000]of longint;
    i, j: int64;

begin
  c := 0;
  for t := 0 to trunc(sqrt(1.0 * v)) do begin
    i := t;
    j := round(sqrt(1.0 * v - 1.0 * i * i));
    if i * i + j * j = v then begin
      inc(c);
      x[c] := i;
      y[c] := j;
    end;
  end;

  writeln(c * 4);
  for t := 1 to c do begin
    writeln(x[t], ' ', y[t]);
    writeln(-y[t], ' ', x[t]);
    writeln(-x[t], ' ', -y[t]);
    writeln(y[t], ' ', -x[t]);
  end;
end.