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.

Difficulty: interview

Starter code:

Solutions:
# cook your dish here
try:
 for i in range(int(input())):
  v1,t1,v2,t2,v3,t3=map(int,input().split())
  ok = 0
  if t1 <= t3 <= t2:
   x, y = t2 - t3, t3 - t1
   ok = x * v3 <= (x + y) * v1 and y * v3 <= (x + y) * v2
  print('YES' if ok else 'NO')
    
except:
 pass

# cook your dish here
try:
 for i in range(int(input())):
  v1,t1,v2,t2,v3,t3=map(int,input().split())
  ok = 0
  if t1 <= t3 <= t2:
   x, y = t2 - t3, t3 - t1
   ok = x * v3 <= (x + y) * v1 and y * v3 <= (x + y) * v2
  print('YES' if ok else 'NO')
    
except:
 pass

for _ in range(int(input())):
 v1,t1,v2,t2,v3,t3 = list(map(int, input().split()))
 if(t3>=min(t1,t2) and t3<=max(t1,t2) and v3<=(v1+v2)):
  p=t2-t3
  q=t3-t1
  if(p*v3<=(p+q)*v1 and q*v3<=(p+q)*v2):
   print("YES")
  else:
   print("NO")
 else:
  print("NO")


# cook your dish here
t=int(input())
for you in range(t):
 l=input().split()
 v1=int(l[0])
 t1=int(l[1])
 v2=int(l[2])
 t2=int(l[3])
 v3=int(l[4])
 t3=int(l[5])
 if(t2>t1):
  t1,t2=t2,t1
  v1,v2=v2,v1
 if(t3-t2<0):
  print("NO")
  continue
 if(v3*t3-v3*t2>v1*(t1-t2)):
  print("NO")
  continue
 if(t3-t2>t1-t2):
  print("NO")
  continue
 if((v3-v2)*(t1-t2)>v3*(t3-t2)):
  print("NO")
  continue
 print("YES")


t=int(input())
while t:
 v1,t1,v2,t2,v3,t3=list(map(int, input().strip().split(' ')))
 if t3<=max(t1,t2) and t3>=min(t1,t2):
  if v3<(v1+v2):
   if t1==t2==t3:
    print("YES")
   elif t3==t1 and t1!=t2:
    if v3<=v1:
     print("YES")
    else:
     print("NO")
   elif t3==t2 and t1!=t2:
    if v3<=v2:
     print("YES")
    else:
     print("NO")
   elif t1==t2 and t2!=t3:
    print("NO")
   elif v2>=(v3*(t3-t1))/(t2-t1) and v1>=(v3*(t2-t3))/(t2-t1):
    print("YES")
   else:
    print("NO")
  elif v3==(v1+v2):
   if v3*t3==(v1*t1+v2*t2):
    print("YES")
   else:
    print("NO")
  else:
   print("NO")
 else:
  print("NO")
 t-=1


import math
from sys import stdin
input=stdin.readline
for _ in range(int(input())):
 v1,t1,v2,t2,v3,t3=list(map(int,input().split()))
 if (v1>=v3 and t1==t2) or (v2>=v3 and t2==t3):
  print("YES")
  continue
 else:
  vx=(v3*(t3-t2))//(t1-t2)
  vy=v3*((t1-t3)/(t1-t2))
  if (0<=vx<=v1 and 0<=vy<=v2): 
   print("YES")
  else:
   print("NO")
  


for _ in range(int(input())):
 v1,t1,v2,t2,v3,t3=map(int,input().split())
 if v1+v2<v3 or t3<t1 or t3>t2:
  print('NO')
  continue
 p = v3*((t3-t1)/(t2-t1))
 q = v3*((t2-t3)/(t2-t1))
 if 0<=q<=v1 and 0<=p<=v2:
  print('YES')
 else:
  print('NO')

for _ in range(int(input())):
 v1,t1,v2,t2,v3,t3 = map(int,input().split())
 x = t2 - t3
 y = t3 - t1
 if t1 <= t3 <= t2:
  if x*v3<=(x+y)*v1 and y*v3<=(x+y)*v2:
   print("YES")
  else:
   print("NO")
 else:
  print("NO")

for n in range(int(input())):
 v1, t1, v2, t2, v3, t3 = map(int, input().split())
 ok = 0
 if t1 <= t3 <= t2:
  x, y = t2 - t3, t3 - t1
  ok = x * v3 <= (x + y) * v1 and y * v3 <= (x + y) * v2
 print('YES' if ok else 'NO')

for _ in range(int(input())):
 v1,t1,v2,t2,v3,t3 = map(int,input().split())
 x = t2 - t3
 y = t3 - t1
 if t1 <= t3 <= t2:
  if x*v3<=(x+y)*v1 and y*v3<=(x+y)*v2:
   print("YES")
  else:
   print("NO")
 else:
  print("NO")

