It's winter and taking a bath is a delicate matter. Chef has two buckets of water. The first bucket has $v_1$ volume of cold water at temperature $t_1$. The second has $v_2$ volume of hot water at temperature $t_2$. Chef wants to take a bath with at least $v_3$ volume of water which is at exactly $t_3$ temperature. To get the required amount of water, Chef can mix some water obtained from the first and second buckets.
Mixing $v_x$ volume of water at temperature $t_x$ with $v_y$ volume of water at temperature $t_y$ yields $v_x + v_y$ volume of water at temperature calculated as
vxtx+vytyvx+vyvxtx+vytyvx+vy\frac{v_x t_x + v_y t_y}{v_x + v_y}
Help Chef figure out if it is possible for him to take a bath with at least $v_3$ volume of water at temperature $t_3$.
Assume that Chef has no other source of water and that no heat is lost by the water in the buckets with time, so Chef cannot simply wait for the water to cool.
-----Input-----
- The first line contains $n$, the number of test cases. $n$ cases follow.
- Each testcase contains of a single line containing 6 integers $v_1, t_1, v_2, t_2, v_3, t_3$.
-----Output-----
- For each test case, print a single line containing "YES" if Chef can take a bath the way he wants and "NO" otherwise.
-----Constraints-----
- $1 \leq n \leq 10^5$
- $1 \leq v_1, v_2, v_3 \leq 10^6$
- $1 \leq t_1 < t_2 \leq 10^6$
- $1 \leq t_3 \leq 10^6$
-----Sample Input-----
3
5 10 5 20 8 15
5 10 5 20 1 30
5 10 5 20 5 20
-----Sample Output-----
YES
NO
YES
-----Explanation-----
- Case 1: Mixing all the water in both buckets yields 10 volume of water at temperature 15, which is more than the required 8.
- Case 2: It is not possible to get water at 30 temperature.
- Case 3: Chef can take a bath using only the water in the second bucket.
t = int(input())

for i in range(t):
 v1,t1,v2,t2,v3,t3 = map(int,input().strip().split())
 
 vx = t2 - t3
 vy = t3 - t1
 
 if(t1<=t3<=t2):
  if((vx * v3 <= (vx + vy) * v1)and(vy * v3 <= (vx + vy) * v2)):
   print("YES")
  else:
   print("NO") 
 else:
   print("NO") 
t = int(input())

for i in range(t):
 v1,t1,v2,t2,v3,t3 = map(int,input().strip().split())
 
 vx = t2 - t3
 vy = t3 - t1
 
 if(t1<=t3<=t2):
  if((vx * v3 <= (vx + vy) * v1)and(vy * v3 <= (vx + vy) * v2)):
   print("YES")
  else:
   print("NO") 
 else:
   print("NO") 