CPython lite logoProblemsContests

2097. Timosh and Number Theory #1

Timosh enjoys inventing problems related to number theory. One day, he claimed to have come up with a difficult challenge. According to the challenge, you are given queries where for each query:

  • Numbers a,b,x,y are given, and your task is to determine if there exists an interval [L,R] such that the count of numbers divisible by a is x, and the count of numbers divisible by b is y.

Input

On the first line, the number of queries is given, q(1q105).

The next q lines contain the queries, a,b,x,y(1a,b,x,y109).

Output

For each query, if such an interval can be found, print Yes; otherwise, print No.


Sample input 1

3
2 3 5 3
2 3 6 3
2 3 7 3

Sample output 1

Yes
Yes
No

Login to be able to submit.