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