defmodule Main do def main do inputs = IO.binread(:all) |> String.split [a, b] = Enum.map(inputs, &(String.graphemes(&1))) IO.puts if(Enum.sort(a) == Enum.sort(b), do: "YES", else: "NO") end end