#include using namespace std; #define REP(i,n) for(int i=0; i<(n); i++) int main() { string S; vector str; while( getline( cin, S ) ) { size_t pos = 0; string tmp; for( size_t i = pos; i < S.size(); i++ ) { pos = S.find_first_of( '.' , pos ); tmp = S.substr( i, i + pos ); str.push_back( stoi(tmp) ); i += pos; } } REP( i, 6 ){ cout << str[i] << " " << i << endl; } if( str[0] < str[3] ) { cout << "NO" << endl; return 0; } else if( str[0] == str[3] ) { if( str[1] < str[4] ) { cout << "NO" << endl; return 0; } else if( str[1] == str[4] ) { if( str[2] < str[5] ) { cout << "NO" << endl; return 0; } } } cout << "YES" << endl; return 0; }