#include "iostream" #include "math.h" using namespace std; char letter[2][20]; int num[2][3]; bool flag=false; int box; int main() { cin >> letter[0] >> letter[1]; box = 0; for (int i = 0; letter[0][i] != NULL; i++) { if (letter[0][i] != '.') { num[0][box] *= 10; num[0][box] += letter[0][i] - '0'; } else box++; } box = 0; for (int i = 0; letter[1][i] != NULL; i++) { if (letter[1][i] != '.') { num[1][box] *= 10; num[1][box] += letter[1][i] - '0'; } else box++; } for (int i = 0; i < 3; i++) { if (num[0][i] > num[1][i]) { flag = true; break; } } if (flag)cout << "YES\n"; else cout << "NO\n"; return 0; }