#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  int n, x, y;
  bool f = 0;
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); ++i) {
    if (s[i] > s[i + 1]) {
      f = 1;
      x = i + 1, y = i + 2;
      break;
    }
  }
  if (!f)
    cout << "NO\n";
  else {
    cout << "YES\n";
    cout << x << " " << y << endl;
  }
  return 0;
}
