Chef has a square-shaped chart paper with the side length equal to N. He wants to cut out K \times K squares from this chart paper. 

Find the maximum number of K \times K squares he can cut from the entire chart paper.

Note that, some part of the chart paper might not be a included in any K \times K cutout square.

------ Input Format ------ 

- The first line contains a single integer T — the number of test cases. Then the test cases follow.
- The first and only line of each test case contains two space-separated integers N and K — the side length of the entire chart paper and the side length of the cutout squares.

------ Output Format ------ 

For each test case, output on a new line the maximum number of K \times K squares Chef can cut from the entire chart paper.

------ Constraints ------ 

$1 ≤ T ≤ 1000$
$1 ≤ K ≤N ≤ 1000$

----- Sample Input 1 ------ 
3
5 1
2 2
5 2

----- Sample Output 1 ------ 
25
1
4

----- explanation 1 ------ 
Test case 1: Chef can cut out $25$ squares of size $1 \times 1$ from the entire $5 \times 5$ chart paper.

Test case 2: Chef can cut out $1$ square of size $2 \times 2$ from the entire $2 \times 2$ chart paper.

Test case 3: Chef can cut out $4$ squares of size $2 \times 2$ from the entire $5 \times 5$ chart paper.

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
for i in range(int(input())):
	(x, y) = map(int, input().split())
	s = x // y
	print(s * s)


import math
t = int(input())
for i in range(t):
	(n, k) = map(int, input().split())
	print(math.floor(n / k) * math.floor(n / k))


for i in range(int(input())):
	(N, K) = map(int, input().split())
	if K > N:
		print(0)
	elif K == N:
		print(1)
	else:
		print((N // K) ** 2)


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	t = a // b
	ans = t * t
	print(ans)


import math
t = int(input())
a = 0
for _ in range(t):
	(n, k) = map(int, input().split())
	res = int(n / k) * int(n / k)
	print(res)


for i in range(int(input())):
	(a, b) = map(int, input().split())
	print(a // b * (a // b))


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	c = a // b
	print(c * c)


for i in range(int(input())):
	(n, k) = map(int, input().split())
	t = n // k
	print(t * t)


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	a = n // k
	print(a * a)


for i in range(int(input())):
	(n, k) = map(int, input().split())
	s = n // k
	print(s * s)


t = int(input())
for _ in range(t):
	(n, k) = map(int, input().split())
	max_squares = (n // k) ** 2
	print(max_squares)


import math
for i in range(int(input())):
	(N, K) = map(int, input().split(' '))
	print(math.floor(N / K) ** 2)


for i in range(int(input(''))):
	(x, y) = map(int, input('').split(' '))
	temp = x // y
	print(temp * temp)


t = int(input())
for i in range(t):
	(n, k) = map(int, input().split())
	if k == 1:
		print(n ** 2)
	elif n == k:
		print('1')
	else:
		print(n // k * (n // k))


t = int(input())
i = 1
while i <= t:
	(n, k) = map(int, input().split())
	print((n // k) ** 2)
	i += 1


for i in range(int(input())):
	(n, k) = map(int, input().split())
	a = n // k
	print(a * a)


n = int(input())
for _ in range(n):
	(N, K) = list(map(int, input().split()))
	print((N // K) ** 2)


for i in range(int(input())):
	(n, k) = map(int, input().split())
	x = n // k
	print(x * x)


for t in range(int(input())):
	(n, k) = map(int, input().split())
	a = n // k
	print(a * a)


t = int(input())
for i in range(t):
	(N, K) = map(int, input().split())
	x = int(N / K)
	print(int(x * x))


for i in range(int(input())):
	(a, b) = map(int, input().split())
	k = a // b
	print(k ** 2)


for i in range(int(input())):
	(n, k) = map(int, input().split())
	print((n // k) ** 2)


for i in range(int(input())):
	(A, B) = map(int, input().split())
	t = A // B
	ans = t * t
	print(ans)


t = int(input())
while t:
	(n, k) = map(int, input().split())
	print(int(n / k) * int(n / k))
	t = t - 1


T = int(input())
for i in range(T):
	(N, M) = map(int, input().split())
	u = N // M
	print(u * u)


T = int(input())
i = 0
while i < T:
	(N, K) = map(int, input().split())
	sq = N // K
	print(sq * sq)
	i += 1


t = int(input())
for i in range(t):
	(N, K) = map(int, input().split())
	z = N // K
	ans = z * z
	print(ans)


import math
T = int(input())
for i in range(T):
	(N, K) = map(int, input().split())
	p = N // K
	m = p * p
	print(m)


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	print(pow(n // k, 2))


for i in range(int(input())):
	(n, k) = map(int, input().split())
	p = n // k
	print(p * p)


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	a = x // y
	b = a * a
	print(b)


t = int(input())
for i in range(t):
	(N, K) = list(map(int, input().split()))
	S = N // K
	print(S * S)


t = int(input())
for i in range(t):
	(n, k) = [int(i) for i in input().split()]
	out = n // k
	print(out * out)


for t in range(int(input())):
	(n, k) = map(int, input().split())
	c = n // k
	print(c * c)


t = int(input())
for _ in range(t):
	(n, k) = list(map(int, input().split()))
	s = n // k
	print(s * s)


T = int(input())
for i in range(T):
	(N, K) = map(int, input().split())
	output = N // K
	if N == K:
		print(1)
	else:
		print(output * output)


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


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	result = a // b
	print(result * result)


T = int(input())
for _ in range(T):
	(N, K) = map(int, input().split())
	result_floordiv = N // K
	print(result_floordiv * result_floordiv)


def pc(n, k):
	t = n // k
	res = t * t
	print(res)
t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	g = pc(a, b)


t = int(input())
while t > 0:
	t = t - 1
	(a, b) = map(int, input().split())
	print((a // b) ** 2)


T = int(input())
for tc in range(T):
	(N, K) = map(int, input().split(' '))
	print((N // K) ** 2)


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	z = x // y
	print(z ** 2)


t = int(input())
for j in range(t):
	(x, y) = map(int, input().split())
	a = x // y
	print(a * a)


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	l = n // k
	print(l * l)