You are given two strings s and t. You are also given the following operation to perform:
Is string t a subsequence of string s if you remove [si,si+1,....,sj−1,sj] substring from string s.
You are given q queries. Each query consists of indices i and j. If string t is a subsequence of the remaining string s, you are required to print Yes. Otherwise, print No.
Note: Each query is independent of each other.
Input format
Output format
If string t is a subsequence of the remaining string s, you are required to print Yes. Otherwise, print No.
The answer for each query should come in a new line.
Constraints
1≤|s|≤105
1≤|t|≤|s|
1≤q≤105
1≤i≤j≤|s|
Both strings s and t contain lowercase English alphabets
Query 1: Remaining string s= "axy", clearly "ax" is a subsequence of this string.
Query 2: Remaining string s="abcaby", clearly "ax" is not a subsequence of this string.