import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author alecs6k
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        codeforces1 solver = new codeforces1();
        solver.solve(1, in, out);
        out.close();
    }

    static class codeforces1 {
        public static String inv(String x) {
            StringBuilder f = new StringBuilder(x);
            return f.reverse().toString();
        }

        public void solve(int testNumber, Scanner leer, PrintWriter out) {
            String cad = leer.next();
            String a = cad;
            int y = 2;
            int rr = 1;
            int p1 = 0, p2 = 0;
            boolean k = false;
            while (y < cad.length()) {
                for (int i = 0; i < cad.length() - rr; i++) {
                    String r1 = cad.substring(i, i + y);
                    String g = a.substring(0, i);
                    String g2 = a.substring((i + r1.length()));
                    //out.println((i+1)+" "+(i+r1.length()));
                    //out.println(g);
                    //out.println(g2);
                    //out.println(r1);
                    String aux = inv(r1);
                    String res = g + aux + g2;
                    if (res.compareTo(a) < 0) {
                        k = true;
                        p1 = i + 1;
                        p2 = i + r1.length();
                        break;
                    }
                    //out.println(res);
                }
                y++;
                rr++;
            }
            if (k) {
                out.println("YES");
                out.println(p1 + " " + p2);
            } else out.println("NO");
        }

    }
}

