Chef wants to organize a contest. Predicting difficulty levels of the problems can be a daunting task. Chef wants his contests to be balanced in terms of difficulty levels of the problems.
Assume a contest had total P participants. A problem that was solved by at least half of the participants (i.e. P / 2 (integer division)) is said to be cakewalk difficulty. A problem solved by at max P / 10 (integer division) participants is categorized to be a hard difficulty.
Chef wants the contest to be balanced. According to him, a balanced contest must have exactly 1 cakewalk and exactly 2 hard problems. You are given the description of N problems and the number of participants solving those problems. Can you tell whether the contest was balanced or not?

-----Input-----
The first line of the input contains an integer T denoting the number of test cases.
The first line of each test case contains two space separated integers, N, P denoting the number of problems, number of participants respectively.
The second line contains N space separated integers, i-th of which denotes number of participants solving the i-th problem.

-----Output-----
For each test case, output "yes" or "no" (without quotes) denoting whether the contest is balanced or not.

-----Constraints-----
- 1 ≤ T, N ≤ 500 
- 1 ≤ P ≤ 108 
- 1 ≤ Number of participants solving a problem ≤ P

-----Subtasks-----
- Subtask #1 (40 points): P is a multiple of 10
- Subtask #2 (60 points): Original constraints

-----Example-----
Input
6
3 100
10 1 100
3 100
11 1 100
3 100
10 1 10
3 100
10 1 50
4 100
50 50 50 50
4 100
1 1 1 1

Output
yes
no
no
yes
no
no

-----Explanation-----
Example case 1.: The problems are of hard, hard and cakewalk difficulty. There is 1 cakewalk and 2 hard problems, so the contest is balanced.
Example case 2.: The second problem is hard and the third is cakewalk. There is 1 cakewalk and 1 hard problem, so the contest is not balanced.
Example case 3.: All the three problems are hard. So the contest is not balanced.
Example case 4.: The problems are of hard, hard, cakewalk difficulty. The contest is balanced.
Example case 5.: All the problems are cakewalk. The contest is not balanced.
Example case 6.: All the problems are hard. The contest is not balanced.

Difficulty: interview

Starter code:

