#include "bits/stdc++.h" using namespace std; using ll = long long; using P = pair; const ll INF = (1LL << 61); ll mod = 998244353; bool f(vectora) { if (a[0] == a[1] || a[1] == a[2] || a[0] == a[2])return false; if ((a[1] > a[0] && a[1] > a[2]) || (a[1] < a[0] && a[1] < a[2]))return true; else return false; } signed main() { ios::sync_with_stdio(false); cin.tie(0); vectora(3), b(3); for (int i = 0; i < 3; i++) { cin >> a[i]; } for (int i = 0; i < 3; i++) { cin >> b[i]; } for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { swap(a[i], b[j]); if (f(a) && f(b)) { cout << "Yes" << endl; return 0; } swap(a[i], b[j]); } } cout << "No" << endl; return 0; }