#include <iostream>
using namespace std;
int gcd(int a, int b){
return b ? gcd(b, a % b) : a;
}
int main(){
int A, B, L; cin >> A >> B >> L;
double minv = 1e9;
int a, b;
for(int i = 1; i <= L; i ++ ){
for(int j = 1; j <= L; j ++ ){
if(gcd(i, j) == 1){
double t = i * 1.0 / j;
double cur = A * 1.0 / B;
if(t >= cur && t - cur < minv){
a = i, b = j;
minv = t - cur;
}
}
}
}
cout << a << ' ' << b << endl;
return 0;
}