#include using namespace std; typedef long long ll; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b>x1>>x2; map MA,MA2,MA5; for(int i=0;i<10;i++){ for(int j=0;j<10;j++){ int a=1; for(int k=0;k=8){ cout<>x2; t++; if(x1==x2) return 0; } while(1){ if((x1/2==x2&&x1==x2*2)||(x1/5==x2&&x1==x2*5)||(x1==x2/2&&x1*2==x2)||(x1==x2/5&&x1*5==x2)||(x1==D/4&&x2==D)){ cout<0){ cout<0){ cout<0){ cout<0){ cout<>x2; if(x1==x2) return 0; t++; } }