Problem: There is an infinite -dimensional grid. Initially, a robot stands in the point . The robot can execute four commands:
- U — move from point to ;
- D — move from point to ;
- L — move from point to ;
- R — move from point to .
You are given a sequence of commands of length . Your task is to answer independent queries: given four integers , , and ; determine whether the robot visits the point , while executing a sequence , but the substring from to is reversed (i. e. the robot performs commands in order ).
Input Format: The first line contains two integers and () — the length of the command sequence and the number of queries, respectively.
The second line contains a string of length , consisting of characters U, D, L and/or R.
Then lines follow, the -th of them contains four integers , , and (; ) describing the -th query.
Output Format: For each query, print YES if the robot visits the point , while executing a sequence , but the substring from to is reversed; otherwise print NO.
Note: In the first query of the first sample, the path of the robot looks as follows:
In the second query of the first sample, the path of the robot looks as follows:
In the third query of the first sample, the path of the robot looks as follows: