fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4.  
  5. int main() {
  6. int n, m;
  7. while (cin >> n >> m) cout << (__gcd (n, m) == 1? "YES" : "NO") << endl;
  8. return 0;
  9. }
  10.  
Success #stdin #stdout 0s 4276KB
stdin
5 25
stdout
NO