def scan; gets.split.map{|e|Rational(e)};end # ๐ŸŽ def kadomatu?(a,b,c) a!=b&&b!=c&&c!=a&&((ac)||(a>b&&b