#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, s1, s2;
  int n, i, a;
  cin >> n;
  cin >> s;
  s1 = s;
  reverse(s1.begin(), s1.end());
  if (s1 == s) {
    cout << "YES" << endl;
    cout << "2"
         << " " << n - 2 << endl;
  } else
    cout << "NO" << endl;
  return 0;
}
