Ivan plays an old action game called Heretic. He's stuck on one of the final levels of this game, so he needs some help with killing the monsters.

The main part of the level is a large corridor (so large and narrow that it can be represented as an infinite coordinate line). The corridor is divided into two parts; let's assume that the point $x = 0$ is where these parts meet.

The right part of the corridor is filled with $n$ monsters — for each monster, its initial coordinate $x_i$ is given (and since all monsters are in the right part, every $x_i$ is positive).

The left part of the corridor is filled with crusher traps. If some monster enters the left part of the corridor or the origin (so, its current coordinate becomes less than or equal to $0$), it gets instantly killed by a trap.

The main weapon Ivan uses to kill the monsters is the Phoenix Rod. It can launch a missile that explodes upon impact, obliterating every monster caught in the explosion and throwing all other monsters away from the epicenter. Formally, suppose that Ivan launches a missile so that it explodes in the point $c$. Then every monster is either killed by explosion or pushed away. Let some monster's current coordinate be $y$, then:

  if $c = y$, then the monster is killed;  if $y < c$, then the monster is pushed $r$ units to the left, so its current coordinate becomes $y - r$;  if $y > c$, then the monster is pushed $r$ units to the right, so its current coordinate becomes $y + r$. 

Ivan is going to kill the monsters as follows: choose some integer point $d$ and launch a missile into that point, then wait until it explodes and all the monsters which are pushed to the left part of the corridor are killed by crusher traps, then, if at least one monster is still alive, choose another integer point (probably the one that was already used) and launch a missile there, and so on.

What is the minimum number of missiles Ivan has to launch in order to kill all of the monsters? You may assume that every time Ivan fires the Phoenix Rod, he chooses the impact point optimally.

You have to answer $q$ independent queries.


-----Input-----

The first line contains one integer $q$ ($1 \le q \le 10^5$) — the number of queries.

The first line of each query contains two integers $n$ and $r$ ($1 \le n, r \le 10^5$) — the number of enemies and the distance that the enemies are thrown away from the epicenter of the explosion.

The second line of each query contains $n$ integers $x_i$ ($1 \le x_i \le 10^5$) — the initial positions of the monsters.

It is guaranteed that sum of all $n$ over all queries does not exceed $10^5$.


-----Output-----

For each query print one integer — the minimum number of shots from the Phoenix Rod required to kill all monsters.


-----Example-----
Input
2
3 2
1 3 5
4 1
5 2 3 5

Output
2
2



-----Note-----

In the first test case, Ivan acts as follows:   choose the point $3$, the first monster dies from a crusher trap at the point $-1$, the second monster dies from the explosion, the third monster is pushed to the point $7$;  choose the point $7$, the third monster dies from the explosion. 

In the second test case, Ivan acts as follows:   choose the point $5$, the first and fourth monsters die from the explosion, the second monster is pushed to the point $1$, the third monster is pushed to the point $2$;  choose the point $2$, the first monster dies from a crusher trap at the point $0$, the second monster dies from the explosion.

Difficulty: interview

Starter code:

Solutions:
import sys
import math
from collections import defaultdict
from itertools import combinations
from itertools import permutations
input = lambda : sys.stdin.readline().rstrip()
read = lambda : map(int, input().split())
def write(*args, sep="\n"):
  for i in args:
    sys.stdout.write("{}".format(i) + sep)
INF = float('inf')
MOD = int(1e9 + 7)

for q in range(int(input())):
  n, r = read()
  arr = sorted(set(read()), reverse=True)
  s = 0
  ans = 0

  for i in arr:
    if s >= i:
      break

    s += r
    ans += 1

  write(ans) 

import sys
def I():
    return sys.stdin.readline().rstrip()

t = int(I())
for _ in range(t):
    n, r = list(map( int, I().split() ))
    x = list(map(int,I().split()))
    x.sort()
    ans = 0
    while len(x) > 0 and x[ -1 ] > ans * r:
        y = x[ -1 ]
        while len(x) > 0 and x[ -1 ] == y:
            x.pop()
        ans += 1
    print( ans )


'''input
2
3 2
1 3 5
4 1
5 2 3 5

'''
import sys
from collections import defaultdict as dd
from itertools import  permutations as pp
from itertools import combinations as cc
from collections import Counter as ccd
from random import randint as rd
from bisect import bisect_left as bl
from  heapq import heappush as hpush
from heapq import heappop as hpop
mod=10**9+7

def ri(flag=0):
	if flag==0:
		return [int(i) for i in sys.stdin.readline().split()]
	else:
		return int(sys.stdin.readline())


for _ in range(ri(1)):
	n , r =ri()
	a = ri()
	a = list(set(a))
	a.sort()
	ans =0
	cur = 0
	start = a[-1]
	for i in range(len(a)-1,-1,-1):
		if a[i]-cur>0:
			cur+=r
			ans+=1
	print(ans)






