#include<bits/stdc++.h> using namespace std; using ll=long long; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll A,B; cin>>A>>B; for(int i=0;i<=20;i++){ if(A%10<B%10){ cout<<"No"<<endl; return 0; } A/=10; B/=10; } cout<<"Yes"<<endl; }