#include using namespace std; #define rep(i, a, n) for (int i = a; i < n; i++) //iをaからn #define per(i, n, a) for (int i = a - 1; i >= n; i--) //iをnからa #define db(x) cout << #x << " = " << x << endl #define db2(x, y) cout << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")\n"; //デバッグ用 #define all(x) (x).begin(), (x).end() //sort(all(a)); ソート //sort(all(a),greater()); 逆順ソート bool isKado(int a,int b,int c){ if(ac){ return true; }else if(a>b&&b a(3),b(3); vector aa(3),bb(3); int aaa; rep(i,0,3){ cin>>aaa; a.at(i)=aaa; } rep(i,0,3){ cin>>aaa; b.at(i)=aaa; } rep(i,0,3){ rep(j,0,3){ aa.at(0)=a.at(0); aa.at(1)=a.at(1); aa.at(2)=a.at(2); bb.at(0)=b.at(0); bb.at(1)=b.at(1); bb.at(2)=b.at(2); aa.at(i)=b.at(j); bb.at(j)=a.at(i); if(isKado(aa.at(0),aa.at(1),aa.at(2))&&isKado(bb.at(0),bb.at(1),bb.at(2))){ cout<<"Yes"; return 0; } } } cout<<"No"; return 0; }