var
a,b,l,i,j,x,y,ansa,ansb:longint;
c,ansc:real;
function
hz(a,b:longint):boolean;
var
i:longint;
begin
if (a=1)or(b=1) then exit(true);
for i:=2 to trunc(sqrt(a)) do
if ((a mod i=0)and(b mod i=0))or((a mod i=0)and(b mod(a div i)=0))
then exit(false);
exit(true);
end;
begin
readln(a,b,l);
c:=a/b;
ansc:=maxint;
for i:=1 to l do
for j:=1 to l do
if hz(i,j)
then
if i/j>=c
then
if i/j<ansc
then
begin
ansc:=i/j;
ansa:=i;
ansb:=j;
end;
writeln(ansa,' ',ansb);
end.