/** * author: shu8Cream * created: 29.01.2021 20:56:09 **/ #include using namespace std; #define rep(i,n) for (int i=0; i<(n); i++) #define all(x) (x).begin(), (x).end() using ll = long long; using P = pair; using vi = vector; using vvi = vector; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); vi a(3), b(3); rep(i,3) cin >> a[i]; rep(i,3) cin >> b[i]; vi aa(3), bb(3); aa=a; bb=b; rep(i,3)rep(j,3){ a==aa; b=bb; swap(a[i],b[j]); if(a[0]==a[1] || a[1]==a[2] || a[2]==a[0]) continue; if(b[0]==b[1] || b[1]==b[2] || b[2]==b[0]) continue; int amx=max({a[0],a[1],a[2]}); int amn=min({a[0],a[1],a[2]}); int bmx=max({b[0],b[1],b[2]}); int bmn=min({b[0],b[1],b[2]}); if(a[1]==amx || a[1]==amn){ if(b[1]==bmx || b[1]==bmn){ cout << "Yes" << endl; return 0; } } } cout << "No" << endl; }