n = int(raw_input())
s = raw_input()
ans = None
for i in xrange(n-1):
    a = s[i:i+2]
    b = a[::-1]
    if b < a:
        ans = i+1
        break

if ans is not None:
    print 'YES'
    print ans, ans+1
else:
    print 'NO'
