gets x=gets.split.map{|e| e.to_i} y=Rational(x.last,x[0]) puts y