#include #include using namespace std; int main() { string S0, S1; double s0, s1; cin >> S0 >> S1; s0 = stod(S0.substr(0, S0.rfind('.'))); s1 = stod(S1.substr(0, S1.rfind('.'))); if(s1 > s0) { cout << "NO" << endl; return 0; } else if(s1 < s0) { cout << "YES" << endl; } else { s0 = stod(S0.substr(S0.find('.') + 1, S0.length() - S0.find('.') + 1)); s1 = stod(S1.substr(S1.find('.') + 1, S1.length() - S1.find('.') + 1)); if(s1 > s0) { cout << "NO" << endl; return 0; } else { cout << "YES" << endl; return 0; } } }