#include"../../template.h"// for negative valllGCD(lla,llb){a=llabs(a),b=llabs(b);return(!b?a:GCD(b,a%b));}llGCD(lla,llb){return(!b?a:GCD(b,a%b));}llLCM(lla,llb){returna/GCD(a,b)*b;}// logb(a)doublelog_base(lla,llb){returnlog(a)/log(b);}// use for 2 <= BASE <= 26stringdecimal_to_base(lln,intBASE){if(!n)return"0";boolneg=(n<0?1:0);n=llabs(n);stringnum="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";stringres;while(n){res.push_back(num[n%BASE]);n/=BASE;}if(neg)res+='-';reverse(all(res));returnres;}// any BASE to decimal// use ctype libllconvert_decimal(strings,intBASE){autoval=[&](charc){return(isdigit(toupper(c))?c-'0':c-'A'+10);};lln=s.size(),p=1,res=0;for(inti=n-1;i>=0;i--){res+=val(s[i])*p;p=p*BASE;}returnres;}
#line 2 "template.h"
#include<bits/stdc++.h>usingnamespacestd;#define ll long long
#define MOD (ll)(1e9+7)
#define all(x) (x).begin(),(x).end()
#define unique(x) x.erase(unique(all(x)), x.end())
#define INF32 ((1ull<<31)-1)
#define INF64 ((1ull<<63)-1)
#define inf (ll)1e18
#define vi vector<int>
#define pii pair<int, int>
#define pll pair<ll, ll>
#define fi first
#define se second
constintmod=998244353;voidsolve();intmain(){ios_base::sync_with_stdio(false);cin.tie(NULL);// cin.exceptions(cin.failbit);// int t; cin >> t;// while(t--)solve();cerr<<"\nTime run: "<<1000*clock()/CLOCKS_PER_SEC<<"ms"<<'\n';return0;}#line 2 "NumberTheory/Math/Misc.h"
// for negative valllGCD(lla,llb){a=llabs(a),b=llabs(b);return(!b?a:GCD(b,a%b));}llGCD(lla,llb){return(!b?a:GCD(b,a%b));}llLCM(lla,llb){returna/GCD(a,b)*b;}// logb(a)doublelog_base(lla,llb){returnlog(a)/log(b);}// use for 2 <= BASE <= 26stringdecimal_to_base(lln,intBASE){if(!n)return"0";boolneg=(n<0?1:0);n=llabs(n);stringnum="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";stringres;while(n){res.push_back(num[n%BASE]);n/=BASE;}if(neg)res+='-';reverse(all(res));returnres;}// any BASE to decimal// use ctype libllconvert_decimal(strings,intBASE){autoval=[&](charc){return(isdigit(toupper(c))?c-'0':c-'A'+10);};lln=s.size(),p=1,res=0;for(inti=n-1;i>=0;i--){res+=val(s[i])*p;p=p*BASE;}returnres;}