/*
Roses are red
Memes are neat
All my test cases are wrong
Lmao yeet
*/
import java.util.*;
import java.io.*;

   public class A
   {
      public static void main(String args[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));  
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int N = Integer.parseInt(st.nextToken());
         String str = infile.readLine();
         PriorityQueue<Character> pq = new PriorityQueue<Character>();
         for(char c: str.toCharArray())
            pq.add(c);
         for(int i=0; i < N; i++)
         {
            char c = pq.poll();
            if(c != str.charAt(i))
            {
               System.out.println("YES\n1 "+(N+1));
               return;
            }
         }
         System.out.println("NO");
      }
   }