#include<bits/stdc++.h>
using namespace std;
int main(){
double a,b,n,kkksc03,x,y,luogu=INT_MAX;
cin>>a>>b>>n;
kkksc03=a/b;
for(double i=1;i<=n;i++){
for(double j=1;j<=n;j++){
int q=i/j;
if(q>=kkksc03){
int s=q-kkksc03;
if(s<luogu){
luogu=s;
x=i;
y=j;
}
}
}
}
cout<<x<<" "<<y;
return 0;
} ```