n = int(input())

s = input()

def find_pos(s,n):
    for i in range(n-1):
        if s[i] > s[i+1]:
            return i+1
    return -1


res = find_pos(s,n)
if res == -1:
    print('No')
else:
    print('Yes')
    print(res,res+1)