#define _CRT_SECURE_NO_WARNINGS #include int main(void) { int fsl[3], crt[3]; 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]) puts("YES"); else if (crt[1] < fsl[1]) puts("YES"); else if (crt[2] < fsl[2]) puts("YES"); else puts("NO"); return 0; }