#K84207. Increasing Subarray

    ID: 36368 Type: Default 1000ms 256MiB

Increasing Subarray

Increasing Subarray

Given an array of integers representing weekly plays, determine if there exists a contiguous subarray of length t where the plays are strictly increasing week-over-week. In other words, for a subarray beginning at index \(i\) (1-indexed), the condition \(A_i < A_{i+1} < \dots < A_{i+t-1}\) must hold. If such a subarray exists, output "Yes" followed by the starting index; otherwise, output "No".

inputFormat

The input is given in two lines. The first line contains two integers: \(n\) (the number of weeks) and \(t\) (the required length of the subarray). The second line contains \(n\) space-separated integers, representing the play counts for each week.

outputFormat

Output a single line. If there exists a strictly increasing subarray of length \(t\), output "Yes" followed by a space and the 1-indexed starting position of that subarray. Otherwise, output "No".

## sample
7 3
5 6 7 3 8 9 10
Yes 1