#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { tuple a, b; scanf("%d.%d.%d", &get<0>(a), &get<1>(a), &get<2>(a)); scanf("%d.%d.%d", &get<0>(b), &get<1>(b), &get<2>(b)); if (b <= a) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }