lib C fun strtoll(s : UInt8*, p : UInt8**, b : Int32) : Int64 end class String def to_i64 C.strtoll(self, nil, 10) end end a = read_line.split.map(&.to_i) b = read_line.split.map(&.to_i) if a.sort == b.sort if a == b puts "Yes" else puts "Yes" puts 2 end else puts "No" end