#C14182. Permutation Checker

    ID: 43803 Type: Default 1000ms 256MiB

Permutation Checker

Permutation Checker

You are given two strings. Your task is to determine whether they are permutations of each other when considering only the English letters (both uppercase and lowercase) and ignoring any non-alphabetic characters. In other words, remove all characters that are not in the range \(a\)-\(z\) or \(A\)-\(Z\) from each string, convert the letters to lowercase, and then check if the sorted sequences of characters in the two strings are the same.

For example, given the strings "a!b#c" and "c.b,a", after filtering and converting to lowercase, both become "abc", and hence they are permutations of each other. Note that if both strings become empty after the filtering process, they are considered permutations.

Note: The input will always be provided as strings via stdin.

The formal check can be expressed in LaTeX as:

[ \text{isPermutation}(s_1, s_2) = \begin{cases} \text{True} & \text{if } sort(filter(s_1)) = sort(filter(s_2)) \ \text{False} & \text{otherwise} \end{cases} ]

where \(filter(s)\) means removing all non-alphabetic characters from \(s\) and converting the remaining characters to lowercase.

inputFormat

The input consists of two lines. The first line contains the first string \(s_1\), and the second line contains the second string \(s_2\).

outputFormat

Output a single line: True if the two strings are permutations (after filtering), and False otherwise.

## sample
abc
abc
True

</p>