s = input().lower() alpha = [chr(ord("a")+i) for i in range(26)] cnt = 0 for i in alpha: if s.count(i) > cnt: cnt = s.count(i) res = i print(res, cnt)