#include int main(){ int A0,B0,C0; int A1,B1,C1; scanf("%d.%d.%d", &A0, &B0, &C0); scanf("%d.%d.%d", &A1, &B1, &C1); if((A0*100000000+B0*100000+C0*100)>(A1*100000000+B1*100000+C1*100)){ printf("YES\n"); }else{ printf("NO\n"); } return 0; }