Training Site
Sideways banner 8b44c02b768aa359c4d0a2bce3b247c6d7ab888f8b26852e9bfc3659c8c25612

Anagram Detection

Input: Standard Input (stdin)
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