Leticija is preparing for a programming exam. She has solved many tasks, but one is still unsolved, so she is asking you for help.
You are given a word S and Q queries. Each query gives positive integers A, B, C, D. Let X be the word made of the letters of S from position A to position B, and let Y be the word made of the letters from position C to position D.
For each query, decide whether the letters of Y can be rearranged into X.