Skip to content
UPEEC

Most Frequent Character

Easy#strings#hashing· solved by 0 · time limit 2.0 s

Print the character that appears most often and its count. If several tie, print the alphabetically smallest.

Input

One lowercase word.

Output

The character and its count.

Constraints

1 to 10510^5 letters.

Sample 1

Input

banana

Output

a 3

Sample 2

Input

abc

Output

a 1

Sign in or join free to run and submit your solution.