#include using namespace std; int main() { int a, b, c; int x, y; scanf("%d.%d.%d", &a, &b, &c); x = a * 1000000 + b * 1000 + c; scanf("%d.%d.%d", &a, &b, &c); y = a * 1000000 + b * 1000 + c; if (x >= y) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }