You are given a string $s$ consisting of $n$ lowercase Latin letters.

Let's define a substring as a contiguous subsegment of a string. For example, "acab" is a substring of "abacaba" (it starts in position $3$ and ends in position $6$), but "aa" or "d" aren't substrings of this string. So the substring of the string $s$ from position $l$ to position $r$ is $s[l; r] = s_l s_{l + 1} \dots s_r$.

You have to choose exactly one of the substrings of the given string and reverse it (i. e. make $s[l; r] = s_r s_{r - 1} \dots s_l$) to obtain a string that is less lexicographically. Note that it is not necessary to obtain the minimum possible string.

If it is impossible to reverse some substring of the given string to obtain a string that is less, print "NO". Otherwise print "YES" and any suitable substring.

String $x$ is lexicographically less than string $y$, if either $x$ is a prefix of $y$ (and $x \ne y$), or there exists such $i$ ($1 \le i \le min(|x|, |y|)$), that $x_i < y_i$, and for any $j$ ($1 \le j < i$) $x_j = y_j$. Here $|a|$ denotes the length of the string $a$. The lexicographic comparison of strings is implemented by operator < in modern programming languages​​.


-----Input-----

The first line of the input contains one integer $n$ ($2 \le n \le 3 \cdot 10^5$) — the length of $s$.

The second line of the input contains the string $s$ of length $n$ consisting only of lowercase Latin letters.


-----Output-----

If it is impossible to reverse some substring of the given string to obtain a string which is lexicographically less, print "NO". Otherwise print "YES" and two indices $l$ and $r$ ($1 \le l < r \le n$) denoting the substring you have to reverse. If there are multiple answers, you can print any.


-----Examples-----
Input
7
abacaba

Output
YES
2 5

Input
6
aabcfg

Output
NO



-----Note-----

In the first testcase the resulting string is "aacabba".

Difficulty: interview

Starter code:

Solutions:
n = int(input())
s = input()
for i in range(len(s) - 1):
	if s[i] > s[i + 1]:
		print("YES")
		print(i + 1, i + 2)
		return
print("NO")


def main():
    n = int(input())
    s = list(input())
    for i in range(1, n):
        if ord(s[i]) < ord(s[i - 1]):
            print("YES")
            print(i, i + 1)
            return 0
    print("NO")
    return 0

main()

from sys import *
from math import *


N = int(input())

S = input()

f = -1

for i in range(1, N):
    if S[i] < S[i-1]:
        f = i
        break
    
if f == -1:
    print("NO")

else:
    print("YES")
    print(i, end=' ')
    print(i  + 1)

import math
def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return n,b


def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return n,b,c


def dv():
	n, m = list(map(int, input().split()))
	return n,m


def dva():
	n, m = list(map(int, input().split()))
	b = [int(x) for x in input().split()]
	return n,m,b


def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return n,b,m,c


def dvs():
	n = int(input())
	m = int(input())
	return n, m


n = int(input())
s =  input()
new =  ''
a =  0 
b =  0
for i in range(n - 1):
	s1 =  s[i]
	s2 =  s[i +  1]
	if s1 > s2:
		new  =  s1 +  s2  
		a =  i
		b  =   i +  1 
		print('YES')
		print(a +1, b +  1 )
		return
print('NO')


n, s = int(input()), input()
for i in range(n - 1):
	if ord(s[i]) > ord(s[i + 1]):
		print ("YES")
		print (i + 1, i + 2, sep = ' ')
		return
print ("NO")

def solve():
	n = int(input())
	s = input()
	for i in range(n - 1):
		if s[i] > s[i + 1]:
			print('YES')
			print(i + 1, i + 2)
			return
	print('NO')
solve()


n = int(input())
s = input()

g = list(s)
if sorted(g) == g:
	print('NO')
else:
	print('YES')
	b = 'a'
	l = 0
	for i in range(len(s)):
		if s[i] < b:
			print(l, i + 1)
			return
		elif s[i] > b:
			b = s[i]
			l = i + 1

import sys
input = sys.stdin.readline

N=int(input())
S=input().strip()

for i in range(1,N):
    if ord(S[i-1])<=ord(S[i]):
        continue
    else:
        print("YES")
        print(i,i+1)
        return

print("NO")


N = int(input())
S = input()
def stoi(s):
    return ord(s)-97
for i in range(N-1):
    if stoi(S[i]) > stoi(S[i+1]):
        print("YES")
        print(i+1, i+2)
        break
else:
    print("NO")


