#include <bits/stdc++.h>
#define int long long
#define sqrtl(x) sqrt(x)
using namespace std;
namespace solve {
namespace test_case {
void main() {
int n, k; cin >> n >> k;
vector<int> a(n);
for (auto &x: a) cin >> x;
int i (0), j(n);
while (a[i + 1] > a[i]) i++;
while (a[j - 1] > a[j]) j--;
if (j - i <= k) cout << "YES\n" << i + 1 << ' ' << j << '\n';
else cout << "NO\n";
}
}
void main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t (1); // cin >> t;
while (t--) {
test_case::main();
}
}
}
signed main() { solve::main(); }