#C12. Checking Anagrams
Checking Anagrams
Checking Anagrams
Given two strings, determine if they are anagrams of each other. An anagram is formed by rearranging the letters of a different word or phrase, using all the original letters exactly once. In this problem, you should ignore spaces, punctuation, and capitalization. Formally, let \( S_1 \) and \( S_2 \) be the strings after removing non-alphanumeric characters and converting to lowercase. The strings are anagrams if and only if \( \text{sorted}(S_1) = \text{sorted}(S_2) \).
inputFormat
The input consists of two lines provided via stdin. The first line contains the first string and the second line contains the second string.
outputFormat
Output a single line to stdout containing either True
if the two strings are anagrams of each other, or False
otherwise.
Listen
Silent
True