#include using namespace std; #define int long long signed main(){ string S,T; cin>>S>>T; int a = (S[0]-'0')*100+(S[2]-'0')*10+(S[4]-'0'); int b = (T[0]-'0')*100+(T[2]-'0')*10+(T[4]-'0'); if(b <= a) cout<<"YES"<