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