CF2090A.Treasure Hunt

传统题 时间 2000 ms 内存 256 MiB 3 尝试 1 已通过 1 标签

Treasure Hunt

Little B and his friend Little K found a treasure map, and now they just need to dig up the treasure, which is buried at a depth of a.5a.5 meters.

They take turns digging. On the first day, Little B digs; on the second day, Little K. After each day, they switch. Little B digs exactly xx meters of soil each day, while Little K digs yy meters. They became curious about who will dig up the treasure first, meaning during whose day the total dug depth will exceed a.5a.5.

But they are too busy digging, so help them and tell who will dig up the treasure!

Input

The first line contains an integer tt (1t10001 \le t \le 1000) — the number of test cases. The description of the test cases follows.

In a single line of each test case, three integers x,y,ax, y, a are given (1x,y,a1091 \leq x, y, a \leq 10^9).

Output

For each test case, output "NO" if Little B digs it up first; otherwise, output "YES". You can output the answer in any case.

Note

In the first test case, on the first day they will dig 11 meter; on the second day 1+2=31 + 2 = 3 meters in total; on the third day 1+2+1=41 + 2 + 1 = 4 meters; and on the fourth day they will dig 66 meters. Thus, the treasure will be dug up first by Little K.

In the second test case, on the first day they will dig 22 meters; on the second day 2+1=32 + 1 = 3 meters in total; on the third day 2+1+2=52 + 1 + 2 = 5 meters, meaning it was dug up first by Little B.

Samples

3
1 2 4
2 1 4
2 2 1
YES
NO
NO

在线编程 IDE

建议全屏模式获得最佳体验