You are given an array $a$ of length $n$, and an integer $x$. You can perform the following operation as many times as you would like (possibly zero): replace two adjacent elements of the array by their sum. For example, if the initial array was $[3, 6, 9]$, in a single operation one can replace the last two elements by their sum, yielding an array $[3, 15]$, or replace the first two elements to get an array $[9, 9]$. Note that the size of the array decreases after each operation.

The beauty of an array $b=[b_1, \ldots, b_k]$ is defined as $\sum_{i=1}^k \left\lceil \frac{b_i}{x} \right\rceil$, which means that we divide each element by $x$, round it up to the nearest integer, and sum up the resulting values. For example, if $x = 3$, and the array is $[4, 11, 6]$, the beauty of the array is equal to $\left\lceil \frac{4}{3} \right\rceil + \left\lceil \frac{11}{3} \right\rceil + \left\lceil \frac{6}{3} \right\rceil = 2 + 4 + 2 = 8$.

Please determine the minimum and the maximum beauty you can get by performing some operations on the original array.


-----Input-----

The first input line contains a single integer $t$ — the number of test cases ($1 \le t \le 1000$).

The first line of each test case contains two integers $n$ and $x$ ($1 \leq n \leq 10^5$, $1 \leq x \leq 10^9$).

The next line contains $n$ integers $a_1, a_2, \ldots, a_n$ ($1 \leq a_i \leq 10^9$), the elements of the array $a$.

It is guaranteed that the sum of values of $n$ over all test cases does not exceed $10^5$.


-----Output-----

For each test case output two integers — the minimal and the maximal possible beauty.


-----Examples-----

Input
2
3 3
3 6 9
3 3
6 4 11
Output
6 6
7 8


-----Note-----

In the first test case the beauty of the array does not change if we perform any operations.

In the second example we can leave the array unchanged to attain the maximum beauty, and to get the minimum beauty one can replace two elements $4$ and $11$ with their sum, yielding an array $[6, 15]$, which has its beauty equal to $7$.

Difficulty: EASY

