Cyael is a teacher at a very famous school in Byteland and she is known by her students for being very polite to them and also to encourage them to get good marks on their tests.
Then, if they get good marks she will reward them with candies :) However, she knows they are all very good at Mathematics, so she decided to split the candies evenly to all the students she considers worth of receiving them, so they don't fight with each other. 
She has a bag which initially contains N candies and she intends to split the candies evenly to K students. To do this she will proceed as follows: while she has more than K candies she will give exactly 1 candy to each student until she has less than K candies. On this situation, as she can't split candies equally among all students she will keep the remaining candies to herself.
Your job is to tell how many candies will each student and the teacher
receive after the splitting is performed.

-----Input-----
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
Each test case will consist of 2 space separated integers, N and K denoting the number of candies and the number of students as described above.

-----Output-----
For each test case, output a single line containing two space separated integers, the first one being the number of candies each student will get, followed by the number of candies the teacher will get.

-----Constraints-----
-  T<=100 in each test file 
- 0 <= N,K <= 233 - 1 

-----Example-----Input:
2
10 2
100 3

Output:
5 0
33 1

-----Explanation-----
For the first test case, all students can get an equal number of candies and teacher receives no candies at all 
For the second test case, teacher can give 33 candies to each student and keep 1 candy to herselfUpdate:
There may be multiple whitespaces before, after or between the numbers in input.

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
for _ in range(int(input())):
	(n, k) = map(int, input().split())
	if n == 0:
		print(0, 0)
	elif k == 0:
		print(0, n)
	elif n < k:
		print(0, n)
	else:
		print(n // k, n % k)


t = int(input())
for i in range(t):
	(n, k) = map(int, input().split())
	if k == 0:
		print(0, n)
	else:
		print(n // k, n % k)


tests = int(input())
for i in range(tests):
	(total, students) = map(int, input().split())
	if students == 0:
		print(0, total)
	else:
		print(total // students, total % students)


for tc in range(int(input())):
	(N, K) = map(int, input().split())
	if N == 0:
		print(0, end=' ')
		print(0)
		continue
	if K == 0:
		print(0, end=' ')
		print(N)
		continue
	rem = N % K
	q = N // K
	print(q, end=' ')
	print(rem)


for _ in range(int(input())):
	(N, K) = map(int, input().split())
	if K != 0:
		Students_candis = N // K
		Teacher_candis = N - Students_candis * K
		print(Students_candis, Teacher_candis)
	else:
		print(0, N)


your = int(input())
for i in range(your):
	(a, b) = map(int, input().split())
	if b == 0:
		print(f'0 {a}')
	else:
		print(f'{a // b} {a % b}')


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	if k == 0:
		teacher = n
		student = 0
	else:
		teacher = n % k
		student = n // k
	print(student, teacher)


for i in range(int(input())):
	(b, c) = map(int, input().split())
	if c == 0:
		print(0, b)
	else:
		z = b // c
		e = b % c
		print(z, e)


k = int(input())
for _ in range(k):
	(a, s) = map(int, input().split())
	if a == 0:
		print(0, 0)
	elif s == 0:
		print(0, a)
	else:
		print(a // s, a % s)


t = int(input())
A = []
B = []
for i in range(0, t, 1):
	(n, k) = input().split()
	n = int(n)
	k = int(k)
	if k != 0:
		A.append(n // k)
		B.append(n % k)
	else:
		A.append(0)
		B.append(n)
for i in range(0, t, 1):
	print(A[i], B[i])


T = int(input())
for _ in range(T):
	(N, K) = map(int, input().split())
	if K == 0:
		print(0, N)
	else:
		print(N // K, N % K)


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	if k == 0:
		st = 0
		t = n
	else:
		st = n // k
		t = n % k
	print(st, '', t)


T = int(input())
for i in range(T):
	(N, K) = map(int, input().split())
	if K != 0:
		studCandle = N % K
		print(N // K, studCandle)
	if K == 0:
		print(K, N)


for _ in range(int(input())):
	(N, K) = map(int, input().split(' '))
	result = f'{int(N / K)} {N % K}' if K > 0 else f'{int(0)} {N}'
	print(result)


t = int(input())
for i in range(t):
	(n, k) = map(int, input().split())
	if k > 0:
		print(n // k, end=' ')
		print(n % k)
	elif n == 0:
		print(0, 0)
	elif k == 0:
		print(0, n)


T = int(input())
for i in range(T):
	(a, n) = map(int, input().split())
	try:
		print(str(a // n) + ' ' + str(a % n))
	except:
		if a == 0:
			print('0' + ' ' + '0')
		elif n == 0:
			print('0' + ' ' + str(a))


for item in range(int(input())):
	(n, k) = map(int, input().split())
	if k != 0:
		Students_candis = n // k
		Teacher_candis = n - Students_candis * k
		print(Students_candis, Teacher_candis)
	else:
		print(0, n)


T = int(input().strip())
for tc in range(T):
	(N, K) = map(int, input().strip().split())
	if K == 0:
		print(0, N)
	else:
		print(N // K, N % K)


t = int(input())
while t > 0:
	(n, k) = input().split()
	n = int(n)
	k = int(k)
	if k == 0:
		print(0, n)
	else:
		print(int(n / k), n % k)
	t -= 1


for i in range(int(input())):
	(n, k) = list(map(int, input().split()))
	if n == 0:
		print(0, 0)
	elif k == 0:
		print(0, n)
	else:
		print(n // k, n % k)


t = int(input())
for l in range(t):
	(n, k) = map(int, input().split())
	if k == 0:
		print('0' + ' ' + str(n))
	else:
		print(str(n // k) + ' ' + str(n % k))


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if b == 0:
		print('{} {}'.format(0, a))
	else:
		print('{} {}'.format(a // b, a % b))


t = input()
for c in range(0, int(t)):
	(n, k) = input().split()
	if int(k) == 0:
		print(0, int(n))
	else:
		print(int(n) // int(k), int(n) % int(k))


t = int(input())
for _ in range(t):
	l = list(map(int, input().strip().split()))
	a = l[0]
	b = l[1]
	if b != 0:
		print(a // b, end=' ')
		print(a % b)
	else:
		print(0, end=' ')
		print(a)


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	if k == 0:
		print(0, n)
	else:
		x = n // k
		y = n % k
		print(x, y)


for _ in range(int(input())):
	(N, K) = map(int, input().split(' '))
	(A, B) = (int(N / K), N % K) if K > 0 else (0, N)
	print(A, B)


T = int(input())
for i in range(T):
	(N, K) = map(int, input().split())
	if K == 0:
		print(f'0 {N}')
	else:
		print(f'{N // K} {N % K}')


t = int(input())
while t > 0:
	(n, k) = map(int, input().split())
	if k == 0:
		print(0, n)
	else:
		c = n // k
		q = n % k
		print(c, q)
	t = t - 1


for _ in range(int(input())):
	(a, b) = list(map(int, input().split()))
	if a == 0:
		print(0, 0)
	elif b == 0:
		print(0, a)
	else:
		print(a // b, a % b)


t = int(input())
arr = []
for i in range(t):
	(a, b) = map(int, input().split())
	if b == 0:
		print(0, a)
	else:
		print(a // b, a % b)


for i in range(int(input())):
	(p, s) = map(int, input().split())
	if s != 0:
		print(p // s, p % s)
	else:
		print(0, p)


for case in range(int(input())):
	(candy, students) = map(int, input().split())
	if students == 0:
		candy_per_student = 0
		teacher_share = candy
	else:
		candy_per_student = candy // students
		teacher_share = candy - students * candy_per_student
	print(candy_per_student, '', teacher_share)


t = int(input())
while t:
	(a, b) = map(int, input().split())
	if a == 0 and b == 0:
		print(0, 0)
	elif a == 0 and b != 0:
		print(0, 0)
	elif a != 0 and b == 0:
		print(0, a)
	else:
		ans = a // b
		print(ans, a % b)
	t -= 1


try:
	t = int(input())
	for _ in range(t):
		(n, k) = map(int, input().split())
		if k == 0:
			print(0, n)
		else:
			print(n // k, n % k)
except:
	pass


t = int(input())
for i in range(t):
	(candies, student) = map(int, input().split())
	if student == 0:
		print(0, candies)
	else:
		each_student = candies // student
		teachers = candies % student
		print(each_student, teachers)


for x in range(int(input())):
	(n, k) = input().strip(' ').split()
	n = int(n)
	k = int(k)
	if k == 0:
		print(0, n)
	else:
		n = int(n)
		k = int(k)
		print(n // k, n % k)


t = int(input())
for tc in range(t):
	(a, b) = map(int, input().split())
	if b == 0:
		print(str(b) + ' ' + str(a))
	else:
		c = a // b
		d = a - c * b
		print(str(c) + ' ' + str(d))


t = int(input())
for num in range(t):
	(a_s, b_s) = input().split()
	a = int(a_s)
	b = int(b_s)
	if b == 0:
		N = 0
		n = a
	else:
		N = int(a / b)
		n = a % b
	print(N, n, sep=' ')


testcases = int(input())
for i in range(testcases):
	(N, K) = map(int, input().split())
	if K == 0:
		print(0, N)
	elif N == 0:
		print(0, 0)
	else:
		student = int(N / K)
		teacher = int(N % K)
		print(student, teacher)


t = int(input())
for test in range(t):
	(n, k) = map(int, input().split())
	if k != 0:
		l = n // k
		l1 = n % k
		print(l, l1)
	else:
		print(0, n)


for i in range(int(input())):
	(a, b) = list(map(int, input().split()))
	if b == 0:
		print(0, a)
	else:
		print(a // b, a % b)


for tc in range(int(input())):
	(a, b) = map(int, input().split())
	if b == 0:
		print(0, a)
	else:
		print(a // b, a - a // b * b)


t = int(input())
for i in range(t):
	(n, k) = list(map(int, input().split()))
	if n == 0:
		teacher = 0
		candies = 0
	elif k == 0:
		candies = 0
		teacher = n
	else:
		teacher = n % k
		candies = n // k
	print(candies, teacher)


t = int(input())
for _ in range(t):
	(n, k) = map(int, input().split())
	if n == 0:
		print(0, 0)
	elif k == 0:
		print(0, n)
	else:
		a = n // k
		b = n % k
		print(a, b)


T = int(input())
for _ in range(T):
	(n, k) = list(map(int, input().split()))
	if k != 0:
		print(n // k, n % k)
	else:
		print(k, n)


T = int(input())
for i in range(T):
	(N, K) = list(map(int, input().strip().split()))
	if K != 0:
		x = N % K
		print(int(N // K), int(x))
	if K == 0:
		print(K, N)


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	if k == 0:
		print(0, n)
		continue
	r = n % k
	stu = (n - r) // k
	print(stu, r)