#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; #define ALL(obj) (obj).begin(),(obj).end() template void corner(bool flg, T hoge) { if (flg) { cout << hoge << endl; exit(0); } } template ostream &operator<<(ostream &o, const map&obj) { o << "{"; for (auto &x : obj) o << " {" << x.first << " : " << x.second << "}" << ","; o << " }"; return o; } template ostream &operator<<(ostream &o, const set&obj) { o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr) o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o; } template ostream &operator<<(ostream &o, const vector&obj) { o << "{"; for (int i = 0; i < (int)obj.size(); ++i)o << (i > 0 ? ", " : "") << obj[i]; o << "}"; return o; } template ostream &operator<<(ostream &o, const pair&obj) { o << "{" << obj.first << ", " << obj.second << "}"; return o; } template