//Normal #define _GLIBCXX_DEBUG #define ll long long #include using namespace std; using Graph = vector>; void print(auto a){ cout << a; } void prints(auto a){ cout << a << " "; } void prints(){ cout << " "; } void printl(auto a){ cout << a << endl; } void printl(){ cout << endl; } void fix(int n){ cout << fixed << setprecision(n); } int main(){ 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]; bool flag = false; for(int i = 0; i < 3; i++){ for(int j = 0; j < 3; j++){ swap(A[i], B[j]); if(A[0] != A[1] and A[0] != A[2] and A[1] != A[2] and B[0] != B[1] and B[0] != B[2] and B[1] != B[2]){ if(max({A[0], A[1], A[2]}) == A[1] and max({B[0], B[1], B[2]}) == B[1]){ flag = true; } } swap(A[i], B[j]); } } flag ? printl("Yes") : printl("No"); return 0; }