#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define MAX_M 100000


void primeCalc(int **pa,int *pn,int num){
	int i, j;
	int *prime = (int *)malloc(sizeof(int) * (num + 1)), *tmp;
	if(num < 2){
		return;
	}
	memset(prime,-1,sizeof(prime));
	prime[0] = prime[1] = 0;

	for(i = 2;i * i <= num;i++){
		if(prime[i]){
			for(j = i * 2;j <= num;j+=i){
				prime[j] = 0;
			}
		}
	}
	int cnt = 0;
	for(i = 0;i <= num;i++){
		if(prime[i]){
			if((tmp = (int *)realloc(*pa,sizeof(int) * (cnt + 1))) == NULL){
				while(1);
			}
			*pa = tmp;
			*(*pa + cnt++) = i;
		}
	}
	free(prime);
	*pn = cnt;
}


int main(void){
	int m, a, b, p, q, i, j, *pa = NULL /*prime array*/, pn /*prime number*/;
	// clock_t t = clock();
	primeCalc(&pa,&pn,MAX_M);
	// printf("time = %f\n",(double)(clock() - t) / CLOCKS_PER_SEC);
	while(1){
		scanf("%d%d%d",&m,&a,&b);
		if(m == 0 && a == 0 && b == 0){
			break;
		}
		p = q = 0;
		for(i = 0;i < pn;i++){
			for(j = i;j < pn && (double) a / b <= (double)pa[i] / pa[j];j++){
				if((double)pa[i] / pa[j] <= 1.0 && (long long int)pa[i] * (long long int)pa[j] <= m && (long long int)p * (long long int)q < (long long int)pa[i] * (long long int)pa[j]){
					p = pa[i];
					q = pa[j];
				}
			}
		}
		printf("%d %d\n",p,q);
	}
	free(pa);

	return 0;
}