#include using namespace std; using LL=long long; using ULL=unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) bool iskadomatsu(int a,int b,int c){ if(a==b||b==c||a==c) return false; if(ab&&b>c) return false; return true; } int main(){ int a[3],b[3]; rep(i,3) cin>>a[i]; rep(i,3) cin>>b[i]; bool ok=false; rep(i,3) rep(j,3){ swap(a[i],b[i]); if(iskadomatsu(a[0],a[1],a[2]) && iskadomatsu(b[0],b[1],b[2])) ok=true; swap(a[i],b[i]); } cout<<(ok?"Yes":"No")<