/* #include void self::main(){ multi_test_cases LL(H,W); auto s=sinen(H,".#?"); vec g(3,H,W,int{}); fo(i,H)fo(j,W){ g[s[i][j]][i][j]=1; if(s[i][j]==2){ g[0][i][j]=1; g[1][i][j]=1; } } fo(f,2)zeta(g[f]); fo(i,H-1)fo(j,W-1){ if(s[i][j]==0)continue; if(s[i][j+1]==0)continue; if(s[i+1][j]==0)continue; if(s[i+1][j+1]==1)continue; ll k=binary_search_last_true(j+1,W,[&](ll k){ return rectangle_sum(g[1],i,i+1,j+1,k+1)==k-j; }); ll l=binary_search_first_false(j+1,W,[&](ll l){ return rectangle_sum(g[1],i+1,i+2,j+2,l+1)==0; }); if(l<=k)done(Yes()); } ppNo(); } */ #include using namespace std; namespace self{void main();void sub();void pp(auto&&...a);} int main(){cin.tie(nullptr)->sync_with_stdio(0);cout<0;) #define fo(i,...) for(auto[i,i##stop,i##step]=for_range(0,__VA_ARGS__);iconstexpr auto for_range(T s,T b){T a=0;if(s)swap(a,b);return array{a-s,b,1-s*2};} const string newline{char(10)}; void lin(auto&...a){(cin>>...>>a);} auto Yes(bool p=1){return p?"Yes":"No";} auto No(){return Yes(0);} void ppNo(){cout<1)(f((o+x)/2)?o:x)=(o+x)/2;return x;} ll binary_search_last_true(ll o,ll x,auto&&f){while(abs(o-x)>1)(f((o+x)/2)?o:x)=(o+x)/2;return o;} templateusing pack_back_t=tuple_element_t>; } namespace self{ templateconcept vectorial=is_base_of_v::value_type>,remove_cvref_t>; templateconstexpr int depth=0; templateconstexpr int depth =depth+1; templatestruct core_t_helper{using type=T;}; templatestruct core_t_helper{using type=typename core_t_helper::type;}; templateusing core_t=core_t_helper::type; templatestruct vec; templatestruct hvec_helper{using type=vec::type>;}; templatestruct hvec_helper<0,T>{using type=T;}; templateusing hvec=hvec_helper::type; templatestruct vec:vector{ static constexpr int D=depth+1; using C=core_t; using vector::vector; vec(const auto&...a)requires(sizeof...(a)>=3){assign_all(a...);} void assign_all(const auto&...a){if constexpr(sizeof...(a)==D){ }else*this=make(a...);} static auto make(ll n,const auto&...a){ if constexpr(sizeof...(a)==1)return vec(n,array{a...}[0]); else return vec(n,make(a...)); } auto&operator+=(const vec&u){vec&v=*this;assert(v.size()==u.size());fo(i,v.size())v[i]+=u[i];return v;} ll size()const{return vector::size();} auto&emplace_back(auto&&...a){vector::emplace_back(std::forward(a)...);return*this;} }; templaterequires(sizeof...(A)>=2)vec(const A&...a)->vec>>; templatevoid zeta(V&&v){if constexpr(depth>>1)fe(v,e)zeta(e);fo(i,v.size()-1)v[i+1]+=v[i];} auto sin(){string s;lin(s);return s;} templateauto sinen(const string&b){assert(b.size()>1);vecr;fe(sin(),e)r.eb(b.find_first_of(e));return r;} templateauto sinen(ll n,const string&b){vec>r;FO(n)r.eb(sinen(b));return r;} } namespace self { templateauto rectangle_sum(const vec>&v,ll a,ll b,ll c,ll d){ assert(0<=a&&a<=b&&b<=v.size()); assert(0<=c&&c<=d&&d<=v[0].size()); T res=0; if(b&&d)res+=v[b-1][d-1]; if(a&&d)res-=v[a-1][d-1]; if(b&&c)res-=v[b-1][c-1]; if(a&&c)res+=v[a-1][c-1]; return res; } } void self::pp(auto&&...a){const char*c="";((cout<