class Yukicoder def initialize a, b = gets.chomp.split.map(&:to_i) 1.upto(200) do |i| 1.upto(200) do |j| c = Rational(100 * i, i+j).round d = Rational(100 * j, i+j).round if a == c && b == d puts i+j return end end end end end Yukicoder.new