#include using namespace std; int main() { vector A( 3 ); vector B( 3 ); for( int i = 0; i < 3; i++ ) cin >> A[i]; for( int i = 0; i < 3; i++ ) cin >> B[i]; string ans = "No"; for( int i = 0; i < 3; i++ ) { for( int j = 0; j < 3; j++ ) { vector a = A; vector b = B; swap( a[i], b[j] ); if( ( a[0] < a[1] && a[2] < a[1] || a[0] > a[1] && a[2] > a[1] ) && ( b[0] < b[1] && b[2] < b[1] || b[0] > b[1] && b[2] > b[1] ) ) { ans = "Yes"; break; } } } cout << ans << endl; }