3

import array
import math
import os
import sys


DEBUG = 'DEBUG' in os.environ


def inp():
    return sys.stdin.readline().rstrip()


def dprint(*value, sep=' ', end='\n'):
    if DEBUG:
        print(*value, sep=sep, end=end)


def solve(N, R, X):
    v = list(set(X))
    v.sort(reverse=True)
    off = 0
    c = 0
    i = 0
    while i < len(v):
        x = v[i]
        if x <= off:
            break
        i += 1
        c += 1
        off += R

    return c


def main():
    Q = int(inp())
    for _ in range(Q):
        N, R = [int(e) for e in inp().split()]
        X = [int(e) for e in inp().split()]
        print(solve(N, R, X))


def __starting_point():
    main()

__starting_point()

'''input
2
3 2
1 3 5
4 1
5 2 3 5
'''
from sys import stdin


# main starts
q = int(stdin.readline().strip())
for _ in range(q):
	n, r = list(map(int, stdin.readline().split()))
	monsters = list(map(int, stdin.readline().split()))
	monsters.sort()
	monsters = list(set(monsters))

	impact = 0
	count = 0
	for i in range(len(monsters) - 1, -1, -1):
		if monsters[i] - impact <= 0:
			break
		else:
			impact += r
			count += 1

	print(count)

import sys
from collections import deque
input = sys.stdin.readline
for _ in range(int(input())):
    n, r = list(map(int, input()[:-1].split()))
    arr = list(sorted(list(map(int, input()[:-1].split()))))
    deq = deque(arr)

    ans = 0
    rnow = 0

    while len(deq) > 0:
        x = deq.pop()
        while len(deq) > 0 and deq[-1] == x:
            deq.pop()
        rnow += r
        while len(deq) > 0 and deq[0] <= rnow:
            deq.popleft()
        ans+=1
    print(ans)

import sys
input = sys.stdin.readline

q=int(input())

for testcases in range(q):
    n,r=list(map(int,input().split()))
    E=list(map(int,input().split()))

    E.append(0)

    E=sorted(set(E))

    for i in range(1,n+1):
        if E[-i-1]<=r*i:
            print(i)
            break
        

    

    


#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import time
import math

q   = int(input())
ans = []
start = time.time()

for i in range(q):
    (n, r) = (int(j) for j in input().split())
    x      = [int(j) for j in input().split()]
    x      = list(set(x))
    x.sort()
    p      = [0 for j in range(len(x))]
    for j in range(len(x)):
        p[j] = min(math.ceil(x[j]/r), len(x)-j)
    ans.append(max(p))

for i in range(q):
    print(ans[i])
finish = time.time()
#print(finish - start)


import sys
import math
input = sys.stdin.readline

arr=[]
n=0
r=0

def check(k):
	if arr[n-k-1]-k*r>0:
		return False
	return True
	
def binarySearch (l, r): 
  
	if r >= l: 
  
		mid = l + (r - l)//2

		if check(mid):
			if r==l:
				return l
				
			return(binarySearch(l, mid))

		else:
			return binarySearch(mid + 1, r) 
  
	else: 
		return n
  

q=int(input())
for i in range(q):
	n,r=map(int,input().split())
	l=list(map(int,input().split()))
	arr=list(set(l))
	n=len(arr)
	arr.sort()

	print(binarySearch(1,n-1))

import sys
from math import ceil
readline = sys.stdin.readline
Q = int(readline())
Ans = [None]*Q
for qu in range(Q):
    N, r = list(map(int, readline().split()))
    A = list(map(int, readline().split()))
    A = list(set(A))
    A.sort()

    A = [0] + A
    N = len(A)            
    Ans[qu] = min(N-i for i in range(1, N+1) if A[i-1] <= r*(N-i))
print('\n'.join(map(str, Ans)))


# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return list(map(int, input().split()))
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

def bisearch_min(mn, mx, func):
    ok = mx
    ng = mn
    while ng+1 < ok:
        mid = (ok+ng) // 2
        if func(mid):
            ok = mid
        else:
            ng = mid
    return ok

def calc(m):
    X2 = X[:len(X)-m]
    X2[-1] -= r * m
    return X2[-1] <= 0

for _ in range(INT()):
    n, r = MAP()
    X = sorted(set(LIST()))
    print(bisearch_min(0, len(X), calc))


#!/usr/bin/env python3
#Educational Codeforces Round 74 B

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

q = I()
for _ in range(q):
    n,r = LI()
    x = LI()
    c = list(Counter(x).items())
    c.sort(key = itemgetter(0),reverse = True)
    ans = 0
    for i,j in c:
        if i - ans*r > 0:
            ans += 1
    print(ans)

#!/usr/bin/env python3
import sys

