#include <bits/stdc++.h>   using namespace std;   int main() {     int n;     cin >> n;     if (n == 1) {       cout <<  yes  << endl;       cout <<  1 1 n ;       return 0;     }     vector<int> a(n);     for (int i = 0; i < n; i++) cin >> a[i];     int l = 0, r = 0;     while (l + 1 < n && a[l] < a[l + 1]) l++;     r = l + 1;     while (r < n && a[r] < a[r - 1]) r++;     reverse(a.begin() + l, a.begin() + r);     for (int i = 1; i < n; i++) {       if (a[i] < a[i - 1]) {         cout <<  no  << endl;         return 0;       }     }     cout <<  yes  << endl;     cout << l + 1 <<     << r << endl;     return 0;   }   