SDE Path

Are Two Words Anagrams

Easy

Are Two Words Anagrams

Decide whether two words use the same letters (frequency count).

Input format

A single line with two words S and T made of lowercase letters.

Output format

Print true if S and T are anagrams (the same letters with the same counts), otherwise false.

Constraints

  • Values fit in a 64-bit signed integer
  • Trailing whitespace and a trailing newline are ignored by the judge

Read from stdin, write to stdout. Sample cases below show the exact format.

Sample cases

Example 1
Input
listen silent
Expected output
true
Example 2
Input
hello world
Expected output
false