web-dev/hws/hw-1/anagram.py
2026-02-13 15:01:19 +03:00

10 lines
206 B
Python

s1 = input()
s2 = input()
if s1.isascii() and s2.isascii() and ' ' not in s1 and ' ' not in s2:
if sorted(s1) == sorted(s2):
print("YES")
else:
print("NO")
else:
print("Error")