eolymp
bolt
Try our new interface for solving problems

Moda

Time limit 1 second
Memory limit 128 MiB

Integers from 0 to 9 are given. The numbers are entered till 0. Print the number that appears most often and the number of its repetitions. It is known that only one digit is repeated most often.

Input data

Each line contains one digit 0, 1, 2, ..., 9.

Output data

In the first line print the number that appears most often. In the second line print the number of its repetitions.

Examples

Input example #1
3
7
5
7
2
0
Output example #1
7
2
Author Yuriy Kovalchuk