#define _CRT_SECURE_NO_WARNINGS #include int main(void) { int fsl[3], crt[3]; int judge = 0; scanf("%d.%d.%d", &fsl[0], &fsl[1], &fsl[2]); scanf("%d.%d.%d", &crt[0], &crt[1], &crt[2]); if (crt[0] < fsl[0]) judge++; else if (crt[1] < fsl[1]) judge++; else if (crt[2] <= fsl[2]) judge++; if (judge != 0) puts("YES"); else puts("NO"); return 0; }