Kaosar And Game#12261

Kaosar And Game

1 second
256 megabytes
Medium

You and your friend Kaosar are playing a game on a staircase of stairs with a robot. The rules are as follows:

In each turn, a player can jump the robot up to stairs forward.

For example: If k = 3, a player can control the robot to jump , , or stairs in a single move.

There is also a special move called a fake jump:

When using a fake jump, the player pretends to control the robot to jump but stays on the same stair.

You can use at most fake jumps while your friend Kaosar can use at most fake jumps.

The winner is the player who jumps over the last stair first.

Assuming both players play optimally, your task is to determine if you will win the game (You're playing first).

Input

The first line contains a single integer (1 \leq t \leq 1000).

Each of the following lines contains integers n,k,p,q (2\leq n\leq 10^9), k(1 \leq k < n) and (0\leq p,q \leq 10^9) – the length of the stair, the maximum jump length you control the robot to move, the number of fake jumps you can use, and the number of fake jumps Kaosar can use.

Output

For each test case, print "YES" if possible; otherwise, print "NO".

You can output the answer in any case (for example, the strings "yEs", "yes", "Yes", and "YeS" will be recognized as positive responses).

Examples

Example 6

Loading
Loading

Note

In the first test case there are stairs; at first the robot is on stair , now it's your move and you can move the robot into the nd or rd stair, but if you move the robot to any one of those stairs, your friend will easily jump over the rd stair. So as you can fake a jump, you won't move the robot from that stair. Now it's Kaosar's turn; as he doesn't have any jump to fake, he must move the robot forward, and when he does, on your next move you can easily jump over the rd stair and win the game.

In the second test case the robot is at stair ; since you don't have any fake jumps, you have to move the robot one stair forward. Now it's Kaosar's turn; since both of you are playing optimally, he knows that whoever from this position makes a move will lose, so he will fake a jump. Now it's your turn, as you don't have any jump to fake, you must move the robot to the rd stair. Now Kaosar will jump over the rd stair and win the game.

Scoring

  1. Subtask ( points): (p=q).

  2. Subtask ( points): (1 \le n,k,p,q \le 10).

  3. Subtask ( points): No additional constraints.