from bisect import bisect_right as br
from bisect import bisect_left as bl
from collections import *
from itertools import *
import functools
import sys
from math import *
import random
import re
MAX = sys.maxsize
MAXN = 10**5+10
MOD = 10**9+7
def isprime(n):
    n = abs(int(n))
    if n < 2:
        return False
    if n == 2: 
        return True    
    if not n & 1: 
        return False
    for x in range(3, int(n**0.5) + 1, 2):
        if n % x == 0:
            return False
    return True

def mhd(a,b,x,y):
    return abs(a-x)+abs(b-y)

def numIN(x = " "):
    return(list(map(int,sys.stdin.readline().strip().split(x))))

def charIN(x= ' '):
    return(sys.stdin.readline().strip().split(x))

def arrIN():
    return list(numIN())

def dis(x,y):
    a = y[0]-x[0]
    b = x[1]-y[1]
    return (a*a+b*b)**0.5

def lgcd(a):
    g = a[0]
    for i in range(1,len(a)):
        g = math.gcd(g,a[i])
    return g

def ms(a):
    msf = -MAX
    meh = 0

    for i in range(len(a)):
        meh+=a[i]
        if msf<meh:
            msf = meh
        if meh<0:
            meh = 0
    return msf


def res(ans,t):
    print('Case #{}: {}'.format(t,ans))

n = int(input())
s = input()
for i in range(1,n):
    if s[i]<s[i-1]:
        print('YES')
        print(i,i+1)
        return

print('NO')


n = int(input())
s = input()
for i in range(n-1):
    if ord(s[i])>ord(s[i+1]):
        print("YES")
        print(i+1, i+2)
        break
else:
    print("NO")

n = int(input())
s = input()
if list(s) == sorted(s):
    print('NO')
else:
    i = 0
    while s[i] <= s[i + 1]:
        i += 1
    print('YES')
    print(i + 1, i + 2)

def main():
    n = int(input())
    s = input()
    l = -1
    r = -1
    for i in range(n-1):
        if ord(s[i+1]) < ord(s[i]):
            l = i+1
            r = i+2
            break

    if l != -1 and r != -1:
        print('YES')
        print(l,r)
    else:
        print('NO')

main()


n = int(input())
s = input()
for i in range(1, n):
    if s[i] < s[i - 1]:
        print("YES")
        print(i, i + 1)
        break
else:
    print("NO")


def mp():
    return map(int, input().split())

n = int(input())
s = input()

l = -1
for i in range(n - 1):
    if s[i] > s[i + 1]:
        l = i + 1
        break
if [i for i in s] == sorted([i for i in s]):
    print('NO')
else:
    print('YES')
    print(l, l + 1)

import sys
n = int(input())
string = input()
for i in range(len(string) - 1):
    if ord(string[i + 1]) < ord(string[i]):
        print('YES')
        print(i + 1, i + 2)
        return
print('NO')

#  =========     /\       /|    |====/|
#      |        /  \       |    |   / |
#      |       /____\      |    |  /  |
#      |      /      \     |    | /   |
#  ========= /        \  =====  |/====|  
#  code

def __starting_point():
    n = int(input())
    s = str(input())
    for i in range(n-1):
        if s[i] > s[i+1]:
            print('YES')
            print(i+1,i+2)
            quit()
    print('NO')
__starting_point()

n = int(input())
S = input()
mim = ord(S[0])
IN = 1
for i in range(n - 1):
    if IN and ord(S[i]) > ord(S[i + 1]):
        print('YES') 
        print(i + 1, i + 2)
        IN = 0
if IN:
    print('NO') 


#JMD
#Nagendra Jha-4096

 
import sys
import math

#import fractions
#import numpy
 
###File Operations###
fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile

###Defines...###
mod=1000000007
 
###FUF's...###
def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 
##### Main ####
t=1
for tt in range(t):
    n=int(input())
    s=str(input())
    f=1
    for i in range(n-1):
        if(s[i]>s[i+1]):
            print("YES")
            print(i+1,i+2)
            f=0
            break
    if(f):
        print("NO")
    #n,k,s= map(int, sys.stdin.readline().split(' '))
    #a=list(map(int,sys.stdin.readline().split(' ')))
    
    
#####File Operations#####
if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

n = int(input())
s = input()
prev = ""

T = True
for i in range(1, len(s)):
	if ord(s[i]) < ord(s[i - 1]):
		print("YES")
		print(i, i + 1)
		T = False
		break

if T:
	print("NO")

n=int(input())
s=input()
for i in range(1,n):
    if s[i]<s[i-1]:
        print("YES")
        print(i,i+1)
        return
print("NO")


n = int(input())
s = input()
k = 0
l = []
for i in range(len(s)-1):
    if(s[i]<=s[i+1]):
        k+=1
    else:
        l.append([i+1,i+2])
if(k==len(s)-1):
    print('NO')
else:
    print('YES')
    print(*l[0])