#include<iostream>#include<cstring>#include<bits/stdc++.h>usingnamespace std;int b[26]={};// 存放每个字母的个数。intmain(){
string s;
cin >> s;for(int i =0; i < s.size(); i++){if(s[i]>='a'){
s[i]=(char)(s[i]-32);}}sort(s.begin(),s.end());//先排序,美啊。for(int i =0; i < s.size(); i++){
b[(int)s[i]]++;}int max =0;char ch;for(int i =65; i <=90;i++){//'A'--'Z'if(b[i]> max){
max = b[i];
ch =char(i);}}
cout << max <<" "<< ch <<endl;return0;}