#include using namespace std; int main() { int old=0; for(int i = 0; i < 5; i++){ char c; cin >> c; if(i == 0){ old += (c-'0')*100; } else if(i == 2){ old += (c-'0')*10; } else if(i == 4){ old += (c-'0'); } } int now=0; for(int i = 0; i < 5; i++){ char c; cin >> c; if(i == 0){ now += (c-'0')*100; } else if(i == 2){ now += (c-'0')*10; } else if(i == 4){ now += (c-'0'); } } if(now <= old){ cout << "YES" << endl; }else{ cout << "NO" << endl; } return 0; }