~/algor $ cat problems/eng-kop-uchragan-harf
Most frequent letter
Easy
1000 ms
64 MB
30%
A string $s$ of lowercase Latin letters is given. Find the letter that occurs in it most often and the number of its occurrences. If several letters are tied, take the one that comes first in the alphabet.
Input
One line containing the string $s$.
Output
One line with the letter and its count separated by a space.
Note
$1 \le |s| \le 10^{5}$
$s$ consists of lowercase Latin letters (a–z) only
Examples
Input #1
algoritm
Output #1
a 1
Input #2
banana
Output #2
a 3