s=input()
f=0
for i in range(len(s)):
    f=0
    for j in range(i,len(s)):
        if ord(s[j])<ord(s[i]):
            print("YES")
            print(i+1,' ',j+1)
            f=1
            break
    if f==1:
        break
if f==0:
    print("NO")