#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int asInt(string s) { int result = 0; result += s[4] - '0'; result += (s[2] - '0') * 10; result += (s[0] - '0') * 100; return result; } int main() { string s1, s2; cin >> s1 >> s2; if (asInt(s1) >= asInt(s2)) { cout << "YES" << endl; } else { cout << "NO" << endl; }; return 0; }