#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;
int a[n], b[n];
map<int, int> idx;
for (int i = 0; i < n; i++)
{
cin >> a[i];
b[i] = a[i];
idx[a[i]] = i;
}
sort(b, b + n);
for (int i = 0; i < n; i++)
{
if (abs(idx[b[i]] - i) + 1 > k)
{
cout << "NO" << endl;
return;
}
}
cout << "YES" << endl;
for (int i = 0; i < n; i++)
{
if (a[i] != b[i])
{
cout << min(idx[a[i]], idx[b[i]]) + 1 << " " << max(idx[a[i]], idx[b[i]]) + 1 << endl;
return;
}
}
}
int main()
{
fast;
ll t;
solve();
return 0;
}