#C47. Anagram Detector

    ID: 48266 Type: Default 1000ms 256MiB

Anagram Detector

Anagram Detector

Given two strings S1 and S2, determine if they are anagrams of each other. Two strings are considered anagrams if they consist of the same characters in the same frequency, regardless of case and spaces. In other words, after removing all spaces and converting both strings to lowercase, the sorted sequence of characters must be identical.

For example, Listen and Silent are anagrams. Your task is to read these two strings from standard input, process them according to the criteria, and output True if they are anagrams or False otherwise.

inputFormat

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

outputFormat

Output a single line: True if S1 and S2 are anagrams (ignoring case and spaces), otherwise output False.## sample

Listen
Silent
True

</p>