#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int ans = 0;
  for (int i = 2; i < s.size(); i++) {
    if (s[i] < s[1]) ans = i;
  }
  if (ans == 0) {
    cout << "NO";
  } else {
    cout << "YES" << endl;
    cout << 2 << ' ' << ans + 1;
  }
}
