uses
    sysutils;
var
    dx, dy: longint;

begin
    dx := strToInt(paramstr(1));
    dy := strToInt(paramstr(2));
    randseed := strToInt(paramstr(3));

    writeln(random(dx * 2 + 1) - dx, ' ', random(dy * 2 + 1) - dy);
    writeln(random(dx * 2 + 1) - dx, ' ', random(dy * 2 + 1) - dy);
end.