#C5153. Anagram Checker

    ID: 48771 Type: Default 1000ms 256MiB

Anagram Checker

Anagram Checker

Given two strings, determine whether they are anagrams of each other. Two strings are anagrams if they contain the same characters in a different order. Formally, let \( s_1 \) and \( s_2 \) be two strings, then they are anagrams if and only if:

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

Your task is to write a program that reads two strings from standard input and prints "YES" if they are anagrams and "NO" otherwise.

inputFormat

The input consists of two lines. The first line contains the first string \( s_1 \). The second line contains the second string \( s_2 \). Both strings contain only lowercase letters.

outputFormat

Output a single line: "YES" if the two strings are anagrams of each other, otherwise "NO".

## sample
listen
silent
YES