cho.sh
NotesCho Mini
Loading...

Average and Mode

Time limit

1s

Memory limit

128 MB

Problem

Ten natural numbers are given. The average is the sum of the given numbers divided by the number of values, and the mode is the value that appears most often.

For instance, the average of 10, 40, 30, 60, 30, 20, 60, 30, 40, 50 is (10 + 40 + 30 + 60 + 30 + 20 + 60 + 30 + 40 + 50) / 10 = 37. In these values, 30 appears three times, more than any other value, so the mode is 30.

Given ten natural numbers, compute their average and mode.

Input

From the first line through the tenth line, one natural number is given per line. Each number is a multiple of 10 and is less than 1,000.

Output

Print the average on the first line. Print the mode on the second line.

If there is more than one mode, print any one of them. Both the average and the mode are natural numbers.