fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b;
  6. cin >> a >> b;
  7.  
  8.  
  9. if ((a > 0 && b > 0) || (a < 0 && b < 0)) {
  10. cout << "YES" << endl;
  11. } else {
  12. cout << "NO" << endl;
  13. }
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5320KB
stdin
1 2
-1 2
stdout
YES