gets z_a,*z,z_b = gets.chomp.split(" ").map(&:to_i) puts Rational(z_b,z_a)