#K186. Anagram Checker

    ID: 24608 Type: Default 1000ms 256MiB

Anagram Checker

Anagram Checker

This problem requires you to determine whether two given strings are anagrams of each other. Two strings are anagrams if they can be rearranged to form one another. Mathematically, if s1 and s2 are the two strings, then they are anagrams if:

[ \text{sort}(s_1) = \text{sort}(s_2) ]

Your task is to read two strings and output "YES" if they are anagrams, and "NO" otherwise. The strings will contain only lowercase letters.

inputFormat

The input consists of two lines. The first line contains the first string, and the second line contains the second string. Both strings will contain only lowercase letters without any spaces.

outputFormat

Output a single line containing either "YES" if the two strings are anagrams of each other, or "NO" if they are not.

## sample
listen
silent
YES