#K39892. Anagram Checker
Anagram Checker
Anagram Checker
Given two strings, determine if they are anagrams of each other. Two strings are anagrams if they contain exactly the same characters, possibly in a different order. For example, "listen" and "silent" are anagrams, while "apple" and "pale" are not. Your task is to read two strings from standard input and output Anagram
if they are anagrams, or Not Anagram
otherwise. Handle all edge cases including empty strings and single-character strings.
inputFormat
The input consists of two lines. The first line contains the first string, and the second line contains the second string.
outputFormat
Output a single line: Anagram
if the two strings are anagrams of each other, otherwise output Not Anagram
.## sample
listen
silent
Anagram