#K72922. Anagrams Checker

    ID: 33861 Type: Default 1000ms 256MiB

Anagrams Checker

Anagrams Checker

You are given two strings. Your task is to determine whether they are anagrams of each other. Two strings are considered anagrams if and only if the letters contained in one string can be rearranged to form the other string, with case sensitivity taken into account. In other words, two strings \(s_1\) and \(s_2\) are anagrams if \(sorted(s_1) = sorted(s_2)\).

Examples:

  • listen and silent are anagrams.
  • triangle and integral are anagrams.
  • Listen and Silent are not anagrams because of case differences.

inputFormat

The input is read from standard input (stdin) and consists of two lines:

  • The first line contains the first string.
  • The second line contains the second string.

outputFormat

Print to standard output (stdout) a single line containing True if the two strings are anagrams of each other, and False otherwise.## sample

listen
silent
True