class Yukicoder def initialize a, b = gets.chomp.split.map(&:to_i) 0.upto(200) do |i| 0.upto(200) do |j| next if i == 0 && j == 0 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