#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

void makePrimeNumber(int N, vector<bool>& prime) // 0ツ暗按湘」Nツ暗按可コツづ個青ョツ青板つゥツづァツ素ツ青板づーツ探ツつキ
{
    prime.assign(N+1, true);
    prime [0] = prime[1] = false;
    for(int i=2; i*i<=N; i++){
        if(prime[i]){
            for(int j=i; i*j<=N; j++){
                prime[i*j] = false;
            }
        }
    }
}

int main()
{
    vector<bool> prime;
    makePrimeNumber(50000, prime);

    for(;;){
        int m, a, b;
        cin >> m >> a >> b;
        if(m == 0)
            return 0;

        int p1 = 0;
        int q1 = 0;
        for(int p=1; p*p<=m; ++p){
            if(!prime[p])
                continue;
            int q = p;
            while(p * q <= m && a * q <= p * b){
                if(prime[q] && p * q >= p1 * q1){
                    p1 = p;
                    q1 = q;
                }
                ++ q;
            }
        }

        cout << p1 << ' ' << q1 << endl;
    }
}