#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;

bool isnp[100001];

int main(){
	for(int i = 2; i * i <= 100000; ++i){
		if( isnp[i] ) continue;
		for(int j = i * i; j <= 100000; j += i){
			isnp[j] = true;
		}
	}
	
	vector<int> p;
	for(int i = 2; i < 100000; ++i){
		if( !isnp[i] ) p.push_back(i);
	}
	
	int m, a, b;
	while( scanf("%d%d%d", &m, &a, &b), m != 0 ){
		int ms = 0, ma = 0, mb = 0;
		
		for(int i = 0; p[i] * p[i] <= m; ++i){
			int t = min(p[i] * b / a, m / p[i]);
			int x = upper_bound(p.begin(), p.end(), t) - p.begin() - 1;

			int s = p[i] * p[x];
			if( s <= m && s > ms ){
				ms = s;
				ma = p[i];
				mb = p[x];
			}
		}
		printf("%d %d\n", ma, mb);
	}
}