#include #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define rrep(i, n) for(int i = ((int)(n)-1); i >= 0; i--) #define all(x) (x).begin(),(x).end() #define pb emplace_back using namespace std; using ll = long long; typedef vector vi; typedef vector vvi; typedef pair P; const int INF = 1e9; const double EPS = 1e-10; const int MOD = 1e9+7; const double PI = acos(-1.0); int main() { string a,b; cin >> a >> b; int aa[3] = {},bb[3] = {},cnt_a = 0,cnt_b = 0,sum_a = 0,sum_b = 0; for(int i = 0; i <= a.size(); i++){ if(i == a.size() || a[i] == '.'){ aa[cnt_a++] = sum_a; sum_a = 0; } } for(int i = 0; i <= b.size(); i++){ if(i == b.size() || b[i] == '.'){ bb[cnt_a++] = sum_a; sum_b = 0; } } int aaa = a[0] * 10100 + a[1] * 101 + a[2]; int bbb = b[0] * 10100 + b[1] * 101 + b[2]; cout << (aaa >= bbb ? "YES" : "NO") << endl; return 0; }