#include // #include using namespace std; // using namespace atcoder; using ll = long long; using ull = unsigned long long; using P = pair; #define rep(i,n) for(ll i = 0;i < (ll)n;i++) #define ALL(x) (x).begin(),(x).end() #define MOD 1000000007 int main(){ int a[3],b[3]; rep(i,3)cin >> a[i]; rep(i,3)cin >> b[i]; bool is = false; rep(i,3)rep(j,3){ swap(a[i],b[j]); if(a[0] == a[0+1] || a[0+1] == a[0+2] || a[0] == a[0+2]){ swap(a[i],b[j]); continue; } if(b[0] == b[0+1] || b[0+1] == b[0+2] || b[0] == b[0+2]){ swap(a[i],b[j]); continue; } if((*min_element(a,a+3) == a[1] || *max_element(a,a+3) == a[1]) && (*min_element(b,b+3) == b[1] || *max_element(b,b+3) == b[1]))is = true; swap(a[i],b[j]); } cout << (is ? "Yes\n" : "No\n"); return 0; }