#include using namespace std; using ll = long long; int main() { string s, t; cin >> s >> t; cout << (s > t ? "YES" : "NO") << endl; }