#C141. Anagram Checker

    ID: 43711 Type: Default 1000ms 256MiB

Anagram Checker

Anagram Checker

This problem requires you to determine whether two given strings are anagrams of each other. Two strings are considered anagrams if one can be rearranged to form the other. In this problem, you must ignore case and any non-alphanumeric characters. Formally, if we let \( S_1 \) and \( S_2 \) be the cleaned versions of the two input strings (after removing non-alphanumeric characters and converting to lowercase), then the strings are anagrams if and only if:

\( sort(S_1) = sort(S_2) \)

where sort(S) represents the sequence of characters in \( S \) arranged in non-decreasing order.

Your task is to implement a program that reads two strings from the standard input and prints True if they are anagrams of each other, and False otherwise.

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 True if the two strings are anagrams of each other, and False otherwise.

## sample
Listen
Silent
True