#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define arr_for(n) for (int i = 0; i < n; i++)
#define arrj_for(n) for (int j = 0; j < n; j++)
#define rev_arr_for(n) for (int i = n - 1; i >= 0; i--)
#define for_one(n) for (int i = 1; i <= n; i++)
#define pf push_front
#define ppf pop_front
#define pb push_back
#define ppb pop_back
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define newl "\n"
using namespace std;
void solve() {
ll n, k;
cin >> n >> k;
vector<ll> v(n), sorted;
for (auto &x : v)
cin >> x;
sorted = v;
sort(all(sorted));
int l = -1, r = -1;
for (int i = 0; i < n; i++) {
if (sorted[i] != v[i]) {
if (l == -1)
l = i + 1;
r = i + 1;
}
}
if (r - l + 1 > k) {
cout << "NO" << newl;
} else {
cout << "YES" << newl;
cout << l << " " << r << newl;
}
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
#ifdef ONPC
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int testcase = 1;
// cin >> testcase;
while (testcase--) {
solve();
}
return 0;
}