## Algorithm

E. Exposition
time limit per test
1.5 seconds
memory limit per test
64 megabytes
input
standard input
output
standard output

There are several days left before the fiftieth birthday of a famous Berland's writer Berlbury. In this connection the local library decided to make an exposition of the works of this famous science-fiction writer. It was decided as well that it is necessary to include into the exposition only those books that were published during a particular time period. It is obvious that if the books differ much in size, the visitors will not like it. That was why the organizers came to the opinion, that the difference between the highest and the lowest books in the exposition should be not more than k millimeters.

The library has n volumes of books by Berlbury, arranged in chronological order of their appearance. The height of each book in millimeters is know, it is hi. As Berlbury is highly respected in the city, the organizers want to include into the exposition as many books as possible, and to find out what periods of his creative work they will manage to cover. You are asked to help the organizers cope with this hard task.

Input

The first line of the input data contains two integer numbers separated by a space n (1 ≤ n ≤ 105) and k (0 ≤ k ≤ 106) — the amount of books by Berlbury in the library, and the maximum allowed height difference between the lowest and the highest books. The second line contains n integer numbers separated by a space. Each number hi (1 ≤ hi ≤ 106) is the height of the i-th book in millimeters.

Output

In the first line of the output data print two numbers a and b (separate them by a space), where a is the maximum amount of books the organizers can include into the exposition, and b — the amount of the time periods, during which Berlbury published a books, and the height difference between the lowest and the highest among these books is not more than k milllimeters.

In each of the following b lines print two integer numbers separated by a space — indexes of the first and the last volumes from each of the required time periods of Berlbury's creative work.

Examples
input
Copy
`3 314 12 10`
output
Copy
`2 21 22 3`
input
Copy
`2 010 10`
output
Copy
`2 11 2`
input
Copy
`4 58 19 10 13`
output
Copy
`2 13 4`

## Code Examples

### #1 Code Example with C++ Programming

```Code - C++ Programming```

``````#include <cstdio>
#include <iostream>
#include <vector>
#include <set>

int main(){

long n, k; scanf("%ld %ld", &n, &k);
std::vector<long> h(n + 1); for(long p = 1; p <= n; p++){scanf("%ld", &h[p]);}
std::multiset<long> ms;
std::vector<std::pair<long, long> > dur;
long left(1), maxLength(0);

for(long p = 1; p <= n; p++){
ms.insert(h[p]);
while(*ms.rbegin() - *ms.begin() > k){ms.erase(ms.find(h[left])); left++;}
if(p - left + 1 > maxLength){maxLength = p - left + 1; dur.erase(dur.begin(), dur.end()); dur.push_back(std::make_pair(left, p));}
else if(p - left + 1 == maxLength){dur.push_back(std::make_pair(left, p));}
}

printf("%ld %ld\n", maxLength, dur.size());
for(long p = 0; p < dur.size(); p++){printf("%ld %ld\n", dur[p].first, dur[p].second);}

return 0;
}``````
Copy The Code &

Input

cmd
3 3
14 12 10

Output

cmd
2 2
1 2
2 3

## Demonstration

Codeforces Solution-E. Exposition-Solution in C, C++, Java, Python