#include #include #include #include #include int main() { char fossilVer[6] = ""; char assessVer[6] = ""; scanf("%s", fossilVer); scanf("%s", assessVer); for (int i = 0;assessVer[i] != '\0';) { if (fossilVer[i] == assessVer[i]) { i += 2; } else if (fossilVer[i] > assessVer[i]) { printf("YES\n"); return 0; } else { printf("NO\n"); return 0; } } printf("YES\n"); return 0; }