#include using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) typedef long long ll; typedef pair pii; typedef vector vll; typedef vector vi; typedef vector> vvi; typedef vector> vvll; const ll inf = 1e16; const ll md = 1000000007; int vtoa(string s){ int res=0; int n=s.size(); int l=0; int base=1000000; rep(i,n){ if(s[i]=='.'){ res+=stoi(s.substr(l,i-l))*base; base/=1000; l=i+1; } } res+=stoi(s.substr(l)); return res; } int main() { string s,t; cin>>s>>t; int old=vtoa(s); int now=vtoa(t); if(now<=old) puts("YES"); else puts("NO"); return 0; }