#include #include #include using namespace std; using namespace atcoder; using mint = modint; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 4000000000000000001 long long dfs(long long N,int cp = 0){ if(N<0)N += 5; if(cp>=30)return -1; if(N==0)return 0; if(N%5==0){ long long r = dfs(N/5,cp+1); if(r==-1)return r; return r*5; } if(N%5==1){ long long ret = 1e18; ; long long r = dfs(N/5,cp+1); if(r!=-1)ret = min(ret,r*5+1); r = dfs((N-16)/5,cp+1); if(r!=-1)ret = min(ret,r*5+4); if(ret==1e18)ret= -1; return ret; } if(N%5==4){ long long ret = 1e18; ; long long r = dfs(N/5,cp+1); if(r!=-1)ret = min(ret,r*5+2); r = dfs((N-9)/5,cp+1); if(r!=-1)ret = min(ret,r*5+3); if(ret==1e18)ret= -1; return ret; } return -1; } int main(){ long long N,E; cin>>N>>E; if(N>=0){ long long sq = sqrtl(N); if(sq*sq==N){ cout< (1LL<<29))ans -= t; cout<