//KZNS
#include <cstdio>
using namespace std;
void upd(double &u) {
int h = u;
u = h + ((u-h > 0)?1:0);
}
int gcd(int a, int b) {
if (b)
return gcd(b, a%b);
return a;
}
int main() {
freopen("ratio.in", "r", stdin);
freopen("ratio.out", "w", stdout);
double a, b, z;
int L;
scanf("%lf %lf", &a, &b);
scanf("%d", &L);
int aa, bb;
double ca = 1000000000;
double u;
z = a/b;
for (int i = 1; i <= L; i++) {
u = a/b*i;
upd(u);
if (u > L)
break;
if (gcd(u, i) > 1)
continue;
if (u/i - z < ca) {
ca = u/i - z;
aa = u;
bb = i;
}
}
printf("%d %d\n", aa, bb);
return 0;
}
//UWBH