#include #include #include int main() { std::string str[2]; int a[2][3] = {0}; std::cin >> str[0] >> str[1]; for (int i = 0; i < 2; i++) { int count = 0; while(str[i].size() != 0) { if (str[i].front() == '.'){ count++; }else { a[i][count] = a[i][count] * 10 + (str[i][0] - '0'); } str[i].erase(str[i].begin()); } } bool old = false; if (a[0][0] == a[1][0]) { if (a[0][1] == a[1][1]) { if (a[0][2] >= a[1][2]) { old = true; } } else if (a[0][1] >= a[1][1]) { old = true; } } else if(a[0][0] >= a[1][0]){ old = true; } std::cout << (old ? "YES" : "NO") << std::endl; return 0; }