#include <bits/stdc++.h>
#define ll long long
#define pub push_back
#define fast \
ios_base::sync_with_stdio(0); \
cin.tie(0);
using namespace std;
void solve()
{
int n, k;
cin >> n >> k;
vector<int> nums;
for (int i = 1; i <= n; i++)
{
int x;
cin >> x;
nums.push_back(x);
}
vector<int> l(n), r(n);
int mn = 1e9, mx = -1e9;
for (int i = 0; i < n; i++)
{
mx = max(mx, nums[i]);
l[i] = mx;
mn = min(mn, nums[n - i - 1]);
r[n - i - 1] = mn;
}
int s = -1, e = -1;
for (int i = 0; i < n; i++)
{
if (l[i] > r[i] && s == -1)
s = i;
if (l[n - i - 1] > r[n - i - 1] && e == -1)
e = n - i - 1;
}
if (e - s + 1 > k)
cout << "NO" << endl;
else
{
cout << "YES" << endl;
cout << s + 1 << " " << e + 1 << endl;
}
}
int main()
{
fast;
ll t;
solve();
return 0;
}