小红走网格 - 代码


#include <iostream>
#include <algorithm>

using namespace std;

int main() {
	int T; cin >> T;
	while(T--) {
		int x, y, a, b, c, d; cin >> x >> y >> a >> b >> c >> d;
		if(y % __gcd(a, b) == 0 && x % __gcd(c, d) == 0) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	
	return 0;
}

全部评论

相关推荐

ohs的小木屋:比不少实习待遇高了
点赞 评论 收藏
分享
自由水:笑死了,敢这么面试不敢让别人说
点赞 评论 收藏
分享
评论
1
1
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务