#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,m,z=0;
	cin>>n>>m;
	int k,k1=1,k2=1;
	cin>>k;
	for(int i=1;i<=sqrt(k)+1;i++)
	{
		for(int j=1;j<=sqrt(k)+1;j++)
		{
			if(i*j<=k&&i>=k1&&j>=k2)
			{
				k1=i;
				k2=j;
			}
		}
	}
	cout<<k2<<" "<<k1;
	/*
	    1
	   4 2
	  7 5 3
	 1 8 6
	  1 9
	   1
	   */
	return 0;
}