408183: GYM103048 D Divide

Memory Limit:512 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

D. Dividetime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard output

Cuber QQ once said, when one integer is the divisor of another integer, it is the most wonderful thing in the world, because obviously not every integer divides one another.

You are given $$$a=\prod_{i=l_1}^{r_1}i$$$ and $$$b=\prod_{i=l_2}^{r_2}i$$$, and you should tell whether the "most wonderful thing in the world" will happen, i.e., whether $$$a$$$ is a divisor of $$$b$$$.

Input

The first line contains an integer $$$T$$$ ($$$1\le T\le 10$$$), representing the number of test data.

One line for each test case, containing four space-separated integers $$$l_1, r_1, l_2, r_2 $$$ ($$$1 \le l_1 \le r_1 \le 10^7$$$, $$$1 \le l_2 \le r_2 \le 10^7$$$).

Output

Output "Yes" if $$$\prod_{i=l_1}^{r_1}i$$$ is a divisor of $$$\prod_{i=l_2}^{r_2}i$$$, and "No" otherwise.

ExampleInput
3
1 3 1 5
2 3 3 3
2 3 3 4
Output
Yes
No
Yes

加入题单

算法标签: