import strutils, algorithm let A, B = stdin.readLine if A.sorted(cmp) == B.sorted(cmp): echo "YES" else: echo "NO"