#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 ) ) { S = S + '.'; size_t pos = 0; string tmp; for( size_t i = pos; i < S.size(); i++ ) { pos = S.find_first_of( '.' , i ); tmp += S.substr( i, pos - i ); i += ( pos - i ); } str.push_back( tmp ); } cout << ( str[ 0 ] < str[ 1 ] ? "NO" : "YES" ) << endl; return 0; }