#include using namespace std; using Int = long long; const char newl = '\n'; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a void drop(const T &x){cout< vector read(size_t n){ vector ts(n); for(size_t i=0;i>ts[i]; return ts; } // [0, n] template vector powers(Int n,T x){ vector po(n+1,T(1)); for(Int i=0;i>n; auto calc=[&](Int x){ Int res=0; for(char c:to_string(x)) res+=c-'0'; return res; }; if(n==0) drop("9 1"); if(0){ auto po=powers(8,10); const Int LIM = asinl(1) * 2 * po[n]; Int res=0; for(Int a=1;a<=LIM;a++){ for(Int b=a;b<=LIM;b++){ chmax(res,calc(a*b)); } } cout<