#include void run(void){ int a,b; scanf("%d%d",&a,&b); int d=1; while(a/d>0 && b/d>0){ d*=10; } if(a/d==0 && b/d>0){ printf("%d\n",b); return; } if(a/d>0 && b/d==0){ printf("%d\n",a); return; } while(d>0){ int x,y; x=(a/d)%10; y=(b/d)%10; if(x!=y){ if(x==4 && y==7){ printf("%d\n",a); } else if(x==7 && y==4){ printf("%d\n",b); } else { printf("%d\n",a