#include #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; typedef long long ll; ll a, b, n, MOD = 1e9 + 7; map mp; ll mod_pow(ll x, ll n, ll mod) { ll res = 1; while (n > 0) { if (n & 1) res = res * x % mod; x = x * x % mod; n >>= 1; } return res; } ll solve(ll n) { if (mp.find(n) != mp.end()) return mp[n]; if (n == 0) { mp[0] = 2; return mp[0]; } if (n == 1) { mp[1] = (2 * a) % MOD; return mp[1]; } if (n % 2) { mp[n] = (solve(n / 2 + 1) * solve(n / 2) - ((mod_pow((a * a - b + MOD) % MOD, n / 2, MOD) * 2 * a) % MOD) + MOD) % MOD; } else { mp[n] = (solve(n / 2) * solve(n / 2) - ((mod_pow((a * a - b + MOD) % MOD, n / 2, MOD) * 2) % MOD) + MOD) % MOD; } return mp[n]; } int main() { int a[3], b[3]; rep(i, 3) cin >> a[i]; rep(i, 3) cin >> b[i]; rep(i, 3) { rep(j, 3) { swap(a[i], b[j]); int c = (a[0] - a[1]) * (a[1] - a[2]); int d = (b[0] - b[1]) * (b[1] - b[2]); if (c < 0 && d < 0) { cout << "Yes\n"; return 0; } swap(a[i], b[j]); } } cout << "No\n"; }