#include <bits/stdc++.h>
using namespace std;
int n, i;
string s;
int main() {
  cout << "length ?" << endl;
  cin >> n;
  cout << "chaine ?" << endl;
  cin >> s;
  for (i = 1; i < n - 1; i++) {
    if (s[i] > s[i + 1]) {
      cout << "yes" << endl;
      cout << i + 1 << " " << i + 2 << endl;
      break;
      cout << "no" << endl;
    }
  }
  return 0;
}
