题解 | 小红走网格
小红走网格
https://www.nowcoder.com/practice/43498993d39246c58e35ca715faea7ab
n = int(input())
def f(a, b):
while b:
a, b = b, a % b
return a
for i in range(n):
x, y, w, s, a, d = map(int,input().split())
xyin = f(a,d)
yyin = f(w,s)
if x % xyin == 0 and y % yyin == 0:
print('YES')
else:
print('NO')
SHEIN希音公司福利 370人发布