D. Duel of Wrath
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

VegiCat and VegiDog are playing a special duel in Slay the Spire. VegiCat plays as Watcher A, and VegiDog plays as Watcher B. A and B have base attack powers $$$a$$$ and $$$b$$$ and initial health values $$$h_A$$$ and $$$h_B$$$, respectively.

At the start of each round, the game determines each Watcher's stance for that round. Each Watcher can be in one of the following two stances:

  • Normal: damage dealt and damage received are unchanged.
  • Wrath: damage dealt and damage received are both doubled.

For each attack, the damage initially equals the attacker's base attack power. It is doubled if the attacker is in Wrath and doubled again if the defender is in Wrath. Thus, the damage in each round is as follows:

  • If both characters are in Normal, A deals $$$a$$$ damage to B, and B deals $$$b$$$ damage to A.
  • If exactly one character is in Wrath, A deals $$$2a$$$ damage to B, and B deals $$$2b$$$ damage to A.
  • If both characters are in Wrath, A deals $$$4a$$$ damage to B, and B deals $$$4b$$$ damage to A.

Each round, both characters attack once simultaneously, and both health values decrease simultaneously. Both attacks take effect even if either character's health becomes $$$0$$$ or less during the round. At the end of the round, a character with health less than or equal to $$$0$$$ dies. If either character dies, the battle ends immediately; otherwise, the next round begins. Base attack powers never change, and health is never restored.

The stances for each round are determined by the game, not by the players. Any combination of the two characters' stances is possible in each round.

VegiCat wins only if B dies while A remains alive. If both characters die in the same round, VegiCat does not win. Determine whether VegiCat will win regardless of how both characters' stances change.

Input

The first line contains an integer $$$T$$$ ($$$1 \le T \le 10^5$$$), the number of test cases. The description of the test cases follows.

Each test case contains one line with four integers $$$a$$$, $$$b$$$, $$$h_A$$$, and $$$h_B$$$ ($$$1 \le a,b,h_A,h_B \le 10^{18}$$$), giving the characters' base attack powers and initial health values, respectively.

Output

For each test case, output YES if VegiCat will win regardless of how both characters' stances change, and NO otherwise. Output each answer on a separate line.

You can output the answer in any case. For example, yEs, yes, Yes, and YES are all accepted as positive responses.

Examples
Input
5
1 1 5 1
1 1 4 1
1 1 1 1
1 1 1 5
2 3 13 2
Output
YES
NO
NO
NO
YES
Input
4
3 2 18 13
3 2 16 13
3 2 9 13
3 2 17 13
Output
YES
NO
NO
YES
Note

In the first test case of the first sample, B always dies in the first round. A receives at most $$$4$$$ damage in that round and remains alive.

In the second test case of the first sample, A wins if both characters are normal in the first round. If both characters are in Wrath in the first round, both die. Therefore, the answer is NO.

In the second test case of the second sample, if both characters are normal for the first $$$4$$$ rounds, their remaining health values are $$$8$$$ and $$$1$$$. If both enter Wrath in round $$$5$$$, both die, so victory is not guaranteed.