require 'prime'
ps = Prime.each(10000).to_a
loop do
    m, a, b = gets.split.map(&:to_i)
    break if m == 0 && a == 0 && b == 0
    max = mp = mq = 0
    ps.each do |p|
        break if p * p > m
        ps.each do |q|
            next if q < p
            break if q.to_f*a.to_f/b.to_f > p
            break if p * q > m
            if p * q > max
                max = p * q
                mp = p
                mq = q
            end
        end
    end
    puts "#{mp} #{mq}"
end