Solutions:
from math import ceil
R = lambda : map(int, input().split())
for _ in range(int(input())):
	(n, x) = R()
	a = list(R())
	(mn, mx) = (0, 0)
	for i in a:
		mn += ceil(i / x)
		mx += i
	print(ceil(mx / x), mn)


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	w = list(map(int, input().split()))
	s = sum(w)
	print(s // x + (s % x > 0), sum([i // x + (i % x > 0) for i in w]))


import math as mat
for j in range(int(input())):
	(k, p) = map(int, input().split())
	litt = list(map(int, input().split()))
	sm = sum(litt)
	mm = mat.ceil(sm / p)
	tt = 0
	for g in range(k):
		tt += mat.ceil(litt[g] / p)
	print(mm, tt)


from math import ceil
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	print(ceil(sum(a) / x), sum([ceil(i / x) for i in a]))


import math
t = int(input())
while t > 0:
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	ma = 0
	mi = math.ceil(sum(a) / x)
	for i in range(n):
		ma += math.ceil(a[i] / x)
	print(mi, ma)
	t -= 1


from math import ceil
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	ma = 0
	for i in l:
		ma += ceil(i / x)
	print(ceil(sum(l) / x), ma)


from sys import stdin
input = stdin.readline

def ceil(c):
	if int(c) == c:
		return int(c)
	return int(c) + 1

def solve():
	(x, y) = map(int, input().split())
	l = list(map(int, input().split()))
	(s, sum) = (0, 0)
	for i in l:
		s += ceil(i / y)
		sum += i
	ts = ceil(sum / y)
	return sorted([s, ts])
for _ in range(int(input())):
	print(*solve())


cases = int(input())
for _ in range(cases):
	(n, div) = map(int, input().split())
	l = list(map(int, input().split()))
	(minB, remainder) = divmod(sum(l), div)
	if remainder:
		minB += 1
	maxB = 0
	for i in range(n):
		(temp, r) = divmod(l[i], div)
		if r:
			temp += 1
		maxB += temp
	print(minB, maxB)


import math
for i in range(int(input())):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	maxx = 0
	for i in range(len(arr)):
		val = arr[i] / x
		maxx += math.ceil(val)
	minn = math.ceil(sum(arr) / x)
	print(minn, maxx)


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	m = 0
	c = 0
	a = list(map(int, input().split()))
	for i in a:
		m += math.ceil(i / x)
	c = math.ceil(sum(a) / x)
	print(min(c, m), max(c, m))


t = int(input())
for tt in range(t):
	n = list(map(int, input().split()))
	a = list(map(int, input().split()))
	suma = 0
	suma2 = 0
	for i in a:
		suma += i
	suma = (suma + n[1] - 1) // n[1]
	for i in a:
		suma2 = suma2 + (i + n[1] - 1) // n[1]
	print(int(suma), int(suma2))


import math
t = int(input())
while t > 0:
	t -= 1
	(n, m) = input().split()
	(a, b) = (int(n), int(m))
	l = [int(x) for x in input().split()]
	mi = math.ceil(sum(l) / b)
	mx = sum([math.ceil(x / b) for x in l])
	print(mi, mx)


from math import ceil
t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	max_a = 0
	for j in a:
		max_a += ceil(j / x)
	min_a = ceil(sum(a) / x)
	print(min_a, max_a)


import sys
import math
for n in range(int(sys.stdin.readline())):
	x = int(sys.stdin.readline().split(' ')[1])
	a_i = sys.stdin.readline().split(' ')
	SumMin = 0
	SumMax = 0
	for a in a_i:
		SumMin += int(a)
	SumMin = math.ceil(SumMin / x)
	for a in a_i:
		SumMax += math.ceil(int(a) / x)
	print(str(SumMin) + ' ' + str(SumMax))


from math import ceil
t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	mn = ceil(sum(a) / x)
	mx = 0
	for k in a:
		mx += ceil(k / x)
	print(mn, mx)


import math
t = int(input())
for i in range(0, t):
	(n, x) = map(int, input().split())
	alist = list(map(int, input().split()))
	c = 0
	for j in range(0, n):
		c = c + math.ceil(alist[j] / x)
	s = sum(alist)
	d = math.ceil(s / x)
	print(f'{d} {c}')


from math import ceil
for test_var in range(int(input())):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	ansMin = ceil(sum(arr) / x)
	ansLarge = 0
	for m in arr:
		ansLarge += ceil(m / x)
	print(f'{ansMin} {ansLarge}')


from sys import stdin, stdout
import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	c = 0
	s = sum(l)
	d = math.ceil(s / x)
	for i in l:
		c += math.ceil(i / x)
	print(d, c)


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	mn = 0
	mx = 0
	for i in a:
		if i % x == 0:
			mx += i // x
		else:
			mx += i // x + 1
	s = sum(a)
	if s % x == 0:
		mn = s // x
	else:
		mn = s // x + 1
	print(mn, end=' ')
	print(mx)


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = [int(i) for i in input().split()]
	mini = math.ceil(sum(a) / x)
	maxi = 0
	for i in a:
		maxi += math.ceil(i / x)
	print(mini, maxi)


import math
t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	min1 = math.ceil(sum(a) / x)
	for e in range(n):
		a[e] = math.ceil(a[e] / x)
	max1 = sum(a)
	print(min1, max1)


a = int(input())
b = 0
while b < a:
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	sum1 = 0
	for _ in arr:
		sum1 += (_ + (x - 1)) // x
	sum2 = (sum(arr) + (x - 1)) // x
	print(sum2, sum1)
	b += 1


from sys import stdin
import math
t = int(stdin.readline())
for _ in range(t):
	(n, x) = map(int, stdin.readline().split())
	arr = list(map(int, stdin.readline().split()))
	mini = math.ceil(sum(arr) / x)
	maxi = 0
	for i in arr:
		maxi += math.ceil(i / x)
	print(mini, maxi)


import sys
input = sys.stdin.readline

def solve():
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	S = sum(arr)
	curr = ma = 0
	for i in range(n):
		curr += arr[i]
		if curr % x:
			ma += curr // x + 1
			curr = 0
	ma += curr // x
	mi = S // x
	mi += 1 if S % x else 0
	return (mi, ma)
for _ in range(int(input())):
	print(*solve())


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	a = list(map(int, input().split()))
	s = sum(a)
	(c, p) = (0, 0)
	for i in a:
		if i % k == 0:
			c += i / k
		else:
			c += i // k + 1
	if s % k == 0:
		p += s / k
	else:
		p += s // k + 1
	print(int(p), int(c))


import math

def solve():
	(n, x) = map(int, input().split())
	a = [int(i) for i in input().split()]
	ans = 0
	for i in a:
		ans += math.ceil(i / x)
	d = sum(a)
	print(math.ceil(d / x), ans)
t = int(input())
for _ in range(t):
	solve()


R = lambda : map(int, input().split())
for _ in range(int(input())):
	(n, x) = R()
	a = list(R())
	print((sum(a) + x - 1) // x, sum(((i + x - 1) // x for i in a)))


t = int(input())
import math
for tc in range(t):
	(n, x) = [int(x) for x in input().split()]
	a = list(map(int, input().split()))
	max_value = 0
	for i in range(n):
		max_value += math.ceil(a[i] / x)
	min_value = math.ceil(sum(a) / x)
	print(min_value, max_value)


a = int(input())
import math
for i in range(a):
	(n, d) = map(int, input().split())
	ini = list(map(int, input().split()))
	mini = 0
	maxi = 0
	for j in ini:
		mini += j
		maxi += math.ceil(j / d)
	print(math.ceil(mini / d), maxi)


T = int(input())
for t in range(T):
	(n, x) = tuple([int(num) for num in input().split()])
	a = [int(num) for num in input().split()]
	max_result = sum([(num + x - 1) // x for num in a])
	min_result = (sum(a) + x - 1) // x
	print('{} {}'.format(min_result, max_result))


import math
t = int(input())
for _ in range(t):
	(n, x) = input().split()
	(n, x) = (int(n), int(x))
	a = list(map(int, input().split()))
	minA = 0
	maxA = 0
	minA = math.ceil(sum(a) / x)
	for i in a:
		maxA += math.ceil(i / x)
	print(minA, end=' ')
	print(maxA)


import os
import sys
from io import BytesIO, IOBase
from collections import defaultdict
from math import ceil
MOD = 1000000007

def solution():
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	print(ceil(sum(a) / x), end=' ')
	s = 0
	for i in a:
		s += ceil(i / x)
	print(s)
	return

def main():
	testcases = 1
	testcases = int(input())
	for _ in range(testcases):
		solution()
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

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


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from math import gcd, ceil

def prod(a, mod=10 ** 9 + 7):
	ans = 1
	for each in a:
		ans = ans * each % mod
	return ans

def lcm(a, b):
	return a * b // gcd(a, b)

def binary(x, length=16):
	y = bin(x)[2:]
	return y if len(y) >= length else '0' * (length - len(y)) + y
for _ in range(int(input()) if True else 1):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	print(ceil(sum(a) / x), sum((ceil(k / x) for k in a)))


import sys
sys.setrecursionlimit(1000000)
from collections import defaultdict, deque, Counter
from itertools import permutations
from math import sqrt, gcd, pi, factorial
from functools import reduce
from sys import stdin
from bisect import bisect_right, bisect_left
from copy import copy

def solve(n, x, a):
	ma = sum([(a[i] + x - 1) // x for i in range(n)])
	mi = (sum(a) + x - 1) // x
	return (mi, ma)
t = int(input())
anss = [[0, 0] for _ in range(t)]
for i in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	anss[i] = solve(n, x, a)
for ans in anss:
	print(*ans)


from math import ceil
for _ in range(int(input())):
	(n, x) = list(map(int, input().split()))
	arr = list(map(int, input().split()))
	min_ = 0
	for i in arr:
		min_ += ceil(i / x)
	max_ = ceil(sum(arr) / x)
	print(max_, min_)


import math, sys
from collections import defaultdict, Counter, deque
from heapq import heapify, heappush, heappop
from bisect import bisect_left, bisect_right
INF = float('inf')
MOD = int(1000000000.0) + 7
MAX = int(2000000.0)

def solve():
	(n, x) = vars()
	arr = array()
	mini = math.ceil(sum(arr) / x)
	maxi = 0
	for i in range(n):
		maxi += math.ceil(arr[i] / x)
	print(*sorted([mini, maxi]))

def main():
	t = 1
	t = int(input())
	for _ in range(t):
		solve()

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def sieve():
	primes = [1 for i in range(MAX)]
	primes[0] = primes[1] = 0
	i = 2
	while i <= MAX ** 0.5:
		j = i * i
		while primes[i] and j < MAX:
			if j % i == 0:
				primes[j] = 0
			j += i
		i += 1
	return primes

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

def print(*args, sep=' ', end='\n'):
	first = True
	for arg in args:
		if not first:
			sys.stdout.write(str(sep))
		sys.stdout.write(str(arg))
		first = False
	sys.stdout.write(end)

def vars():
	return map(int, input().split())

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


import math
t = int(input())
for z in range(t):
	(n, x) = [int(x) for x in input().split()]
	a = [int(x) for x in input().split()]
	ma = 0
	s = 0
	for e in a:
		ma += math.ceil(e / x)
		s += e
	mi = math.ceil(s / x)
	print(mi, ma)


import math
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	s = sum(arr)
	mini = math.ceil(s / x)
	maxi = 0
	for i in arr:
		maxi = maxi + math.ceil(i / x)
	print(mini, maxi)


from math import ceil

def main():
	for _ in range(int(input())):
		(n, x) = map(int, input().split())
		a = [int(i) for i in input().split()]
		s = ceil(sum(a) / x)
		t = sum([ceil(i / x) for i in a])
		print(f'{s} {t}')
main()


import math
for i in range(int(input())):
	(n, x) = [int(i) for i in input().split()]
	lst = [int(i) for i in input().split()]
	print(math.ceil(sum(lst) / x), sum([math.ceil(i / x) for i in lst]))


import math
t = int(input())
while t:
	t -= 1
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	mi = math.ceil(sum(a) / x)
	max_arr = map(lambda z: math.ceil(z / x), a)
	ma = sum(max_arr)
	print(mi, ma)


import os
import sys
from io import BytesIO, IOBase
import math as M
import itertools as ITR
from collections import defaultdict as D
from collections import Counter as C
from collections import deque as Q
import threading
from functools import lru_cache, reduce
from functools import cmp_to_key as CMP
from bisect import bisect_left as BL
from bisect import bisect_right as BR
import random as R
import string
import cmath, time
enum = enumerate
start_time = time.time()
MOD = 1000000007
MA = float('inf')
MI = float('-inf')
di8 = ((1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1))
di4 = ((1, 0), (0, 1), (-1, 0), (0, -1))

def increase_stack():
	sys.setrecursionlimit(2 ** 32 // 2 - 1)
	threading.stack_size(1 << 27)

def binary(n):
	return bin(n)[2:]

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def maxfactor(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
	if q:
		return q[-1]

def factors(n):
	q = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			q.append(i)
			q.append(n // i)
	return list(sorted(list(set(q))))

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(M.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(int(n))
	l.sort()
	return l

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def seive(n):
	a = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p ** 2, n + 1, p):
				prime[i] = False
		p = p + 1
	for p in range(2, n + 1):
		if prime[p]:
			a.append(p)
	prime[0] = prime[1] = False
	return (a, prime)

def maxPrimeFactors(n):
	maxPrime = -1
	while n % 2 == 0:
		maxPrime = 2
		n >>= 1
	for i in range(3, int(M.sqrt(n)) + 1, 2):
		while n % i == 0:
			maxPrime = i
			n = n / i
	if n > 2:
		maxPrime = n
	return int(maxPrime)

def countchar(s, i):
	c = 0
	ch = s[i]
	for i in range(i, len(s)):
		if s[i] == ch:
			c += 1
		else:
			break
	return c

def str_counter(a):
	q = [0] * 26
	for i in range(len(a)):
		q[ord(a[i]) - 97] = q[ord(a[i]) - 97] + 1
	return q

def lis(arr):
	n = len(arr)
	lis = [1] * n
	maximum = 0
	for i in range(1, n):
		for j in range(0, i):
			if arr[i] > arr[j] and lis[i] < lis[j] + 1:
				lis[i] = lis[j] + 1
				maximum = max(maximum, lis[i])
	return maximum

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)

def agcd(a, *b):
	for i in b:
		a = gcd(a, i)
	return a

def lcm(a, *b):
	val = a
	gc = a
	for i in b:
		gc = gcd(gc, i)
		val *= i
	return val // gc

def ncr(n, r):
	return M.factorial(n) // (M.factorial(n - r) * M.factorial(r))

def npr(n, r):
	return M.factorial(n) // M.factorial(n - r)

def IF(c, t, f):
	return t if c else f

def YES(c):
	print(IF(c, 'YES', 'NO'))

def Yes(c):
	print(IF(c, 'Yes', 'No'))

def yes(c):
	print(IF(c, 'yes', 'no'))

def JA(a, sep=' '):
	print(sep.join(map(str, a)))

def JAA(a, s='\n', t=' '):
	return s.join((t.join(map(str, b)) for b in a))

def PS(a, s=' '):
	print(str(a), end=s)

def I():
	return int(inp())

def F():
	return float(inp())

def LI():
	return list(map(int, inp().split()))

def LF():
	return list(map(float, inp().split()))

def MATI(n):
	return [LI() for i in range(n)]

def MATS(n):
	return [list(inp()) for i in range(n)]

def IV():
	return map(int, inp().split())

def FV():
	return map(float, inp().split())

def LS():
	return list(inp())

def S():
	return inp()
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
inp = lambda : sys.stdin.readline().rstrip('\r\n')
TestCases = 1

def solve():
	(n, x) = IV()
	arr = LI()
	a = 0
	for i in arr:
		a += M.ceil(i / x)
	b = M.ceil(sum(arr) / x)
	print(b, a)

def main():
	flag = 1
	try:
		sys.stdin = open('c:/Users/Manoj Chowdary/Documents/python/CodeForces/contest-div-2/input.txt', 'r')
		sys.stdout = open('c:/Users/Manoj Chowdary/Documents/python/CodeForces/contest-div-2/output.txt', 'w')
	except:
		flag = 0
	t = 1
	if TestCases:
		t = I()
	for _ in range(1, t + 1):
		solve()
	if flag:
		print('Time: %.4f sec' % (time.time() - start_time))
		localtime = time.asctime(time.localtime(time.time()))
		print(localtime)
		sys.stdout.close()
main()


import math
t = int(input())
for i in range(t):
	first = input().split()
	n = int(first[0])
	x = int(first[1])
	listw = input().split()
	listw = list(map(int, listw))
	summin = 0
	summax = 0
	for i in listw:
		summax += int(math.ceil(i / x))
		summin += int(i)
	summin = math.ceil(summin / x)
	print(summin, summax)


import math
t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	mini = math.ceil(sum(l) / x)
	maxi = 0
	for j in l:
		maxi = maxi + math.ceil(j / x)
	print(mini, maxi)


import sys
import math
import itertools
import functools
import collections
import operator
import fileinput
import copy
import string
ORDA = 97

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return [int(i) for i in input().split()]

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	new_number = 0
	while number > 0:
		new_number += number % base
		number //= base
	return new_number

def cdiv(n, k):
	return n // k + (n % k != 0)

def ispal(s):
	for i in range(len(s) // 2 + 1):
		if s[i] != s[-i - 1]:
			return False
	return True
for _ in range(ii()):
	(n, x) = mi()
	a = li()
	print((sum(a) + x - 1) // x, sum([(i + x - 1) // x for i in a]))


for _ in range(int(input())):
	(n, x) = [*map(int, input().split())]
	mx = 0
	a = [int(i) for i in input().split()]
	print((sum(a) + x - 1) // x, end=' ')
	for i in a:
		mx += (i + x - 1) // x
	print(mx)


from math import ceil
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	mx = 0
	mn = 0
	for y in a:
		mx += ceil(y / x)
		mn += y
	mn = ceil(mn / x)
	print(mn, mx)


import math
t = int(input())
for i in range(t):
	ipt = input()
	ipt = ipt.split(' ')
	x = int(ipt[1])
	ipt = input()
	lst = ipt.split()
	lst = [int(i) for i in lst]
	sm = sum(lst)
	mn = math.ceil(sm / x)
	mx = 0
	for i in lst:
		mx += math.ceil(i / x)
	print(mn, mx)


import sys
input = sys.stdin.readline
from math import ceil
T = int(input())
for t in range(T):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	min_ = ceil(sum(arr) / x)
	max_ = sum([ceil(elem / x) for elem in arr])
	print(str(min_) + ' ' + str(max_))


from sys import stdin
import math
t = int(stdin.readline())
while t > 0:
	t -= 1
	(n, x) = map(int, stdin.readline().split())
	a = list(map(int, stdin.readline().split()))
	m = math.ceil(sum(a) / x)
	M = 0
	for y in a:
		M += math.ceil(y / x)
	print(m, M)


T = int(input())
while T > 0:
	T -= 1
	(n, x) = map(int, input().split())
	a = list(map(int, input('').split()))
	Min = (sum(a) + x - 1) // x
	Max = 0
	for i in a:
		Max += (i + x - 1) // x
	print(Min, Max)


import math
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	lower = math.ceil(sum(arr) / x)
	upper = sum((math.ceil(i / x) for i in arr))
	print(lower, upper)


from sys import stdin
t = int(stdin.readline())
while t > 0:
	t -= 1
	(n, x) = map(int, stdin.readline().split())
	a = list(map(int, stdin.readline().split()))
	count = 0
	r = 0
	M = 0
	for y in a:
		rr = y % x
		r += rr
		count += rr > 0
		M += y - rr
	M = M // x
	print(M + r // x + (r % x > 0), M + count)


from sys import stdin, stdout
import math
from collections import defaultdict

def get_ints():
	return map(int, I().split())

def get_list():
	return list(map(int, I().split()))

def I():
	return stdin.readline()
for _ in range(int(I())):
	(n, x) = get_ints()
	L = get_list()
	min = math.ceil(sum(L) / x)
	max = 0
	for i in L:
		max += math.ceil(i / x)
	print(min, max)


import sys
import math
input = sys.stdin.readline
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	A = list(map(int, input().split()))
	(mini, maxi) = (math.ceil(sum(A) / x), 0)
	for a in A:
		maxi += math.ceil(a / x)
	print(mini, maxi)


from math import ceil
for t in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	(bmin, bmax) = (0, 0)
	for i in a:
		bmin += i
		bmax += ceil(i / x)
	print(ceil(bmin / x), bmax)


from math import ceil
tests = int(input())
for _ in range(tests):
	(n, x) = map(int, input().split())
	case_array = list(map(int, input().split()))
	print(ceil(sum(case_array) / x), sum([ceil(elem / x) for elem in case_array]))


import typing
import sys
import math
import collections
import bisect
import itertools
import heapq
import decimal
import copy
import operator
INF = 10 ** 20
MOD = 10 ** 9 + 7

def ni():
	return int(sys.stdin.readline())

def ns():
	return map(int, sys.stdin.readline().split())

def na():
	return list(map(int, sys.stdin.readline().split()))

def na1():
	return list(map(lambda x: int(x) - 1, sys.stdin.readline().split()))

def main():
	t = ni()
	for _ in range(t):
		(n, x) = ns()
		a = na()
		mx = sum([(ai + x - 1) // x for ai in a])
		mn = (sum(a) + x - 1) // x
		print(mn, mx)
main()


import math
t = int(input())
for a in range(t):
	s = str(input())
	l = list(map(int, s.split()))
	x = l[1]
	s1 = str(input())
	l1 = list(map(int, s1.split()))
	l2 = [math.ceil(num / x) for num in l1]
	maxb = sum(l2)
	minb = math.ceil(sum(l1) / x)
	print(minb, maxb)


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	array = [int(i) for i in input().split()]
	y = math.ceil(sum(array) / x)
	z = 0
	for i in array:
		z += math.ceil(i / x)
	print(y, z)


from sys import stdout, stdin
input = stdin.readline
print = stdout.write

def main():
	mp = lambda : map(int, input().strip().split())
	it = int
	t = it(input())
	for _ in [0] * t:
		(n, x) = mp()
		a = list(mp())
		s = 0
		smax = 0
		for i in a:
			s += i
			smax += (i + x - 1) // x
		print(str((s + x - 1) // x) + ' ' + str(smax) + '\n')
main()


from collections import Counter, defaultdict, deque
import sys
input = sys.stdin.readline

def solve():
	(n, p) = [int(x) for x in input().split()]
	arr = [int(x) for x in input().split()]
	ans = 0
	for i in range(n):
		ans += (arr[i] + p - 1) // p
	ans2 = (sum(arr) + p - 1) // p
	print(ans2, ans)
tt = int(input())
for test in range(tt):
	solve()


import math
t = int(input())
for i in range(t):
	(n, k) = map(int, input().split())
	l = list(map(int, input().split()))
	sum1 = 0
	for x in l:
		sum1 += math.ceil(x / k)
	sum2 = math.ceil(sum(l) / k)
	if sum2 > sum1:
		print(sum1, sum2)
	else:
		print(sum2, sum1)


def answer(n, x, ary):
	max_b = 0
	sum = 0
	for e in ary:
		max_b += -(-e // x)
		sum += e
	min_b = -(-sum // x)
	print(min_b, max_b)
	return

def main():
	t = int(input())
	n = [0] * t
	x = [0] * t
	ary = [0] * t
	for j in range(t):
		(n[j], x[j]) = [int(i) for i in input().split()]
		ary[j] = [int(i) for i in input().split()]
	for j in range(t):
		answer(n[j], x[j], ary[j])
main()


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	print(-(sum(arr) // -x), sum((-(k // -x) for k in arr)))


import math
t = int(input())
for _ in range(t):
	(n, x) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	(a1, a2) = (0, 0)
	for i in range(n):
		a1 = a1 + a[i]
		a2 = a2 + int(math.ceil(a[i] / x))
	a1 = int(math.ceil(a1 / x))
	print(a1, a2)


from math import ceil
for u in range(int(input())):
	(n, x) = map(int, input().split())
	y = [int(w) for w in input().split()]
	m = ceil(sum(y) / x)
	t = 0
	for i in y:
		t += ceil(i / x)
	print(m, t)


import sys
import math
T = int(sys.stdin.readline())
ans_arr = []
for t in range(T):
	[n, x] = [int(i) for i in sys.stdin.readline().split()]
	a = [int(j) for j in sys.stdin.readline().split()]
	mx = 0
	for g in range(n):
		mx += math.ceil(a[g] / x)
	mi = math.ceil(sum(a) / x)
	ans_arr.append(str(mi) + ' ' + str(mx))
print('\n'.join(ans_arr))


import math
for i in range(int(input())):
	(n, x) = list(map(int, input().split()))
	values = list(map(int, input().split()))
	collectedSum = math.ceil(sum(values) / x)
	segeratedSum = sum(list(map(lambda j: math.ceil(j / x), values)))
	print(min(segeratedSum, collectedSum), max(segeratedSum, collectedSum))


t = int(input())
j = 0
m = []
p = []
while j < t:
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	maxi = 0
	mini = 0
	for i in a:
		if i % x == 0:
			maxi += i // x
		else:
			maxi += i // x + 1
	m.append(maxi)
	s = sum(a)
	if s % x == 0:
		mini += s // x
	else:
		mini += s // x + 1
	p.append(mini)
	j += 1
for i in range(0, t):
	print(p[i], m[i])


i = int(input())
for x in range(i):
	s = [int(a) for a in input().split()]
	s1 = [int(a) for a in input().split()]
	summ = 0
	for z in s1:
		summ = summ + z
	if summ % s[1] == 0:
		d = summ // s[1]
	else:
		d = summ // s[1] + 1
	g = 0
	for z in s1:
		if z % s[1] == 0:
			g = z // s[1] + g
		else:
			g = z // s[1] + g + 1
	print(d, g)


def solve():
	(n, x) = list(map(int, input().split()))
	a = list(map(int, input().split()))
	SU = sum(a)
	b = [(i - 1) // x + 1 for i in a]
	print((SU - 1) // x + 1, sum(b))
	return
TTTT = int(input())
while TTTT:
	solve()
	TTTT -= 1


from math import ceil
t = int(input())
while t:
	t -= 1
	ma = 0
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	for i in l:
		ma += ceil(i / x)
	print(ceil(sum(l) / x), ma)


import sys
import math

def solve():
	(n, x) = list(map(int, input().split()))
	arr = list(map(int, input().split()))
	high = 0
	for i in range(n):
		high += math.ceil(arr[i] / x)
	print(math.ceil(sum(arr) / x), high)
num = int(input())
for n in range(num):
	solve()


for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	Min = 0
	s = 0
	for i in range(int(n)):
		k = int(a[i])
		Min += k // x + (k % x != 0)
		s += k
	print(s // x + (s % x != 0), Min)


from math import ceil
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	s = sum(a)
	minn = ceil(s / x)
	maxx = 0
	for k in a:
		maxx += ceil(k / x)
	print(minn, maxx)


import math
for i in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	b = 0
	for j in range(n):
		b += math.ceil(a[j] / x)
	print(math.ceil(sum(a) / x), b)


def solve():
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	mi = (sum(a) + x - 1) // x
	ma = sum([(i + x - 1) // x for i in a])
	print(mi, ma)

def main():
	t = 1
	t = int(input())
	for _ in range(t):
		solve()
main()


from sys import stdin
import math
t = int(stdin.readline())
while t > 0:
	t -= 1
	(n, x) = map(int, stdin.readline().split())
	a = list(map(int, stdin.readline().split()))
	s = sum(a)
	m = math.ceil(s / x)
	count = 0
	r = 0
	for y in a:
		rr = y % x
		r += rr
		count += rr > 0
	print(m, (s - r) // x + count)


from math import *
for _ in range(int(input())):
	(n, x) = tuple(map(int, input().split()))
	a = [int(i) for i in input().split()]
	mx = 0
	for i in a:
		mx += ceil(i / x)
	print(ceil(sum(a) / x), mx)


import math
t = int(input())
while t > 0:
	t = t - 1
	(n, y) = map(int, input().split())
	list_arr = list(map(int, input().split()))
	a = math.ceil(sum(list_arr) / y)
	res = map(lambda x: math.ceil(x / y), list_arr)
	b = sum(list(res))
	print(min(a, b), max(a, b))


import math
pi = math.acos(-1)
T = int(input())
for _ in range(T):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	ret1 = (sum(a) + x - 1) // x
	ret2 = 0
	for num in a:
		ret2 += (num + x - 1) // x
	print(ret1, end=' ')
	print(ret2)


import math
t = int(input())
while t:
	t -= 1
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	mn = 0
	mn = math.ceil(sum(a) / x)
	mx = 0
	for i in range(n):
		mx += math.ceil(a[i] / x)
	print(mn, mx)


cases = int(input())
for case in range(cases):
	(n, x) = map(int, str(input()).strip().split(' '))
	a = [int(i) for i in str(input()).strip().split(' ')]
	minimum = sum(a)
	if minimum % x == 0:
		minimum //= x
	else:
		minimum //= x
		minimum += 1
	maximum = 0
	for i in a:
		if i % x == 0:
			maximum += i // x
		else:
			maximum += i // x + 1
	print(minimum, maximum)


from math import ceil
for _ in range(int(input())):
	(n, k) = [int(x) for x in input().split()]
	arr = [int(x) for x in input().split()]
	sum = max = 0
	for a in arr:
		max += ceil(a / k)
		sum += a
	print(ceil(sum / k), max)


import math
for t in range(int(input())):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	a = math.ceil(sum(l) / x)
	c = 0
	s = 0
	for i in l:
		if i % x != 0:
			s = s + i % x
			c = c + 1
	print(a, a + c - math.ceil(s / x))


import math
t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	mx = 0
	for i in range(n):
		mx += math.ceil(arr[i] / x)
	mi = math.ceil(sum(arr) / x)
	print(str(mi) + ' ' + str(mx))


import math as m
for i in range(int(input())):
	(a, b) = map(int, input().split())
	lis = list(map(int, input().split()))
	ans = 0
	for i in lis:
		ans += m.ceil(i / b)
	an2 = m.ceil(sum(lis) / b)
	print(an2, ans)


import math as m
for i in range(int(input())):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	mi = ma = 0
	for i in l:
		ma += m.ceil(i / x)
	mi = m.ceil(sum(l) / x)
	print(mi, ma)


for _ in range(0, int(input())):
	(n, x) = map(int, input().split())
	v = list(map(int, input().split()))
	Ms = 0
	for i in v:
		Ms += 0 - -i // x
	ms = 0 - -sum(v) // x
	print(ms, Ms)


import math
ceil = math.ceil
T = int(input())
for i in range(T):
	(N, X) = map(int, input().split())
	A = list(map(int, input().split()))
	max = 0
	sum = 0
	for i in range(len(A)):
		max += ceil(A[i] / X)
		sum += A[i]
	print(ceil(sum / X), max)


import math
for i in range(int(input())):
	(n, x) = tuple(map(int, input().split()))
	arr = list(map(int, input().split()))
	maxi = sum(list(map(lambda ele: math.ceil(ele / x), arr)))
	mini = math.ceil(sum(arr) / x)
	print(mini, maxi)


import math

def ass(a, b):
	if a != b:
		print(f'Assertion error: {a} != {b}')
	else:
		print('OK')

def intline():
	return [int(item) for item in input().split()]

def line():
	return [item for item in input().split()]

def dump(lst):
	for (i, item) in enumerate(lst):
		print(i, item)

def binsearch(arr, a, b):
	m = (a + b) // 2
	if a >= b:
		return a - 1 if arr[a] == 0 else a
	return binsearch(arr, a, m - 1) if arr[m] == 0 else binsearch(arr, m + 1, b)

def f(x, arr):
	min = math.ceil(sum(arr) / x)
	max = sum([math.ceil(item / x) for item in arr])
	return str(min) + ' ' + str(max)
t = intline()[0]
for i in range(t):
	(n, x) = intline()
	print(f(x, intline()))


import math
t = int(input())
for i in range(t):
	(n, x) = list(map(int, input().strip().split()))
	a = list(map(int, input().strip().split()))
	(minv, maxv) = (math.ceil(sum(a) / x), 0)
	for j in range(n):
		maxv += math.ceil(a[j] / x)
	print(minv, maxv)


try:
	t = int(input())
	for i in range(t):
		(n, x) = list(map(int, input().split()))
		a = list(map(int, input().split()))
		import math
		mini = math.ceil(sum(a) / x)
		maxi = 0
		for i in range(len(a)):
			maxi += math.ceil(a[i] / x)
		print(mini, maxi)
except:
	pass


from collections import Counter
from math import ceil

def fun(ls, lt):
	(n, x) = lt
	mx = [ceil(i / x) for i in ls]
	mx_value = sum(mx)
	print(ceil(sum(ls) / x), mx_value)
T = int(input())
for i in range(T):
	lt = list(map(int, input().split()))
	ls = list(map(int, input().split()))
	fun(ls, lt)


import math
for i in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	max = 0
	for i in a:
		max += math.ceil(i / x)
	minimum = sum(a) / x
	print(math.ceil(minimum), max)


import math as mt
t = int(input())
for i in range(0, t):
	(m, n) = map(int, input().split())
	arr = list(map(int, input().strip().split()))[:m]
	y = sum(arr)
	yy = int(mt.ceil(y / n))
	yyy = 0
	for j in arr:
		yyy = yyy + int(mt.ceil(j / n))
	l = []
	l.append(yy)
	l.append(yyy)
	print(*l, sep=' ')


import math as m
t = input
for _ in range(int(t())):
	(n, x) = map(int, t().split())
	a = list(map(int, t().split()))
	b2 = [m.ceil(i / x) for i in a]
	b1 = m.ceil(sum(a) / x)
	print(b1, sum(b2))


import math

def getint():
	return [int(i) for i in input().split()]

def getstr():
	return [str(i) for i in input().split()]

def solve():
	(n, x) = getint()
	a = getint()
	max_ans = 0
	min_ans = 0
	for i in a:
		max_ans += math.ceil(i / x)
	min_ans = math.ceil(sum(a) / x)
	print(min_ans, max_ans)
for _ in range(int(input())):
	solve()


from sys import stdin
readline = stdin.readline

def read_ints():
	return map(int, readline().split())
(t_n,) = read_ints()
for i_t in range(t_n):
	(n, x) = read_ints()
	a_seq = tuple(read_ints())
	min_level = (sum(a_seq) - 1) // x + 1
	max_level = sum(((a - 1) // x + 1 for a in a_seq))
	print(min_level, max_level)


import sys
import math
from collections import defaultdict, Counter
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
t = int(input())
for i in range(t):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	ma = 0
	tot = 0
	for j in a:
		ma += j // x
		if j % x != 0:
			ma += 1
		tot += j
	print((tot + x - 1) // x, ma)


import math
from collections import defaultdict
from sys import stdin
input = stdin.readline
T = int(input())
for _ in range(T):
	(n, k) = map(int, input().split())
	arr = list(map(int, input().split()))
	mi = math.ceil(sum(arr) / k)
	mx = 0
	for i in arr:
		mx += math.ceil(i / k)
	print(mi, mx)


import math
t = int(input())
for i in range(t):
	l = []
	(n1, n2) = map(int, input().strip().split())
	l = list(map(int, input().strip().split()))
	l1 = [i / n2 for i in l if i % n2 == 0]
	sum = 0
	maxsum = 0
	minsumofall = 0
	min = 0
	max = 0
	for i in l1:
		sum += i
	sum = int(sum)
	l2 = [i for i in l if i % n2 != 0]
	if not l2:
		print(f'{sum} {sum}')
		continue
	for i in l2:
		m = i / n2
		m = math.ceil(m)
		maxsum += m
		minsumofall += i
	minsum = minsumofall / n2
	minsum = math.ceil(minsum)
	max = sum + maxsum
	min = sum + minsum
	print(f'{int(min)} {int(max)}')


from math import ceil
for _ in range(int(input())):
	(n, x) = (int(x) for x in input().split())
	a = [int(x) for x in input().split()]
	min_beauty = ceil(sum(a) / x)
	max_beauty = 0
	for elem in a:
		max_beauty += ceil(elem / x)
	print(min_beauty, max_beauty)


import math, sys
from collections import defaultdict, deque
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')

def I():
	return int(sys.stdin.readline())

def In():
	return map(int, sys.stdin.readline().split())

def Sn():
	return sys.stdin.readline().strip()

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_left(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		(n, k) = In()
		l = list(In())
		(div, notdiv) = (0, 0)
		(mx, mn) = (0, 0)
		for x in l:
			if x % k == 0:
				mx += x // k
				mn += x // k
			else:
				notdiv += x
				mx += math.ceil(x / k)
				if notdiv % k == 0:
					mn += notdiv // k
					notdiv = 0
		if notdiv:
			mn += math.ceil(notdiv / k)
		print(mn, mx)
	except:
		pass
M = 998244353
P = 1000000007
for _ in range(I()):
	main()


count = int(input())
for _ in range(count):
	(something, x) = input().split()
	(something, x) = (int(something), int(x))
	list_1 = input().split()
	list_2 = [int(i) for i in list_1]
	su = sum(list_2)
	d = 0
	if su % x != 0:
		b = su // x + 1
	else:
		b = su // x
	for i in list_2:
		if i % x != 0:
			d += i // x + 1
		else:
			d += i // x
	print(b, d)


from math import ceil
for p in range(int(input())):
	(n, x) = map(int, input().split())
	a = list(map(int, input().split()))
	print(ceil(sum(a) / x), end=' ')
	s = 0
	for i in a:
		s += ceil(i / x)
	print(s)


import math
T = int(input())
for _ in range(T):
	(n, x) = map(int, input().split())
	A = list(map(int, input().split()))
	mn = (sum(A) + x - 1) // x
	mx = 0
	for a in A:
		mx += (a + x - 1) // x
	print(mn, mx)


import math
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	x = list(map(int, input().split()))
	y = math.ceil(sum(x) / b)
	s = 0
	for i in range(len(x)):
		s += math.ceil(x[i] / b)
	print(y, s)


from math import ceil
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	l = [*map(int, input().split())]
	print(ceil(sum(l) / x), sum((ceil(m / x) for m in l)))


import math
for _ in range(int(input())):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	mini = math.ceil(sum(arr) / x)
	maxi = 0
	for elm in arr:
		maxi += math.ceil(elm / x)
	print(mini, maxi)


def val(num, x):
	if num % x == 0:
		return num // x
	else:
		return num // x + 1
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	arr = list(map(int, input().split()))
	val1 = sum([val(num, x) for num in arr])
	val2 = val(sum(arr), x)
	print(val2, val1)


from functools import reduce
import os
import sys
from collections import *
from decimal import *
from math import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def arr():
	return [int(i) for i in input().split()]

def sarr():
	return [int(i) for i in input()]

def starr():
	return [str(x) for x in input().split()]

def inn():
	return int(input())

def svalue():
	return tuple(map(str, input().split()))

def parr():
	return [value() for i in range(n)]
albhabet = 'abcdefghijklmnopqrstuvwxyz'
mo = 1000000007
inf = 1e+18
div = 998244353
for _ in range(inn()):
	(n, x) = value()
	a = arr()
	mx = 0
	mn = 0
	left = 0
	for i in a:
		mx += ceil(i / x)
		if i % x == 0:
			mn += i // x
		else:
			left += i
	mn += ceil(left / x)
	print(mn, mx)


import math
t = int(input())

def beauty(n, x):
	sum = 0
	max = 0
	l = list(map(int, input().split()))
	for i in l:
		max += math.ceil(i / x)
		sum += i
	min = math.ceil(sum / x)
	print(min, max)
	return
for _ in range(t):
	(n, x) = map(int, input().split())
	beauty(n, x)


for i in range(int(input())):
	(a, b) = map(int, input().split())
	l = list(map(int, input().split()))
	(p, q) = (0, 0)
	for j in l:
		p += j // b
		if j % b != 0:
			p += 1
		q += j
	z = 0
	if q % b != 0:
		z = 1
	z += q // b
	print(z, p)


T = int(input())
for _ in range(T):
	(n, x) = [int(y) for y in input().split()]
	b = [int(y) for y in input().split()]
	print(sum(b) // x + (1 if sum(b) % x > 0 else 0), sum([y // x + (1 if y % x > 0 else 0) for y in b]))


for _ in range(int(input())):
	r = [int(i) for i in input().split()]
	n = r[0]
	x = r[1]
	f = [int(i) for i in input().split()]
	Big = 0
	for i in f:
		if i % x != 0:
			Big += i // x + 1
		else:
			Big += i // x
	Small = sum(f)
	if Small % x == 0:
		Small = Small // x
	else:
		Small = Small // x + 1
	print(Small, Big)


t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	lists = list(map(int, input().split()))
	max1 = min1 = 0
	for i in lists:
		if i % x == 0:
			max1 = max1 + i // x
		else:
			max1 = max1 + i // x + 1
	s = sum(lists)
	if s % x == 0:
		min1 = s // x
	else:
		min1 = s // x + 1
	print(min1, max1)


from math import *

def func(l, x):
	n = len(l)
	min = 0
	max = 0
	for i in range(n):
		min += l[i]
	min = ceil(min / x)
	for i in range(n):
		max += ceil(l[i] / x)
	print(min, max)
t = int(input())
for _ in range(t):
	(n, x) = map(int, input().split())
	l = list(map(int, input().split()))
	func(l, x)


from math import ceil
import sys
from os import path

def solve():
	(a, b) = map(int, input().split())
	arr = map(int, input().split())
	maxx = minn = 0
	for i in arr:
		maxx += ceil(i / b)
		minn += i
	minn = ceil(minn / b)
	print(minn, maxx)
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
t = 1
t = int(input())
while t:
	solve()
	t -= 1


import math
n = int(input())
for _ in range(n):
	(a, b) = map(int, input().split())
	c = list(map(int, input().split()))
	c1 = sum(map(lambda x: math.ceil(x / b), c))
	c2 = math.ceil(sum(c) / b)
	print(int(c2), int(c1))


import math
T = int(input())
for _ in range(T):
	(n, x) = map(int, input().split())
	ls = list(map(int, input().split()))
	minimum = math.ceil(sum(ls) / x)
	maximum = 0
	for i in ls:
		maximum += math.ceil(i / x)
	print(minimum, maximum)