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.
Mother-in-law --> Woman Hitler
The Morse code --> Here come dots
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.
2 strings of any length
Your program should read from standard input the following data:
The first line contain string 1. The second line contains string 2.
Your program should output to standard output "YES" or "NO".
Sample Input 1
Lies? let's recount
Sample Output 1
Sample Input 2
Sample Output 2