#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];
}
for (int i = 0; i < n; ++i) {
for (int j = i; j < n && (j - i + 1) <= k; ++j) {
vector<int> segment(heights.begin() + i, heights.begin() + j + 1);
sort(segment.begin(), segment.end());
bool valid = true;
for (int m = 1; m < segment.size(); ++m) {
if (segment[m] < segment[m - 1]) {
valid = false;
break;
}
}
if (valid) {
cout << "YES\n" << i + 1 << " " << j + 1 << endl;
return 0;
}
}
}
cout << "NO" << endl;
return 0;
}