#include #include int main(){ char s[1000]; char t[1000]; gets(s); gets(t); int b[3]; int a[3]; a[0]=atoi(strtok(s,".")); a[1]=atoi(strtok(NULL,".")); a[2]=atoi(strtok(NULL,".")); b[0]=atoi(strtok(t,".")); b[1]=atoi(strtok(NULL,".")); b[2]=atoi(strtok(NULL,".")); if(a[0]>b[0]){ printf("YES\n"); }else if(b[1]=b[2]&&a[1]==b[1]&&a[0]==b[0]){ printf("YES\n"); }else{ printf("NO\n"); //printf("%d %dYES\n",a[2],b[2]); } return 0; }