var i,a,b,a1:integer; begin readln(a,b); a1:=abs(a); for i:=1 to a1 do begin if (a mod i=0) and (b mod i=0) then begin a:=a div i; b:=b div i; if (i >= a) or ( i >= b) then i:=1; end; end; writeln('c=',a,' d=',b); end.