Gru has not been in the limelight for a long time and is, therefore, planning something particularly nefarious. Frustrated by his minions' incapability which has kept him away from the limelight, he has built a transmogrifier — a machine which mutates minions.

Each minion has an intrinsic characteristic value (similar to our DNA), which is an integer. The transmogrifier adds an integer K to each of the minions' characteristic value. 

Gru knows that if the new characteristic value of a minion is divisible by 7, then it will have Wolverine-like mutations.

Given the initial characteristic integers of N minions, all of which are then transmogrified, find out how many of them become Wolverine-like.

-----Input Format:-----
The first line contains one integer, T, which is the number of test cases. Each test case is then described in two lines.
The first line contains two integers N and K, as described in the statement.
The next line contains N integers, which denote the initial characteristic values for the minions.

-----Output Format:-----
For each testcase, output one integer in a new line, which is the number of Wolverine-like minions after the transmogrification.

-----Constraints:-----
- 1 ≤ T ≤ 100
- 1 ≤ N ≤ 100
- 1 ≤ K ≤ 100
- All initial characteristic values lie between 1 and 105, both inclusive.

-----Example-----
Input:
1
5 10
2 4 1 35 1

Output:
1

-----Explanation:-----
After transmogrification, the characteristic values become {12,14,11,45,11}, out of which only 14 is divisible by 7. So only the second minion becomes Wolverine-like.

Starter code:

Solutions:
for i in range(int(input())):
 yy=input()
 y=[int(e) for e in yy.split()]
 zz=input()
 z=[int(e) for e in zz.split()]
 count=0
 for i in z:
  a=i+y[1]
  if a%7==0:
   count+=1
 print(count)

# cook your dish here
n=int(input())
for i in range(n):
 m,k=map(int,input().split())
 l=list(map(int,input().split()[:m]))
 count=0
 for i in l:
  if (i+k)%7==0:
   count+=1
 print(count)

# cook your dish here
for _ in range(int(input())):
 n,k=[int(x) for x in input().split()]
 a=[int(x) for x in input().split()]
 c=0
 for i in a:
  aa=i+k
  if aa%7==0:
   c+=1
 print(c)

# cook your dish here
try:
 for _ in range(int(input())):
  N, K = map(int, input().split())
  K = K % 7
  memory = list(map(int, input().split()))
  memory = list(map(lambda x: x + K, memory))
  memory = list(map(lambda x: x % 7, memory))
  print(memory.count(0))
except:
 pass

n=int(input())
for i in range(0,n):
 a,b=list(map(int, input().split()))
 l=list(map(int,input().split()))
 l=[i+b for i in l]
 count=0
 for i in l:
  if i%7==0:
   count+=1
 print(count)



# cook your dish here
t=int(input())

for i in range(t):

 n,k=map(int,input().split())
 
 
 x=list(map(int,input().split())) 
 c=0
 for j in x:
  j+=k
  if j%7==0:
   c+=1
 print(c)

# cook your dish here
for t in range(int(input())):
 ip = list(map(int, input().split()))

 k = ip[1]
 array = list(map(int, input().split()))
 wolv = 0
 for i in range(ip[0]):
  array[i] += k
  if array[i] % 7 == 0:
   wolv += 1
 print(wolv)

# cook your dish here
a=int(input())
for i in range (a):
 b,c=map(int,input().split())
 l=list(map(int,input().split()))
 if len(l)==b:
  d=0
  for r in l:
   r=r+c
   if r%7==0:
    d+=1
  print(d)
 else:
  print('WARNING')

a=int(input())
for i in range (a):
 b,c=map(int,input().split())
 l=list(map(int,input().split()))
 if len(l)==b:
  d=0
  for r in l:
   r=r+c
   if r%7==0:
    d+=1
  print(d)
 else:
  print('WARNING')

# cook your dish here
for i in range(int(input())):
 N,T=map(int,input().split())
 L=list(map(int,input().split()))
 count=0
 for i in L:
  if (i+T)%7==0:
   count+=1
 print(count)

for t in range(int(input())):
 n,k= map(int,input().split())
 l = list(map(int,input().split()))
 l = [x+k for x in l]
 count=0
 for i in l:
  if i%7==0:
   count+=1
 print(count)

# cook your dish here
try:
 for _ in range(int(input())):
  n, k = map(int, input().split())
  l = list(map(int, input().split()))
  count = 0
  for i in l:
   if((i+k)%7==0):
    count += 1
  print(count)
except:
 pass

# cook your dish here
try:
 for _ in range(int(input())):
  n, k = map(int, input().split())
  l = list(map(int, input().split()))
  count = 0
  for i in l:
   if((i+k)%7==0):
    count += 1
  print(count)
except:
 pass

# cook your dish here
t=int(input())
while t!=0:
 n,k=map(int,input().split())
 arr=[int(k) for k in input().split()]
 ct=0
 for i in arr:
  if (i+k)%7==0:
   ct+=1
 print(ct)
 t-=1

test = int(input())

for _ in range(0,test):
 n,k = list(map(int,input().split()))
 lister = list(map(int,input().split()))
 count = 0
 for x in lister:
  num = x+k
  if num%7 == 0:
   count += 1
 print(count)


# cook your dish here
for _ in range(int(input())):
 n, k= map(int, input().split())
 a= list(map(int, input().split()))
 c=0
 for i in a:
  if (i+k)%7==0:
   c+=1
 print(c)

# cook your dish here
T = int(input())

for t in range(T):
 minions = []
 count = 0
 N, K = input().split()
 N = int(N)
 K = int(K)
 mini = input().split()
 for num in mini:
  if num == " ":
   continue
  else:
   minions.append(int(num))
 
 for minion in minions:
  M = minion + K
  if M % 7 == 0:
   count += 1 
  else:
   continue
 print(count)

def __starting_point():
 for i in range(int(input())):
  N, K = map(int,input().split())
  count=0
  N = list(map(int,input().split()))
  print(sum([True for x in N if (K+x)%7==0]))
__starting_point()

t=int(input())

for i in range(t):
 n,k=map(int,input().split())
 lst=list(map(int,input().split()))
 
 lst=[x+k for x in lst]
 
 c=0
 
 for i in lst:
  if i%7==0:
   c+=1
 print(c)

# cook your dish here
def __starting_point():
 for i in range(int(input())):
  N, K = map(int,input().split())
  count=0
  N = list(map(int,input().split()))
  print(sum([True for x in N if (K+x)%7==0]))
__starting_point()

for _ in range(int(input())):
 n,k = map(int,input().split())
 ans = 0
 for x in map(int, input().split()):
  if (x+k)%7 == 0: ans += 1
 print(ans)

for _ in range(int(input())):
 n,k = map(int,input().split())
 ans = 0
 for x in map(int, input().split()):
  if (x+k)%7 == 0: ans += 1
 print(ans)