loop {
    m, a, b = gets.split.map &:to_i
    break if m == 0

    max = 0
    by = nil
    (0..primes.size-1).each{|i|
        p1 = primes[i]
        k = primes.bsearch_first_index{|x| x * b >= a * p1}
        (k..i).each{|j|
            p2 = primes[j]
            break if p1 * p2 > m
            if p1 * p2 > max
                by = [p2, p1]
                max = p1 * p2
            end
        }
    }
    puts by.join(" ")
}