Kepler’s Law states that the planets move around the sun in elliptical orbits with the sun at one focus. Kepler's 3rd law is The Law of Periods, according to which:

The square of the time period of the planet is directly proportional to the cube of the semimajor axis of its orbit.

You are given the Time periods (T_{1}, T_{2}) and Semimajor Axes (R_{1}, R_{2}) of two planets orbiting the same star.

Please determine if the Law of Periods is satisfied or not, i.e, if the [constant of proportionality] of both planets is the same.

Print "Yes" (without quotes) if the law is satisfied, else print "No".

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

- The first line of input contains a single integer T, denoting the number of test cases. The description of T test cases follows.
- Each test case consists a single line of input, containing four space-separated integers T_{1}, T_{2}, R_{1}, R_{2}.

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

For each test case, output a single line containing one string — "Yes" or "No" (without quotes); the answer to the problem.

You may print each character of the answer in uppercase or lowercase (for example, the strings "yEs", "yes", "Yes" and "YES" will all be treated as identical).

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

$1 ≤ T ≤ 10^{4}$
$1 ≤ T_{1},T_{2} ≤ 10$
$1 ≤ R_{1},R_{2} ≤ 10$

------ subtasks ------ 

Subtask 1(100 points): Original constraints

----- Sample Input 1 ------ 
3
1 1 1 1
1 2 3 4
1 8 2 8
----- Sample Output 1 ------ 
Yes
No
Yes
----- explanation 1 ------ 
- Test Case $1$: $1^{2}/1^{3} = 1^{2}/1^{3}$
- Test Case $2$: $1^{2}/3^{3} \neq 2^{2}/4^{3}$
- Test Case $3$: $1^{2}/2^{3} =  8^{2}/8^{3}$

Difficulty: EASY

Starter code:

Solutions:
T = int(input())
for _ in range(T):
	(time_1, time_2, R_1, R_2) = map(int, input().split())
	planet_1k = time_1 ** 2 / R_1 ** 3
	planet_2k = time_2 ** 2 / R_2 ** 3
	if planet_1k == planet_2k:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	(t1, t2, r1, r2) = map(int, input().split())
	if pow(t1, 2) / pow(r1, 3) == pow(t2, 2) / pow(r2, 3):
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(T1, T2, R1, R2) = map(int, input().split())
	first = T1 * T1 / (R1 * R1 * R1)
	second = T2 * T2 / (R2 * R2 * R2)
	if first == second:
		print('Yes')
	else:
		print('No')


T = int(input())
for i in range(T):
	lst = str(input()).split(' ')
	if int(lst[0]) ** 2 / int(lst[2]) ** 3 == int(lst[1]) ** 2 / int(lst[3]) ** 3:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(t1, t2, r1, r2) = map(int, input().split())
	a = t1 ** 2 / r1 ** 3
	b = t2 ** 2 / r2 ** 3
	if a == b:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(T1, T2, R1, R2) = map(int, input().split(' '))
	if T1 ** 2 / R1 ** 3 == T2 ** 2 / R2 ** 3:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(t1, t2, r1, r2) = map(float, input().split())
	e = t1 ** 2 / r1 ** 3
	f = t2 ** 2 / r2 ** 3
	if e == f:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	if a * a / (c * c * c) == b * b / (d * d * d):
		print('Yes')
	else:
		print('No')


t = int(input(''))
if 1 <= t <= 10 ** 4:
	for i in range(t):
		(T1, T2, R1, R2) = map(int, input().split())
		if 1 <= T1 <= 10 or 1 <= T2 <= 10 or 1 <= R1 <= 10 or (1 <= R2 <= 10):
			if (T1 / T2) ** 2 == (R1 / R2) ** 3:
				print('Yes')
			else:
				print('No')


T = input()
for i in range(int(T)):
	(T1, T2, R1, R2) = input().split(' ')
	T1 = int(T1)
	T2 = int(T2)
	R1 = int(R1)
	R2 = int(R2)
	if T1 * T1 / (R1 * R1 * R1) == T2 * T2 / (R2 * R2 * R2):
		print('Yes')
	else:
		print('No')


