#include using namespace std; using ll = long long; using ull = unsigned long long; #define rep(i,m,n) for(int i=m; i bool chmin(T& a, T b){ if(a > b){a = b; return true;} return false; } template bool chmax(T& a, T b){ if(a < b){a = b; return true;} return false; } template T gcd(T a, T b){ return a % b ? gcd(b, a % b) : b; } template T lcm(T a, T b){ return a / gcd(a, b) * b; } bool is_kado(vector v){ if(v[0] > v[1] && v[1] < v[2]) return true; else if(v[0] < v[1] && v[1] > v[2]) return true; else return false; } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); vector a(3), b(3); rep(i, 0, 3) cin >> a[i]; rep(i, 0, 3) cin >> b[i]; rep(i, 0, 3) rep(j, 0, 3){ auto a2 = a, b2 = b; swap(a2[i], b2[j]); if(is_kado(a2) && is_kado(b2)){ cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }