#include using namespace std; const int INF = 1 << 30; int main() { int A0, B0, C0, A1, B1, C1; scanf("%d.%d.%d", &A0, &B0, &C0); scanf("%d.%d.%d", &A1, &B1, &C1); if(make_tuple(A0, B0, C0) >= make_tuple(A1, B1, C1)) { cout << "YES" << endl; } else { cout << "NO" << endl; } }