#include <iostream>
using namespace std;
void paibig(int &a,int &b,int &c){
int temp;
if(a<b){
temp=a;
a=b;
b=temp;
}
if(a<c){
temp=a;
a=c;
c=temp;
}
if(b<c){
temp=b;
b=c;
c=temp;
}
}
void paismall(int &a,int &b,int &c){
int temp;
if(a>b){
temp=a;
a=b;
b=temp;
}
if(a>c){
temp=a;
a=c;
c=temp;
}
if(b>c){
temp=b;
b=c;
c=temp;
}
}
int main() {
int a,b,c;
int d,e,f;
cin>>a>>b>>c;
cin>>d>>e>>f;
paibig(a,b,c);
paismall(d, e, f);
int i=0;
if(a<d)i++;
if(b<f)i++;
if(c<e)i++;
if(i>=2)cout<<"Yes";
else cout<<"No";
}
// 64 位输出请用 printf("%lld")