require 'prime'
loop do
  m, a, b = gets.split.map(&:to_i)
  break if m == 0
  ans = [0, 0]
  prod = 0
  prime = Prime.each.lazy.take_while{ |p| p < 100000 }.to_a
  prime.take_while{ |x| x * x <= m }.each do |p|
    q = prime.drop_while{ |x| x < p  }
             .take_while{ |x| a * x <= b * p && p * x <= m }.to_a.last
    if q && p * q > prod
      ans = [p, q]
      prod = p * q
    end
  end
  puts ans * ' '
end