#include #include #include using namespace std; #define fi first #define se second int main() { pair > t1, t2; scanf("%d.%d.%d\%d.%d.%dn", &t1.fi, &t1.se.fi, &t1.se.se, &t2.fi, &t2.se.fi, &t2.se.se); cout << (t2 <= t1 ? "YES" : "NO") << endl; return 0; }