program radio;
var
a,b,l,i,j,k,m:longint;
p,q,ans:double;
function gcd(x,y:longint):longint;
begin
if y=0 then exit(x) else exit(gcd(y,x mod y));
end;
begin
assign(input,'ratio.in');
reset(input);
assign(output,'ratio.out');
rewrite(output);
readln(a,b,l);
p:=a/b;
ans:=1010101010;
for i:=1 to l do
for j:=1 to l do
if (gcd(i,j)=1)and(i/j>=p)and(i/j-p<ans) then begin
ans:=i/j-p;
k:=i;
m:=j;
end;
writeln(k,' ',m);
close(input);
close(output);
end.