#C4587. Anagram Checker

    ID: 48141 Type: Default 1000ms 256MiB

Anagram Checker

Anagram Checker

In this problem, you are required to determine if two provided strings are anagrams of each other. Two strings are anagrams if, after removing all spaces and punctuation and converting every letter to lowercase, the characters can be rearranged to form each other. This essentially means that both strings should have the exact same frequency of each alphanumeric character. The transformation should ignore case, spaces, and punctuation.

For example, the strings "listen" and "silent" or "A gentleman" and "Elegant man" are considered anagrams. Note that input strings may also contain digits, which are compared as is. Your solution should read from standard input and output the result to standard output.

inputFormat

The input consists of two lines. The first line contains the first string. The second line contains the second string.

outputFormat

Output a single line containing either 'True' if the two strings are anagrams of each other, or 'False' otherwise.## sample

listen
silent
True