#include using namespace std; int main() { int a, b, c, d, e, f; scanf("%d.%d.%d", &a, &b, &c); scanf("%d.%d.%d", &d, &e, &f); if (a * 10201 + b * 101 + c >= d * 10201 + e * 101 + f) { cout << "YES" << endl; } else { cout << "NO" << endl; } }