require 'prime';

### constant

MAX_M = 100000

### main

max_p = Math.sqrt(MAX_M).to_i
primes = Prime.each(max_p).to_a
nprimes = primes.length

loop do
  m, a, b = gets.split.map(&:to_i)
  break if (m | a | b) == 0

  max_ar = 0
  max_pq = nil
  
  primes.each_with_index do |p0, i|
    for j in (i...nprimes)
      q0 = primes[j]
      break if p0 * q0 > m || a * q0 > b * p0
      ar = p0 * q0
      if max_ar < ar
        max_ar = ar
        max_pq = [p0, q0]
      end
    end
  end

  puts max_pq.join(' ')
end