#include #define show(x) cerr << #x << " = " << x << endl using namespace std; using ll = long long; template ostream& operator<<(ostream& os, const vector& v) { os << "sz:" << v.size() << "\n["; for (const auto& p : v) { os << p << ","; } os << "]\n"; return os; } template ostream& operator<<(ostream& os, const pair& p) { os << "(" << p.first << "," << p.second << ")"; return os; } constexpr ll MOD = (ll)1e9 + 7LL; template constexpr T INF = numeric_limits::max() / 64; constexpr int MAX = 101; int parse(const string& s) { vector num(3); int pos = 2; for (const char c : s) { if (c == '.') { pos--; } else { num[pos].push_back(c); } } int sum = 0; for (int i = 2; i >= 0; i--) { sum += stoi(num[i]) * pow(MAX, i); } return sum; } int main() { cin.tie(0); ios::sync_with_stdio(false); string s1, s2; cin >> s1 >> s2; if (parse(s2) <= parse(s1)) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }