#include<iostream>
using namespace std;
int main()
{
int a, b, l;
cin >> a >> b >> l;
double x = 0x3f3f3f3f, y = 1;
for(int i = 1; i <= l; i++)
{
for(int j = 1; j <= l; j++)
{
if((double)(i) / (double)(j) >= (double)(a) / (double)(b))
{
if(double(i) / (double)(j) < x / y) x = (double)(i), y = (double)(j);
}
}
}
cout << x << " " << y << endl;
return 0;
}