import java.util.*;
public class MyClass {
    public static void main(String args[]) {
        Scanner sc=new Scanner(System.in);
        int n=Integer.parseInt(sc.nextLine());
        String s =sc.nextLine();
        for(int i=0;i<n-1;i++){
            if(s.charAt(i)<=s.charAt(i+1))continue;
            System.out.println("Yes");
            System.out.print((i+1)+""+(i+2));
            return;
        }
        System.out.print("No");
    }
}
