#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define FOR(x,y) for(int x = 0;x < (y);x++) #define LLI long long int #define FORR(x,arr) for(auto& x:arr) #define ALL(a) (a.begin()),(a.end()) #define _L(x) cout<<(x)< R; }; vector ToNumeric(string text) { vector v(3); int j = 0; for(int i = 0;i < text.length();i++) { if(text[i] == '.') { j++; } else { v[j] *= 10; v[j] += text[i]-'0'; } } return v; } int main() { string source, target; cin >> source; cin >> target; auto sourceN = ToNumeric(source); auto targetN =ToNumeric(target); for(int i = 0;i < 3;i++) { if(sourceN[i] > targetN[i]) { cout << "YES" << endl; return 0; } if(sourceN[i] < targetN[i]) { cout << "NO" << endl; return 0; } } cout << "YES" << endl; return 0; return 0; }