x=int(input())
y=input()
lis='acab'
r=False
if len(y)<4:
    print('NO')
else:
    t_c=0
    for i in range(len(y)):
        t=y[i]
        t_c+=1
        if lis[t_c-1]!=t:
            t_c=0
        if t_c==4:
            r=True
            t_akh=i-3
            t_c=0
if r==True:
    print('YES')
    print(t_akh,int(t_akh)+3)
else:
    print('NO')
        
            
        
