#BS0000011. Các Giáo hoàng (Popes)
Các Giáo hoàng (Popes)
Popes
Source: UVa
Version: Phuoc Hung OJ Extended
Problem Statement
You are given the election years of the Popes in non-decreasing chronological order. Several elections may occur in the same year.
For a positive integer , a -year period starting in year contains the years from through .
Find a -year period containing the maximum number of elections. Print the maximum count, the election year of the first Pope in that period, and the election year of the last Pope in that period. If several periods have the same maximum count, choose the oldest one.
Input
The first line contains .
The second line contains .
The next lines contain the election years in non-decreasing order.
Output
Print three integers: the maximum number of elections, the first election year, and the last election year.
Subtasks
- Subtask 1 — 20%: .
- Subtask 2 — 30%: .
- Subtask 3 — 50%: , the last year , and .
Examples
Input
5
20
1
2
3
6
8
12
13
13
15
16
17
18
19
20
20
21
25
26
30
31
Output
6 16 20
Explanation
The five-year period from through contains six elections: .