#include using namespace std; int main() { int a1, b1, c1, a2, b2, c2, a, b; scanf("%d.%d.%d", &a1, &b1, &c1); scanf("%d.%d.%d", &a2, &b2, &c2); a=(a1*100)+(b1*10)+c1; b=(a2*100)+(b2*10)+c2; cout << (a>b ? "YES": "NO") << endl; return 0; }