#K60122. Anagram Checker
Anagram Checker
Anagram Checker
This problem requires you to determine if two given strings are anagrams of each other by ignoring all spaces, punctuation, and differences in letter case. In mathematical terms, if we let (S_1) and (S_2) be the multisets of letters (obtained by removing all non-alphabetical characters and converting everything to lowercase) of the two strings respectively, then the strings are anagrams if and only if (S_1 = S_2).
Your task is to write a program that reads two strings from the standard input and outputs either anagram
or not anagram
to the standard output.
inputFormat
The input consists of two lines. The first line contains the first string and the second line contains the second string. These strings may include spaces, punctuation, and a mix of uppercase and lowercase letters.
outputFormat
Output a single line: either anagram
if the two strings are anagrams of each other, or not anagram
if they are not.## sample
listen
silent
anagram