#program to reverse substring to obtain lexicographically less string
import sys
s = sys.stdin.readline().strip()
def thisFun(s):
    ans = []
    i = 0
    state = True
    while i <= len(s) - 2:
        while s[i] > s[i + 1]:
            print("YES")
            print(str(i + 1) + " " + str(i + 2))
            i = i + 1
            return ""
        i = i + 1
    print("NO")
    return ""
            
thisFun(s)

            
        
