require 'prime'
loop do
  m, a, b = gets.split.map(&:to_i)
  break if m == 0
  ans = []
  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
    ans << [p * q, p, q] if q
  end
  puts ans.sort[-1][1..2] * ' '
end