#include #include using namespace std; long long A, B, C, D; unsigned long long VA, VB, VC, VD; int sgn(long long x) { if (x > 0LL) return 1; if (x == 0LL) return 0; return -1; } int getSign(long long a, long long b) { // a/b の正負を判定する if (a == 0) return 0; if (sgn(a) == sgn(b)) return 1; return -1; } int main() { cin >> A >> B >> C >> D; VA = abs(A); VB = abs(B); VC = abs(C); VD = abs(D); bool Answer = false; if (sgn(B) == sgn(D)) { int sgnLeft = getSign(A, B); int sgnRight = getSign(C, D); if (sgnLeft < sgnRight) Answer = true; else if (sgnLeft > sgnRight) Answer = false; else if (A != 0LL && sgn(A) == sgn(C) && VA * VD < VB * VC) Answer = true; else if (A != 0LL && sgn(A) != sgn(C) && VA * VD > VB * VC) Answer = true; } if (sgn(B) != sgn(D)) { int sgnLeft = getSign(A, B); int sgnRight = getSign(C, D); if (sgnLeft < sgnRight) Answer = true; else if (sgnLeft > sgnRight) Answer = false; else if (A != 0LL && sgn(A) == sgn(C) && VA * VD > VB * VC) Answer = true; else if (A != 0LL && sgn(A) != sgn(C) && VA * VD < VB * VC) Answer = true; } if (Answer == true) cout << "Yes" << endl; else cout << "No" << endl; return 0; }