Solutions:
t = int(input())
for z in range(t) :
 n,p = [int(x) for x in input().split()]
 a = [int(x) for x in input().split()] 
 c = [x for x in a if x >= p//2]
 h = [x for x in a if x <= p//10]
 if len(c)==1 and len(h)==2 :
  print("yes")
 else:
  print("no")

t = int(input())
for z in range(t) :
 n,p = [int(x) for x in input().split()]
 a = [int(x) for x in input().split()] 
 c = [x for x in a if x >= p//2]
 h = [x for x in a if x <= p//10]
 if len(c)==1 and len(h)==2 :
  print("yes")
 else:
  print("no")

# cook your dish here
t = int(input())
for z in range(t) :
 n,p = [int(x) for x in input().split()]
 a = [int(x) for x in input().split()] 
 c = [x for x in a if x >= p//2]
 h = [x for x in a if x <= p//10]
 if len(c)==1 and len(h)==2 :
  print("yes")
 else:
  print("no")

def ishard(participants , studentswhosolved):
 if studentswhosolved <= int(participants/10):
  return True
 else :
  return False

def iscakewalk(participants , studentswhosolved):
 if studentswhosolved >= int(participants/2):
  return True
 else :
  return False

for t in range(int(input())):
 n, p = list(map(int, input().split()))
 cakwalkproblems = 0
 hardproblems = 0
 numberlist = list(map(int,input().split()))
 for _ in range(n):
  if ishard(p , numberlist[_]):
   hardproblems+=1
  elif iscakewalk(p , numberlist[_]) :
   cakwalkproblems+=1
 if cakwalkproblems == 1 and hardproblems == 2 :
  print("yes")
 else :
  print("no")


for t in range(int(input())):
  N,P = map(int,input().split())
  l=list(map(int,input().strip().split()))
  
  
  a=b=0
  for j in l:
   if j >= int(P/2):
    a +=1 
   elif j <= int(P/10):
    b += 1
   
  if(a==1 and b==2):
   print("yes")
  else:
   print("no")

# cook your dish here
for t in range(int(input())):
 n,p=[int(x)for x in input().rstrip().split()]
 a=[int(x)for x in input().rstrip().split()]
 cakewalk=0
 hard=0 
 for i in range(0,n):
  if a[i]>=p//2 and a[i]<=p:
   cakewalk+=1
  elif a[i]>=0 and a[i]<=p//10:
   hard+=1 
 if (cakewalk==1 and hard==2):
  print("yes")
 else:
  print("no")
 
   


# cook your dish here
for _ in range(int(input())):
  n,p = map(int,input().split())
  l=list(map(int,input().split()))
  a=c=0
  for i in l:
   if i >= int(p/2):
    a +=1 
   elif i <= int(p/10):
    c+= 1
  print('yes' if(a==1 and c==2) else 'no') 

# cook your dish here
for i in range(int(input())):
  x,p = map(int,input().split())
  l=list(map(int,input().split()))
  a=b=0
  for j in l:
   if j >= int(p/2):
    a +=1 
   elif j <= int(p/10):
    b += 1
  print('yes' if(a==1 and b==2) else 'no') 

t=int(input())
for i in range(t):
 n,p=list(map(int,input().split()))
 a=list(map(int,input().split()))
 cakewalk=0
 difficulty=0
 for i in range(len(a)):
  if(a[i]>=p//2 and a[i]<=p):
   cakewalk=cakewalk+1
  elif(a[i]>=0 and a[i]<=p//10):
   difficulty=difficulty+1
 if(cakewalk==1 and difficulty==2):
  print("yes")
 else:
  print("no")
 
  


# cook your dish here
t=int(input())
for i in range(0,t):
 s=input().split(" ")
 k=int(s[1])
 a=input().split(" ")
 l=list(map(int,a))
 m=k//10
 n=k//2
 c=0
 p=0
 for i in range(0,len(l)):
  if(int(l[i])>=n):
   c=c+1
  if(int(l[i]<=m)):
   p=p+1
 if(p==2 and c==1):
  print("yes")
 else:
  print("no")


T=int(input())
for i in range(T):
 N,P=list(map(int,input().split()))
 S=list(map(int,input().split()))[:N]
 c=0
 d=0
 for j in range(len(S)):
  if S[j]>=P//2:
   c+=1
  elif S[j]<=P//10:
   d+=1
 if c==1 and d==2:
  print("yes")
 else:
  print("no")


T=int(input())
for i in range(T):
 N,P=list(map(int,input().split()))
 S=list(map(int,input().split()))[:N]
 c=0
 d=0
 for j in range(len(S)):
  if S[j]>=P//2:
   c+=1
  elif S[j]<=P//10:
   d+=1
 if c==1 and d==2:
  print("yes")
 else:
  print("no")
  


def balancedContest(n,p,arr):
 cakewalk = 0
 hard = 0
 for i in range(len(arr)):
  if arr[i] >= int(p/2):
   cakewalk += 1
  if arr[i] <= int(p/10):
   hard += 1
 if cakewalk == 1 and hard == 2:
  print('yes')
 else:
  print('no')
 return

#Driver code starts here
t = int(input())
for _ in range(t):
 n,p = map(int,input().split())
 arr = list(map(int,input().split()))
 balancedContest(n,p,arr)

# cook your dish here
try:
 
 for t in range(int(input())):
  N,P = map(int,input().split())
  l=list(map(int,input().strip().split()))
  
  
  a=b=0
  for j in l:
   if j >= int(P/2):
    a +=1 
   elif j <= int(P/10):
    b += 1
   
  if(a==1 and b==2):
   print("yes")
  else:
   print("no")
except:
 pass

t = int(input())
for i in range(t):
 lst1=[]
 lst1 = [int(item) for item in input().split()] 
 N=lst1[0]
 P=lst1[1]
 a = list(map(int,input().strip().split()))[:N] 
 e = 0
 d = 0
 for j in a:    
  if j >= int(P/2):
   e = e+1 
  elif j <= int(P/10):
   d = d+1
 if e == 1 and d == 2:
  print('yes')
 else:
  print('no')


try:
 
 for i in range(int(input())):
  N,P = map(int,input().split())
  l=list(map(int,input().strip().split()))
  
  
  a=b=0
  for j in l:
   if j >= int(P/2):
    a +=1 
   elif j <= int(P/10):
    b += 1
   
  if(a==1 and b==2):
   print("yes")
  else:
   print("no")
except:
 pass

# cook your dish here
val=int(input())
for i in range(val):
 n,p=input().split()
 n=int(n)
 p=int(p)
 di=int(0)
 ca=int(0)
 q=list(map(int,input().split()))
 for j in range(len(q)):
  d=p/10
  c=p/2
  if(q[j]<=d):
   di=di+1
  elif(c<=q[j]):
   ca=ca+1
 if(ca==1 and di==2):
  print("yes")
 else:
  print("no")
    


t = int(input())
for i in range(t):
  n,p = list(map(int, input().split(' ')))
  
  z= list(map(int, input().split()))
  e = 0
  d = 0
  for j in z:
   if j >= int(p/2):
    e = e+1 
   elif j <= int(p/10):
    d = d+1
  if e == 1 and d == 2:
   print('yes')
  else:
   print('no')


try:
 t = int(input())
 
 for i in range(t):
  n,p = list(map(int, input().split(' ')))
  
  z= list(map(int, input().split()))
  e = 0
  d = 0
  for j in z:
   if j >= int(p/2):
    e = e+1 
   elif j <= int(p/10):
    d = d+1
  if e == 1 and d == 2:
   print('yes')
  else:
   print('no')
 
  
   
   
  
except:
 pass
 
 
  
 
  
   

  

   


# cook your dish here
for _ in range(int(input())):
 n,p = list(map(int,input().split()))
 l = list(map(int,input().split()))
 e,h = 0,0 
 for i in l:
  if i<=p//10:
   h+=1 
  elif i>=p//2:
   e+=1 
 if e==1 and h==2:
  print("yes")
 else:
  print("no")


for _ in range(int(input())):
 n,p = list(map(int,input().split()))
 l = list(map(int,input().split()))
 e,h = 0,0 
 for i in l:
  if i<=p//10:
   h+=1 
  elif i>=p//2:
   e+=1 
 if e==1 and h==2:
  print("yes")
 else:
  print("no")
  # cook your dish here


for _ in range(int(input())):
 n,p = list(map(int,input().split()))
 l = list(map(int,input().split()))
 e,h = 0,0 
 for i in l:
  if i<=p//10:
   h+=1 
  elif i>=p//2:
   e+=1 
 if e==1 and h==2:
  print("yes")
 else:
  print("no")


# cook your dish here
for t in range(int(input())):
 n,p = list(map(int, input().split()))
 ls = list(map(int, input().split()))
 count = 0 
 cout = 0
 for j in ls:
  if j<=(p//10):
   count += 1 
  if j>=(p//2):
   cout += 1 
 if (count==2 and cout==1):
  print("yes")
 else:
  print("no")


T = int(input())
for _ in range(T):
 n,p = tuple(map(int,input().split(' ')))
 solved_by = list(map(int,input().split(' ')))
 cakewalk,hard = (0,0)
 for x in solved_by:
  if x >= p//2:
   cakewalk = cakewalk + 1
  elif x <= p//10:
   hard = hard + 1
 if cakewalk == 1 and hard == 2:
  print('yes')
 else:
  print('no')


T = int(input())
for _ in range(T):
 n,p = tuple(map(int,input().split(' ')))
 solved_by = list(map(int,input().split(' ')))
 cakewalk,hard = (0,0)
 for x in solved_by:
  if x >= p//2:
   cakewalk = cakewalk + 1
  elif x <= p//10:
   hard = hard + 1
 if cakewalk == 1 and hard == 2:
  print('yes')
 else:
  print('no')