#include using namespace std; int main(){ vectorV[2]; for(int i=0;i<2;i++){ int a,b,c; scanf("%d.%d.%d",&a,&b,&c); V[i].push_back(a); V[i].push_back(b); V[i].push_back(c); } if(V[0]>=V[1])puts("YES"); else puts("NO"); return 0; }