#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
vector<int> heights(n);
for (int i = 0; i < n; i++) {
cin >> heights[i];
}
// Identify the first segment of heights that is not non-decreasing
for (int l = 0; l < n; l++) {
for (int r = l + 1; r < min(n, l + k + 1); r++) {
// Create a copy of the segment to sort
vector<int> segment(heights.begin() + l, heights.begin() + r + 1);
sort(segment.begin(), segment.end());
// Check if the sorted segment fits into the original array
bool valid = true;
if (l > 0 && segment[0] < heights[l - 1]) {
valid = false; // Should be greater than or equal to the previous element
}
if (r < n - 1 && segment.back() > heights[r + 1]) {
valid = false; // Should be less than or equal to the next element
}
if (valid) {
cout << "YES" << endl;
cout << (l + 1) << " " << (r + 1) << endl; // Output in 1-indexed format
return 0;
}
}
}
// If we exhaust all options, return NO
cout << "NO" << endl;
return 0;
}