#K58912. Are Anagrams?
Are Anagrams?
Are Anagrams?
Given two strings, determine whether they are anagrams of each other. Two strings are anagrams if they contain the same characters in the same frequencies, regardless of order. The comparison should be case-insensitive.
Formally, let \( s_1 \) and \( s_2 \) be the two input strings. They are anagrams if \( sorted(lower(s_1)) = sorted(lower(s_2)) \).
inputFormat
The input is read from standard input (stdin) and consists of two lines. The first line contains the first string and the second line contains the second string.
Constraints: The strings may be empty and consist of English letters.
outputFormat
Output a single line to standard output (stdout) containing True
if the two strings are anagrams, or False
otherwise.
listen
silent
True