Comparison of substrings#8736

Comparison of substrings

1 second
64 megabytes
Medium

Given a string , you need to determine if two specified substrings are equal for multiple queries.

Input

The first line contains the string (1 \leq |S| \leq 10^5). The second line contains an integer , the number of queries (1 \leq m \leq 10^5). Each of the following lines contains four integers: , , , and , representing the indices of the substrings.

Output

For each query, print "Yes" if the substrings [S_a \ldots S_b] and [S_c \ldots S_d] are identical, otherwise print "No".

Examples

Example 1

Loading
Loading