#include #include using namespace std; int main() { string S0, S1; cin >> S0 >> S1; S0.erase(S0.begin() + S0.find('.')); S0.erase(S0.begin() + S0.find('.')); S1.erase(S1.begin() + S1.find('.')); S1.erase(S1.begin() + S1.find('.')); cout << ((stoi(S1) <= stoi(S0)) ? "YES" : "NO") << endl; return 0; }