N = int(input())

string = list(input())

result = None

for x in range(0, len(string)):
    first_char = string[x]
    for y in range(x + 1, len(string)):
        if first_char == string[y] and abs(x - y) > 1:
            result = (x + 1, y)
            break
    break

if result and "".join(string) != "".join(len(string) * string[0]):
    print("YES")
    print(result[0], result[1])
else:
    print("NO")