tc = int(input())
for _ in range(tc):
	s = input().split()
	a = pow(int(s[0]), 2) / pow(int(s[2]), 3)
	b = pow(int(s[1]), 2) / pow(int(s[3]), 3)
	if a == b:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(t1, t2, r1, r2) = map(int, input().split())
	a1 = t1 ** 2 / r1 ** 3
	a2 = t2 ** 2 / r2 ** 3
	if a1 == a2:
		print('Yes')
	else:
		print('No')


t = int(input())
while t > 0:
	(t1, t2, r1, r2) = input().split()
	if int(t1) ** 2 / int(t2) ** 2 == int(r1) ** 3 / int(r2) ** 3:
		print('Yes')
	else:
		print('No')
	t = t - 1


for i in range(int(input())):
	(a, b, c, d) = input().split()
	(a, b, c, d) = (int(a), int(b), int(c), int(d))
	if a ** 2 / c ** 3 == b ** 2 / d ** 3:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(t1, t2, r1, r2) = map(int, input().split())
	if t1 * t1 / (r1 * r1 * r1) == t2 * t2 / (r2 * r2 * r2):
		print('Yes')
	else:
		print('No')


t = int(input())
while t:
	(t1, t2, r1, r2) = input().split()
	t1 = int(t1)
	t2 = int(t2)
	r1 = int(r1)
	r2 = int(r2)
	res1 = t1 * t1 / (r1 * r1 * r1)
	res2 = t2 * t2 / (r2 * r2 * r2)
	if res1 == res2:
		print('Yes')
	else:
		print('No')
	t -= 1


import math
t = int(input())
i = 1
while i <= t:
	(t1, t2, r1, r2) = map(int, input().split())
	i = i + 1
	a = math.pow(t1, 2)
	b = math.pow(r1, 3)
	c = math.pow(t2, 2)
	d = math.pow(r2, 3)
	x = a / b
	y = c / d
	if x == y:
		print('Yes')
	else:
		print('No')


t = int(input())
for i in range(t):
	(t1, t2, r1, r2) = [int(i) for i in input().split()]
	p1 = t1 ** 2 / r1 ** 3
	p2 = t2 ** 2 / r2 ** 3
	if p1 == p2:
		print('Yes')
	else:
		print('No')


for _ in range(int(input())):
	inp = [int(i) for i in input().split(' ')]
	if pow(inp[0], 2) / pow(inp[2], 3) != pow(inp[1], 2) / pow(inp[3], 3):
		print('No')
	else:
		print('Yes')


for _ in range(int(input())):
	(a, b, c, d) = map(int, input().split())
	print('Yes') if pow(a, 2) / pow(c, 3) == pow(b, 2) / pow(d, 3) else print('No')


for i in range(int(input())):
	(t1, t2, r1, r2) = map(int, input().split())
	c1 = t1 ** 2 / r1 ** 3
	c2 = t2 ** 2 / r2 ** 3
	if c1 == c2:
		print('Yes')
	else:
		print('No')


t = int(input())
for _ in range(t):
	(x1, y1, x2, y2) = map(int, input().split())
	if x1 ** 2 / x2 ** 3 == y1 ** 2 / y2 ** 3:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(a, b, c, d) = list(map(int, input().split()))
	e = a ** 2 / c ** 3
	f = b ** 2 / d ** 3
	if e == f:
		print('Yes')
	else:
		print('No')


n = int(input(''))
l = []
for i in range(n):
	a = str(input(''))
	m = a.split(' ')
	l += [m]
for i in l:
	a = int(i[0])
	b = int(i[1])
	c = int(i[2])
	d = int(i[3])
	if a ** 2 / c ** 3 == b ** 2 / d ** 3:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(w, x, y, z) = map(int, input().split())
	a = w ** 2 / y ** 3
	b = x ** 2 / z ** 3
	if a == b:
		print('Yes')
	else:
		print('No')


for i in range(int(input())):
	(m, n, a, b) = map(int, input().split())
	if m ** 2 / a ** 3 == n ** 2 / b ** 3:
		print('Yes')
	else:
		print('No')