Chef recently started working at ABC corporation. Let's number weekdays (Monday through Friday) by integers $1$ through $5$. For each valid $i$, the number of hours Chef spent working at the office on weekday $i$ was $A_i$.
Unfortunately, due to the COVID-19 pandemic, Chef started working from home and his productivity decreased by a considerable amount. As per Chef's analysis, $1$ hour of work done at the office is equivalent to $P$ hours of work done at home.
Now, in order to complete his work properly, Chef has to spend more hours working from home, possibly at the cost of other things like sleep. However, he does not have to do the same work on each day as he would have in the office ― for each weekday, he can start the work for this day on an earlier day and/or complete it on a later day. The only requirement is that his work does not pile up indefinitely, i.e. he can complete his work for each week during the same week. One day has $24$ hours.
If Chef is unable to complete his work for a week during those five weekdays, then he has to work during the weekend too. Chef wishes to know whether he has to work on weekends or if he can complete his work by working only on weekdays. Help him answer that question. (It is possible that Chef would be unable to finish his work even if he worked all the time, but he does not want to know about that.)

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first and only line of each test case contains six space-separated integers $A_1$, $A_2$, $A_3$, $A_4$, $A_5$ and $P$.

-----Output-----
For each test case, print a single line containing the string "Yes" if Chef has to work on weekends or "No" otherwise (without quotes).

-----Constraints-----
- $1 \le T \le 1,000$
- $0 \le A_i \le 24$ for each valid $i$
- $1 \le P \le 24$

-----Subtasks-----
Subtask #1 (100 points): original constraints

-----Example Input-----
2
14 10 12 6 18 2
10 10 10 10 10 3

-----Example Output-----
No
Yes

-----Explanation-----
Example case 1: Here, $P=2$, so the number of hours Chef has to work from home to handle his workload for days $1$ through $5$ is $[28,20,24,12,36]$. If he works for full $24$ hours on each of the five weekdays, he finishes all the work, so he does not have to work on weekends.
Example case 2: No matter what Chef does, he will have to work on weekends.

Starter code:

Solutions:
# cook your dish here
for t in range(int(input())):
 a1,a2,a3,a4,a5,p=[int(x)for x in input().rstrip().split()]
 if (a1+a2+a3+a4+a5)*p >120:
  print("Yes")
 else:
  print("No")


for i in range(int(input())):
 n=[int(x) for x in input().split()]
 t=n[-1]
 n=n[:-1]
 a=0
 for i in n:
  a+=i*t
 if a>120:
  print('Yes')
 else:
  print('No')

t=int(input())
for i in range(t):
 p=[int(x) for x in input().split()]
 a=p[-1]
 p=p[:-1]
 n=0
 for i in p:
  n+=i*a
 if n>120:
  print('Yes')
 else:
  print('No')

# cook your dish here
t=int(input());
for i in range(t):
 a1,a2,a3,a4,a5,p=list(map(int,input().split()));
 c=(a1*p)+(a2*p)+(a3*p)+(a4*p)+(a5*p);
 if c<=120:
  print('No');
 else:
  print('Yes');
  


# cook your dish here
t = int(input())
for z in range(t) :
 a = [int(x) for x in input().split()]
 p = a[-1]
 a = a[:-1]
 s = 0
 for i in a:
  s+= i*p 
 if s>120 :
  print("Yes")
 else:
  print('No')

for _ in range(int(input())):
  a=list(map(int,input().split()))
  p=a[-1]
  a=a[:-1]
  for i in range(len(a)):
   a[i]=a[i]*p
  b=sum(a)
  if(b>24*5):
   print("Yes")
  else:
   print("No")
  


for _ in range(int(input())):
  a=list(map(int,input().split()))
  p=a[-1]
  b=[p*i for i in a[:-1]]
  if(sum(b)<=120):
   print("No")
  else:
   print("Yes")
  


# cook your dish here
for _ in range(int(input())):
 a=[int(i) for i in input().split()]
 p=a[-1]
 b=[p*i for i in a[:-1]]
 if sum(b)<=120:
  print("No")
 else:
  print("Yes")

