You have been given two strings, A and B (of length N each) and Q queries.
The strings contain only 0s and/or 1s.
For every query, you are given an index i. You have to update the value at index i to 1 in string B and check if B is lexicographically equal to or larger than A or not.
If yes, then print "YES" and if not, print "NO" (without quotes).
Input format
Output Format
For each query, print the desired output in a new line.
Input Constraints
1≤N , Q≤106
1≤i≤N
After 1st query: B = 10010. B < A. (NO)
After 2nd query: B = 11010. B < A. (NO)
After 3rd query: B = 11110. B < A. (NO)
After 4th query: B = 11110. B < A. (NO)
After 5th query: B = 11111. B = A. (YES)