#include #include using namespace atcoder; using namespace std; #define all(a) a.begin(),a.end() #define rall(a) a.rbegin(),a.rend() #define fin(...) return pt(__VA_ARGS__) #define cont(...) pt(__VA_ARGS__);continue #define eb(...) emplace_back(__VA_ARGS__) #define ef(...) emplace_front(__VA_ARGS__) #define elif(...) else if(__VA_ARGS__) #define overload4(a,b,c,d,e,...) e #define rep1(b) for(ll _i=0;_i<(ll)(b);_i++) #define rep2(i,b) for(ll i=0;i<(ll)(b);i++) #define rep3(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++) #define rep4(i,a,b,c) for(ll i=(ll)(a);i<(ll)(b);i+=(ll)(c)) #define rep(...) overload4(__VA_ARGS__,rep4,rep3,rep2,rep1)(__VA_ARGS__) #define rrep1(a) for(ll _i=(ll)(a);_i>=0;_i--) #define rrep2(i,a) for(ll i=(ll)(a);i>=0;i--) #define rrep3(i,a,b) for(ll i=(ll)(a);i>=(ll)(b);i--) #define rrep4(i,a,b,c) for(ll i=(ll)(a);i>=(ll)(b);i-=(ll)(c)) #define rrep(...) overload4(__VA_ARGS__,rrep4,rrep3,rrep2,rrep1)(__VA_ARGS__) #define LL(...) ll __VA_ARGS__;lin(__VA_ARGS__) #define LD(...) ld __VA_ARGS__;lin(__VA_ARGS__) using ll=long long; using ld=long double; using v1=vector; using v2=vector; using v3=vector; using v4=vector; using pll=pair; using mll=map; using mint=modint998244353; ll inf=3e18; ld pi=acos(-1); ld eps=1e-10; templatev1&operator++(vector&v){for(T&x:v)x++;return v;} templatev1&operator--(vector&v){for(T&x:v)x--;return v;} templatev1 operator++(vector&v,int){v1 r=v;++v;return r;} templatev1 operator--(vector&v,int){v1 r=v;--v;return r;} templateusing max_priority_queue=std::priority_queue; templateusing min_priority_queue=std::priority_queue,greater>; templatebool chmax(T&a,const U&b){return abool chmin(T&a,const U&b){return a>b?a=b,1:0;} templateT max(const vector&a){return *max_element(all(a));} templateT min(const vector&a){return *min_element(all(a));} templateconstexpr auto max(T...a){return max(initializer_list>{a...});} templateconstexpr auto min(T...a){return min(initializer_list>{a...});} templateT sum(const vector&a){return accumulate(all(a),T(0));} templateT popcnt(T a){return __builtin_popcountll(a);} templatell lbp(const vector&a,const T&b){return lower_bound(all(a),b)-a.begin();} templatell ubp(const vector&a,const T&b){return upper_bound(all(a),b)-a.begin();} templatepll mima(const T&a,const T&b){return {min(a,b),max(a,b)};} templatevoid sort(vector&v){sort(all(v));} templatevoid sort(vector&v,const F&f){sort(all(v),f);} templatevoid rev(vector&v){reverse(all(v));} templatevoid uniq(vector&v){sort(all(v));v.erase(unique(all(v)),v.end());} void sort(string&s){sort(all(s));} void rev(string&s){reverse(all(s));} v1 iota(ll n,ll s=0){v1 a(n);iota(all(a),s);return a;} void emplace_front(v1&v,ll x=0){v.emplace(v.begin(),x);} //io struct fast_ios{fast_ios(){cin.tie(nullptr);ios::sync_with_stdio(false);cout<istream&operator>>(istream&is,pair&p){return is>>p.first>>p.second;} templateostream&operator<<(ostream&os,const pair&p){return os<istream&operator>>(istream&is,vector&v){for(T&x:v)is>>x;return is;} templateostream&operator<<(ostream&os,const vector&v){rep(i,v.size())os<ostream&operator<<(ostream&os,const vector>&v){ rep(i,v.size()){ rep(j,v[i].size())os<ostream&operator<<(ostream&os,const set&v){for(auto&x:v)os<ostream&operator<<(ostream&os,const map&m){for(auto&[k,v]:m)os<first)?"":"\n");return os;} ll pt(){cout<<'\n';return 0;} templatell pt(const T&a,const A&...b){cout<void vin(const ll k,vector&...a){(cin>>...>>a[k]);} templatevoid vin(vector&a,A&...b){rep(i,a.size())vin(i,a,b...);} templatevoid lin(T&a){cin>>a;} templatevoid lin(T&...a){(cin>>...>>a);} //other templatevoid resize(vector&v,const T&a){v.resize(a);} templatevoid resize(vector&vv,const T&a,const A&...b){vv.resize(a);for(V&v:vv)resize(v,b...);} templatevoid fill(V&v,const T&x){v=x;} templatevoid fill(vector&vv,const T&x){for(V&v:vv)fill(v,x);} void com(v1&v,v1&h){for(ll&x:h)x=lbp(v,x);} templatevoid com(v1&v,v1&h,T&...t){for(ll&x:h)x=lbp(v,x);com(v,t...);} templatev1 compress(T&...a){v1 v;for(auto&e:{a...})copy(all(e),back_inserter(v));uniq(v);com(v,a...);return v;} templateT binsearch(functionjudge,T ok,T ng){ T D=(*typeid(ok).name()=='x'?1:eps); while(abs(ok-ng)>D){ T m=(ok+ng)/2; (judge(m)?ok:ng)=m; } return ok; } v1 divisor(ll n){mll m;for(ll i=1;i*i<=n;i++){if(n%i==0){m[i]++;m[n/i]++;}}v1 v;for(auto[x,_]:m)v.eb(x);return v;} mll factor(ll n){mll m;for(ll i=2;i*i<=n;i++){while(n%i==0){m[i]++;n/=i;}}if(n>1)m[n]++;return m;} ll mpow(ll x,ll n,ll m=0){ll r=1;while(n>0){if(n&1){r*=x;if(m)r%=m;}x*=x;if(m)x%=m;n>>=1;}return r;} ll minv(ll a,ll m){ll b=m,u=1,v=0;while(b){ll t=a/b;a-=t*b;swap(a,b);u-=t*v;swap(u,v);}u%=m;if(u<0)u+=m;return u;} ll lsqrt(ll x){ll r=sqrt(x)-1;while(r+1<=x/(r+1))r++;return r;} ll llog2(ll n){ll r=0;while(n){n>>=1;r++;}return r;} ll bit(ll n){return 1LL<(judge,0,510001); cout<