# cook your dish here
for i in range(int(input())):
 a1,a2,a3,a4,a5,P=list(map(int, input().split()))
 sum=(a1+a2+a3+a4+a5)*P
 if sum>120:
  print("Yes")
 else:
  print("No")

# cook your dish here
for i in range(int(input())):
 n=list(map(int,input().split()))
 p=sum(n)-n[-1]
 if p*n[-1]>(5*24):
  print("Yes")
 else:
  print("No")

for o in range(int(input())):
 l=list(map(int,input().split()))
 s=sum(l)-l[-1]
 if(s*l[-1]<=120):
  print("No")
 else:
  print("Yes")

T=int(input())
for i in range(T):
 L=list(map(int,input().split()))
 P=L[-1]
 L.remove(P)
 for j in range(len(L)):
  L[j]=L[j]*P
 S=sum(L)
 if S>120:
  print("Yes")
 else:
  print("No")

T=int(input())
for i in range(T):
 L=list(map(int,input().split()))
 P=L[-1]
 L.remove(P)
 for j in range(len(L)):
  L[j]=L[j]*P
 S=sum(L)
 if S>120:
  print("Yes")
 else:
  print("No")


for _ in range(int(input())):
 arr = list(map(int,input().split()))

 summ =sum(arr[ : -1])
 if arr[-1]*summ>120:
  print("Yes")
 else:
  print("No")

 # cook your dish here


for i in range(int(input())):

 numberlist = list(map(int,input().split()))
 timelist = numberlist[:-1]
 p = numberlist[-1]
 for i in range(len(timelist)):
  timelist[i]*=p
 if sum(timelist)<=120 :
  print("No")
 else :
  print("Yes")




# cook your dish here
t=int(input())
while(t>0):
 a=list(map(int,input().split()))
 total_hours=5*24
 p=a[(len(a))-1]
 sum=0
 a.remove(p)
 for i in a:
  sum=sum+(p*i)
 if sum>total_hours:
  print('Yes')
 elif sum<=total_hours:
  print('No')
 t-=1


for _ in range(int(input())):
 A = list(map(int, input().split()))
 p = A[5]
 del A[5]
 if 24*5 < p*sum(A):
  print('Yes')
 else:
  print('No')

# cook your dish here
for _ in range(int(input())):
 l=list(map(int,input().split()))
 l=(sum(l)-l[5])*l[5]
 if(l<=(24*5)):
  print('No')
 else:
  print('Yes')


# cook your dish here
t=int(input())
for i in range(t):
 c=[]
 l=list(map(int,input().split()))
 a=l[0:len(l)-1]
 d=l[-1]
 for i in a:
  c.append(i*d)
 s=sum(c)
 if s<=120:
  print('No')
 else:
  print('Yes')

for _ in range(int(input())):

 lista=list(map(int,input().split()))
 new_list=[]
 
 for i in range(len(lista)-1):
  
  new_list.append(lista[i]*lista[-1])
  
 if(sum(new_list)<=120):
  
  print('No')
  
 else:
  
  print('Yes')


# cook your dish here
for _ in range(int(input())):
 a=list(map(int,input().split()))
 p=a[len(a)-1]
 b=sum(a)-p
 if(b*p-120>0):
  print("Yes")
 else:
  print("No")

for __ in range(int(input())):
 val = list(map(int, input().split()))
 s = 0
 for i in range(0, len(val) - 1):
  s += val[i] * val[-1]
 if s <= 24 * 5:
  print('No')
 else:
  print('Yes')

for i in range(int(input())):
 x=list(map(int,input().split())) 
 e=x[-1] 
 del x[-1]
 res=[p*e for p in x]
 if sum(res)<=120:
  print('No') 
 else:
  print('Yes')


# cook your dish here
T=int(input())
for i in range(T):
 A1,A2,A3,A4,A5,P=list(map(int, input().split()))
 sum=(A1+A2+A3+A4+A5)*P
 if sum>120:
  print("Yes")
 else:
  print("No")