#C1936. Earliest Book Return Day
Earliest Book Return Day
Earliest Book Return Day
You are given an integer representing the number of books and a list of integers where each integer indicates the number of days that a book can be borrowed. Your task is to determine the earliest return day and count how many books are due on that day. Formally, let and let be the number of times appears in the list. You should output and .
inputFormat
The input consists of two lines. The first line contains an integer () representing the number of books. The second line contains space-separated integers, where the -th integer represents the number of days for which the -th book can be borrowed.
outputFormat
Output a single line with two integers separated by a space: the earliest return day (i.e. the minimum number from the list) and the number of books that are due on that day.## sample
3
10 5 8
5 1
</p>