Anagram: The transposition of letters from a word or phrase to form a new word or phrase.
In other words, an anagram is a rearrangement of the letters of a word/sentence to form another.
Examples include:
Mother-in-law --> Woman Hitler
The Morse code --> Here come dots
etc...
Task
Write a program which will compare two sentences and see if they are anagrams of each other (ignore spaces and punctuation). Your progam is to output "YES" if they are anagrams of each other and "NO" if they are not.
Constraints
2 strings of any length
Input
Your program should read from standard input the following data:
The first line contain string 1. The second line contains string 2.
Output
Your program should output to standard output "YES" or "NO".
Sample Input 1
Election results.
Lies? let's recount
Sample Output 1
YES
Sample Input 2
Astronomer
Star starer
Sample Output 2
NO