Karan and Akshay love challenging each other with awesome algorithmic questions. Today, Karan decided to give Akshay a relatively easy question. Karan has string s of length N consisting entirely of lowercase latin characters and he loves double palindromes (defined below). So he asks Akshay Q questions about the string of the type -
l r - consider the substring s[l...r] and report if the characters in this substring can be rearranged to form a double palindrome.
A palindrome is a string that read same forwards and backwards.
Let's define a double palindrome as a string that is concatenation of two palindrome, "AB" is a double palindrome if "A" and "B" are palindrome.
Eg. "abbacddc" is a double palindrome because "abba" and "cddc" are both palindromes.
But, Akshay is a very lazy guy. He asks you to solve the task at hand!(Height of laziness!)
If it is possible then print "YES", without quotes else print "NO".
The first line of input contains one integer N denoting the size of the string.
The second line of input contains the string s itself. It is guaranteed that the string consists only of lowercase latin characters.
The third line contains one integer Q denoting the total number of queries.
Next Q lines each contain two integers l r denoting the queries.
For each query output a single line with the string "YES" if the characters in the substring represented by the corresponding query can be rearranged to form double palindrome else output the string "NO".
For 25% points :
For 75% points : original constraints
Note : Output is case sensitive
Note : Palindrome can't be empty
For query 1, the substring can be rearranged to make the string "abbacddc" which is a double palindrome because "abba" and "cddc" are both palindromes.