fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int t;
  6. cin >> t;
  7. while(t--){
  8. int n, x;
  9. cin >> n >> x;
  10. if(n / x != 0){
  11. cout << "Yes\n";
  12. }
  13. else if(n % x == 0){
  14. cout << "Yes\n";
  15. }
  16. else if(x % n != 0){
  17. cout << "Yes\n";
  18. }
  19. else {
  20. cout << "No\n";
  21. }
  22. }
  23. return 0;
  24. }
Success #stdin #stdout 0.01s 5284KB
stdin
3
3 3
4 2
2 4
stdout
Yes
Yes
No