#lines = stdin.readlines()
def rint():
    return list(map(int, sys.stdin.readline().split()))

def input():
    return sys.stdin.readline().rstrip('\n')

def oint():
    return int(input())


q = oint()

for _ in range(q):
    n, r = rint()
    x = set(rint())
    x = list(x)
    x.sort()
    z = 0
    si = 0
    n = len(x)
    ei = n-1
    cnt = 0
    while True:
        if ei < si:
            break
        cnt += 1
        ei -=1
        z +=r
        for i in range(si, ei+1):
            if x[i] > z:
                si = i
                break
            if i == ei:
                si = ei+1
    print(cnt)





#!/usr/bin/env python3
#Educational Codeforces Round 74 B

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

q = I()
for _ in range(q):
    n,r = LI()
    x = LI()
    c = list(Counter(x).items())
    c.sort(key = itemgetter(0),reverse = True)
    ans = 0
    for i,_ in c:
        if i - ans*r > 0:
            ans += 1
    print(ans)

from collections import defaultdict as DD
from bisect import bisect_left as BL
from bisect import bisect_right as BR
from itertools import combinations as IC
from itertools import permutations as IP
from random import randint as RI
import heapq as HQ
import sys
MOD=pow(10,9)+7
def IN(f=0):
    if f==0:
        return ( [int(i) for i in sys.stdin.readline().split()] )
    else:
        return ( int(sys.stdin.readline()) )

tc=IN(1)
for _ in range(tc):
    n,r = IN()
    b = IN()
    b.sort()
    c=0
    #print(b)
    a=[-1]
    for i in range(0,n):
        if b[i]!=a[-1]:
            p=b[i]
            a.append(p)
    del a[0]
    #print(a)
        
    while(len(a)>0):
        if a[-1]-r*c<=0:
            break
        del a[-1]
        #print(a)
        c+=1
    print(c)
        
    
    
    


# -*- coding: utf-8 -*-
import sys
from collections import deque


input = sys.stdin.readline


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, R, X):
    X.sort()
    X = deque(X)
    l = 0
    r = N-1
    ll = 0
    while X:
        r = X.pop()
        while X:
            rr = X.pop()
            if rr != r:
                X.append(rr)
                break
        ll += R

        while X:
            l = X.popleft()
            if l > ll:
                X.appendleft(l)
                break

    return ll // R


def main():
    Q = read_int()

    for _ in range(Q):
        N, R = read_int_n()
        X = read_int_n()
        print(slv(N, R, X))


def __starting_point():
    main()

__starting_point()

import math
from collections import deque, defaultdict
from sys import stdin, stdout
input = stdin.readline
# print = stdout.write
listin = lambda : list(map(int, input().split()))
mapin = lambda : map(int, input().split())
for _ in range(int(input())):
    n, r = mapin()
    a = listin()
    a = list(set(a))
    a.sort()
    z = deque(a)
    count = 0
    while z:
        z.pop()
        count+=1
        if z:
            while z[0] <= r*count:
                z.popleft()
                if not z:
                    break
    print(count)

import heapq
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


def solve():
    N, R = list(map(int, input().split()))
    M = list(set([-int(x) for x in input().split()]))
    heapq.heapify(M)

    ans = 0
    cur_pos = 0
    while M:
        cur_vanish = -heapq.heappop(M)
        if cur_vanish > cur_pos:
            cur_pos += R
            ans += 1
        else:
            break
    print(ans)


N = int(input())
for _ in range(N):
    solve()


from sys import stdin
input = stdin.readline
q = int(input())

for _ in range(q):
    n, r = list(map(int, input().split()))

    x = list(map(int, input().split()))
    x.sort(reverse=True)
    knockbacks = []

    for i in range(len(x)):
        if i == 0 or x[i] != x[i - 1]:
            loc = x[i]
            knockbacks.append((loc + r - 1) // r)
    
    cnt = 0
    while True:
        if cnt >= len(knockbacks) or knockbacks[cnt] <= cnt:
            break
        else:
            cnt += 1

    print(cnt)


import sys
input=sys.stdin.readline

for _ in range(int(input())):
    n,r=map(int,input().split())
    x=sorted(set(map(int,input().split())))
    
    cnt=0
    now_right_idx=len(x)-1
    total_explosion=0

    while now_right_idx>=0:
        cnt+=1
        total_explosion+=r
        now_right_idx-=1
        while now_right_idx>=0 and x[now_right_idx]<=total_explosion:
            now_right_idx-=1

    print(cnt)


import sys
input=sys.stdin.readline
for i in range(int(input())):
    n,r = list(map(int,input().split()))
    a = sorted(list(set(list(map(int,input().split())))),reverse=True)
    i = 0
    se = 0
    n = len(a)
    while i<n and a[i] - se > 0:
        i+=1
        se+=r
      
    print(i)