import algorithm var a, b = readLine stdin a.sort cmp b.sort cmp if a == b: echo "YES" else: echo "NO"