#include int main(){ int a0, a1, a2, b0, b1, b2; scanf("%d.%d.%d %d.%d.%d", &a0, &a1, &a2, &b0, &b1, &b2); printf("%s\n", (a0*1000000+a1*1000+a2 >= b0*1000000+b1*1000+b2)?"YES":"NO"); }