#include using namespace std; int main() { string S0, S1; cin >> S0 >> S1; int a0, b0, c0, a1, b1, c1; sscanf( S0.c_str(), "%d.%d.%d", &a0, &b0, &c0 ); sscanf( S1.c_str(), "%d.%d.%d", &a1, &b1, &c1 ); string ans = "NO"; if( a0 * (100 * 100 + 1) + b0 * (100 + 1) + c0 >= a1 * (100 * 100 + 1) + b1 * (100 + 1) + c1 ) ans = "YES"; cout << ans << endl; }