#include using namespace std; int main(){ string a,b;cin>>a>>b; if(a.size() != b.size()){ cout << (a.size() i; i++){ if(a[i] != b[i]){ if((a[i]=='4' && b[i] == '7') || a[i] > b[i]){ cout << a << endl; return 0; }else{ cout << b << endl; return 0; } } } } }