A = gets.to_i B = gets.to_i a = Rational(A, 5_000).to_f b = Rational(B, 200_000).to_f if (b / a).abs < 40 puts 1 else puts 2 end