#C9104. Anagram Checker

    ID: 53161 Type: Default 1000ms 256MiB

Anagram Checker

Anagram Checker

Given two strings, determine if they are anagrams of each other. Two strings are anagrams if one string can be rearranged to form the other using all the original letters exactly once. In checking for anagrams, ignore case, spaces, and punctuation.

For example, "Dormitory" and "Dirty room" are anagrams.

Write a program that reads two lines from standard input. Each line contains a string. The program should output True if the strings are anagrams of each other, and False otherwise.

The mathematical condition for two strings s1 and s2 to be anagrams can be written as:

$$ sorted(\text{normalize}(s1)) = sorted(\text{normalize}(s2)) $$ where \(\text{normalize}(s)\) represents the string obtained after removing spaces, punctuation, and converting all characters to lowercase.

inputFormat

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

outputFormat

Output a single line to standard output containing either True or False depending on whether the two strings are anagrams.

## sample
listen
silent
True