/**
* @author: Binoy Barman
* @created: 2024-11-05 20:46:43
**/
#include<bits/stdc++.h>
using namespace std;
#define nl '\n'
#define all(v) v.begin(), v.end()
#define Too_Many_Jobs int tts, tc = 1; cin >> tts; hell: while(tts--)
#define Dark_Lord_Binoy ios_base::sync_with_stdio(false); cin.tie(NULL);
#ifdef LOCAL
#include "debug/whereisit.hpp"
#else
#define dbg(...) 42
#endif
#define int long long
int32_t main() {
Dark_Lord_Binoy
#ifdef LOCAL
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
vector<int> b(a);
sort(all(b));
int l = 0, r = n - 1;
while(l + 1 < n && a[l] == b[l]) l++;
while(r - 1 >= 0 && a[r] == b[r]) r--;
if(l >= r || r - l + 1 <= k) {
cout << "YES" << nl;
if(l <= r) cout << l + 1 << " " << r + 1 << nl;
else cout << 1 << " " << 1 << nl;
} else {
cout << "NO" << nl;
}
return 0;
}