#include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); vector a(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 (a[0] < a[1] && a[1] > a[2])if (b[0] < b[1] && b[1] > b[2]) { cout << "Yes\n"; return 0; } if (a[0] < a[1] && a[1] > a[2])if (b[0] > b[1] && b[1] < b[2]) { cout << "Yes\n"; return 0; } if (a[0] > a[1] && a[1] < a[2])if (b[0] > b[1] && b[1] < b[2]) { cout << "Yes\n"; return 0; } if (a[0] > a[1] && a[1] < a[2])if (b[0] < b[1] && b[1] > b[2]) { cout << "Yes\n"; return 0; } swap(a[i], b[j]); } } cout << "No\n"; }