#ifndef ONLINE_JUDGE #define _GLIBCXX_DEBUG #endif #include #include using namespace std; using ll=long long; using ld=long double; using st=string; using P=pair; typedef atcoder::modint mint; ll inf=9e18; template auto vec(const ll (&sizes)[s], const T& init = T()){ if constexpr(i < s) return vector(sizes[i], vec(sizes, init)); else return init; } bool prime(ll n){ for(ll i=2;i>h>>w>>n; auto v=vec({h+1,w+1},0); for(ll i=0;i>r1>>c1>>r2>>c2; r1--;c1--;r2--;c2--; v[r1][c1]++; v[r2+1][c2+1]++; v[r1][c2+1]--; v[r2+1][c1]--; } for(ll i=0;i