#include int main() { int originver[3],checkver[3]; scanf("%d.%d.%d", &originver[0], &originver[1], &originver[2]); scanf("%d.%d.%d", &checkver[0], &checkver[1], &checkver[2]); int first = originver[0] * 1000000 + originver[1] * 1000 + originver[2] * 1; int second = checkver[0] * 1000000 + checkver[1] * 1000 + checkver[2] * 1; if (second <= first) { printf("YES"); } else { printf("NO"); } return 0; }