#include using namespace std; const int n = 3; int A[n], B[n]; bool flg = false; void RecursiveJudge(int i) { int a = A[i], b = B[i]; if (i != n || a > b) { cout << "YES" << endl; return; } if (a < b) { cout << "NO" << endl; return; } RecursiveJudge(i + 1); } int main() { scanf("%d.%d.%d", &A[0], &A[1], &A[2]); scanf("%d.%d.%d", &B[0], &B[1], &B[2]); RecursiveJudge(0); }