LogiQuest

109. Most Frequent Character

EasyCounting

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

Input format

A single line of lowercase letters.

Output format

character count

Example 1

Input

hello

Output

l 2

Example 2

Input

aabbcc

Output

a 2

Constraints

1 ≤ |s| ≤ 10⁵

Read input from standard input and print the answer to standard output. Your code is judged against 6 test cases, most of them hidden.

Loading the MyLoginn IDE…