a=[]
lenth=int(input())
s=input()
for i in s:
    a.append(i)
num1,num2=-1,-1
i=0

while a[i]<=a[i+1]:
    i+=1 
    if i==lenth-1:
        break 
else:
    num1=i+1
    num2=i+2
if num1!=-1:
    print('yes')
    print( num1, num2)
else:
    print('no')