for _ in range(int(input())):
 v1,t1,v2,t2,v3,t3 = map(int,input().split())
 x = t2 - t3
 y = t3 - t1
 if t1 <= t3 <= t2:
  if x*v3<=(x+y)*v1 and y*v3<=(x+y)*v2:
   print("YES")
  else:
   print("NO")
 else:
  print("NO")

for n in range(int(input())):
 v1, t1, v2, t2, v3, t3 = list(map(int, input().split()))
 ok = 0
 if t1 <= t3 <= t2:
  x, y = t2 - t3, t3 - t1
  ok = x * v3 <= (x + y) * v1 and y * v3 <= (x + y) * v2
 print('YES' if ok else 'NO')


def __starting_point():
 for t in range(int(input())):
  yes = False
  v1,t1,v2,t2,v3,t3= map(int,input().split())
  if t1<=t3<=t2:
   yes= (t2-t3)*v3<=v1*(t2-t1) and (t3-t1)*v3 <= v2*(t2-t1)
  print("YES" if yes else "NO")
__starting_point()

def test():
 v1,t1,v2,t2,v3,t3=list(map(int,input().split(" ")))
 req=v3*t3
 if v1+v2<v3 or max(t1,t2)<t3:
  print("NO")
  return 0
 else:
  x=(v3*(t3-t2))/(t1-t2)
  y=(v3*(t3-t1))/(t2-t1)
  if x<=v1 and y<=v2 and x>=0 and y>=0:
   print("YES")
  else:
   print("NO")
 return 0
t=int(input())
for i in range(t):
 testy=test()


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") 

for t in range(int(input())):
 v1,t1,v2,t2,v3,t3=map(int,input().split())
 if t3>t2 or t3<t1:
  print("NO")
 else:
  if v1>= (v3*(t3-t2))/(t1-t2) and v2>=(v3*(t3-t1))/(t2-t1):
   print("YES")
  else:
   print("NO")

# cook your dish here
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") 

from sys import stdin,stdout

def lin(): return int(stdin.readline())
def mlin(): return map(int,stdin.readline().rstrip().split())
def llin(): return list(mlin())
def res():
 for i in range(lin()):
  v1,t1,v2,t2,v3,t3=mlin()
  if v1+v2<v3:
   print("NO")
  else:
   x=(v3*(t3-t2))/(t1-t2)
   y=(v3*(t3-t1))/(t2-t1)
   if x<=v1 and y<=v2 and x>=0 and y>=0:
    print("YES")
   else:
    print("NO")
res()

for _ in range(int(input())):
 v1,t1,v2,t2,v3,t3 = list(map(int,input().split()))
 vx=(v3*(t3-t2))/(t1-t2)
 vy=(v3*(t3-t1))/(t2-t1)
 if(0<=vx<=v1 and 0<=vy<=v2):
  print("YES")
 else:
  print("NO")


for _ in range(int(input())):
 v1,t1,v2,t2,v3,t3 = map(int,input().split())
 ans = "NO"
 if(t3 >= t1 and t3 <= t2 and v3 <= v1+ v2):
  T = (t3-t1)/(t2-t1)
  vy = v3*T # New Volume
  vx = v3 - vy
  if vx <= v1 and vy <= v2:
   ans = "YES"
 print(ans)

tc = int(input())
while(tc!=0):
 tc-=1
 v1,t1,v2,t2,v3,t3 = map(int,input().split())
 if t1==t3 and t3==t2:
  if v1+v2>=v3:
   print("YES")
  else:
   print("NO")
  continue
 elif t1==t2:
  if v1>=v3:
   print("YES")
  else:
   print("NO")
  continue
 l = v3*(t1-t3)/(t1-t2)
 r = (v1+v2)*(t1-t3)/(t1-t2)
 l1 = v3*(t3-t2)/(t1-t2)
 r1 = (v1+v2)*(t3-t2)/(t1-t2)
 # print(l,r)
 # print(l1,r1)
 if l<=min(v2,r) and l1<=min(v1,r1):
  print("YES")
 else:
  print("NO")

# cook your dish here
from sys import stdin,stdout

def lin(): return int(stdin.readline())
def mlin(): return map(int,stdin.readline().rstrip().split())
def llin(): return list(mlin())
def res():
 for i in range(lin()):
  v1,t1,v2,t2,v3,t3=mlin()
  if v1+v2<v3:
   print("NO")
  else:
   x=(v3*(t3-t2))/(t1-t2)
   y=(v3*(t3-t1))/(t2-t1)
   if x<=v1 and y<=v2 and x>=0 and y>=0:
    print("YES")
   else:
    print("NO")
res()

for _ in range(int(input())):
 v1,t1,v2,t2,v3,t3=list(map(int,input().split()))
 if v1+v2<v3 or t3>max(t1,t2) or t3<min(t1,t2):
  print('NO')
 else:
  num=(t3-t1);den=(t2-t3)
  if v2*(t2-t1)>=v3*(t3-t1) and v1*(t2-t1)>=v3*(t2-t3):
   print('YES')
  else:
   print('NO')