LearnPy Hub
← Arena
IntermediateRating 1200

Anagram Families

Words that are anagrams of each other form a family. Print the number of families and the size of the largest.

Input

n, then n words.

Output

Two numbers.

Sample 1

Input
6
eat
tea
tan
ate
nat
bat
Output
3 3

Sample 2

Input
1
x
Output
1 1
solution.py
Output appears here
Anagram Families · Python Arena problem · LearnPy Hub