#include <bits/stdc++.h>
#define pb push_back
#define int long long
using namespace std;
const int mod = 998244353;
const int inf = 1e9 + 20;
const int N = 1e5+5;
int32_t main(){
cin.tie(0); cout.tie(0);
ios_base::sync_with_stdio(false);
int n, k;
cin>>n>>k;
vector<int> a(n), b(n);
for(int i = 0; i < n; i++){
cin>>a[i];
}
b = a;
sort(b.begin(), b.end());
int l = n-1, r = 0;
for(int i = 0; i < n; i++){
if(a[i] != b[i]){
l = min(l, i);
r = max(r, i);
}
}
if(r - l + 1 <= k){
cout<<"YES"<<endl;
cout<<l+1<<" "<<r+1<<endl;
}
else{
cout<<"NO"<<endl;
}
return 0;
}