#K84552. Case-Insensitive Anagram Checker

    ID: 36444 Type: Default 1000ms 256MiB

Case-Insensitive Anagram Checker

Case-Insensitive Anagram Checker

Given two strings s1 and s2, determine whether s2 can be obtained by rearranging the characters of s1 in a case-insensitive manner. In other words, check if the two strings are anagrams of each other when letter case is ignored. Formally, let \(L(x)\) be the function that converts a letter to its lowercase, then the condition is that \(\text{Counter}(L(s1)) = \text{Counter}(L(s2))\) and in particular \(|s1| = |s2|\) must hold.

inputFormat

The input consists of two lines. The first line contains the string s1 and the second line contains the string s2. Both strings may contain alphabets and are to be compared in a case-insensitive manner.

outputFormat

Output a single line containing either 'True' if s2 can be formed by rearranging the characters of s1 (case-insensitive), or 'False' otherwise.## sample

listen
silent
True