fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main ()
  4. {
  5. int x, x2, y, y2;
  6. cin>>x>>y>>x2>>y2;
  7. if (x>0 && x2>0 && y>0 && y2>0 || x>0 && x2>0 && y<0 && y2<0 || x<0 && x2<0 && y>0 && y2>0 || x<0 && x2<0 && y<0 && y2<0)
  8. cout<<"YES";
  9. else
  10. cout<<"NO";
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 3100KB
stdin
3 4
stdout
NO