{
ZADATAK: prosim
JEZIK: PASCAL
}
program prosim;
var a,b,n:longint; t,f:text;
begin
assign(t,'prosim.in');
reset(t);
assign(f,'prosim.out');
rewrite(f);
read(t,a,b,n);
if a=1 then if b=9 then write(f,'1 4')
else write(f,a,' ',b);
close(t);
close(f);
end.