#include<bits/stdc++.h>
using namespace std;
char nl = '\n';
using i64 = long long;
void solve(int t) {
// cout << "test #" << t << nl;
int n, k; cin >> n >> k;
vector<pair<int, int>> A(n);
for (int i = 0; i < n; i++) {
cin >> A[i].first;
A[i].second = i;
}
sort(A.begin(), A.end());
int mx = -1, mn = n;
for (int i = 0; i < n; i++) {
if (A[i].second != i) {
mx = max(mx, i);
mn = min(mn, i);
}
}
if (mx - mn + 1 <= k) {
cout << "YES" << nl;
cout << mn + 1 << " " << mx + 1 << nl;
} else {
cout << "NO" << nl;
}
}
int main() {
int tt = 1;
// cin >> tt;
for(int t = 1; t <= tt; t++) solve(t);
}