#include int main(){ int A[2],B[2],C[2]; scanf("%d.%d.%d",&A[0],&B[0],&C[0]); scanf("%d.%d.%d",&A[1],&B[1],&C[1]); if(A[0]*101*101+B[0]*101+C[0]>=A[1]*101*101+B[1]*101+C[1])printf("YES\n"); else printf("NO\n"); return 0; }