Anagram Detection
Input: Standard Input (stdin)
Output: Standard Output (stdout)
Memory limit: 32 megabytes
Time limit: 1.0 seconds
Output: Standard Output (stdout)
Memory limit: 32 megabytes
Time limit: 1.0 seconds
Margot is doing a word puzzle. She needs to know if two words are anagrams - that is, they have the same letters in a different order. Write a program to help her.
Input
The input consists of two words on two lines. Each word consists of between 1 and 1,000 upper case english letters (A-Z).
Output
Output either yes
if the two words are anagrams or no
if they are not.
-
Sample Input 1
HELLO LOLEH
Sample Output 1
yes
-
Sample Input 2
APPLE ORANGE
Sample Output 2
no