結果
問題 |
No.2419 MMA文字列2
|
ユーザー |
|
提出日時 | 2025-08-29 17:41:34 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 58 ms / 2,000 ms |
コード長 | 59,499 bytes |
コンパイル時間 | 6,418 ms |
コンパイル使用メモリ | 351,168 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-08-29 17:41:43 |
合計ジャッジ時間 | 7,740 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 30 |
ソースコード
#ifndef HIDDEN_IN_VS // 折りたたみ用 // 警告の抑制 #define _CRT_SECURE_NO_WARNINGS // ライブラリの読み込み #include <bits/stdc++.h> using namespace std; // 型名の短縮 using ll = long long; using ull = unsigned long long; // -2^63 ~ 2^63 = 9e18(int は -2^31 ~ 2^31 = 2e9) using pii = pair<int, int>; using pll = pair<ll, ll>; using pil = pair<int, ll>; using pli = pair<ll, int>; using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>; using vvvvi = vector<vvvi>; using vl = vector<ll>; using vvl = vector<vl>; using vvvl = vector<vvl>; using vvvvl = vector<vvvl>; using vb = vector<bool>; using vvb = vector<vb>; using vvvb = vector<vvb>; using vc = vector<char>; using vvc = vector<vc>; using vvvc = vector<vvc>; using vd = vector<double>; using vvd = vector<vd>; using vvvd = vector<vvd>; template <class T> using priority_queue_rev = priority_queue<T, vector<T>, greater<T>>; using Graph = vvi; // 定数の定義 const double PI = acos(-1); int DX[4] = { 1, 0, -1, 0 }; // 4 近傍(下,右,上,左) int DY[4] = { 0, 1, 0, -1 }; int INF = 1001001001; ll INFL = 4004004003094073385LL; // (int)INFL = INF, (int)(-INFL) = -INF; // 入出力高速化 struct fast_io { fast_io() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(18); } } fastIOtmp; // 汎用マクロの定義 #define all(a) (a).begin(), (a).end() #define sz(x) ((int)(x).size()) #define lbpos(a, x) (int)distance((a).begin(), std::lower_bound(all(a), (x))) #define ubpos(a, x) (int)distance((a).begin(), std::upper_bound(all(a), (x))) #define Yes(b) {cout << ((b) ? "Yes\n" : "No\n");} #define rep(i, n) for(int i = 0, i##_len = int(n); i < i##_len; ++i) // 0 から n-1 まで昇順 #define repi(i, s, t) for(int i = int(s), i##_end = int(t); i <= i##_end; ++i) // s から t まで昇順 #define repir(i, s, t) for(int i = int(s), i##_end = int(t); i >= i##_end; --i) // s から t まで降順 #define repe(v, a) for(const auto& v : (a)) // a の全要素(変更不可能) #define repea(v, a) for(auto& v : (a)) // a の全要素(変更可能) #define repb(set, d) for(int set = 0, set##_ub = 1 << int(d); set < set##_ub; ++set) // d ビット全探索(昇順) #define repis(i, set) for(int i = lsb(set), bset##i = set; i < 32; bset##i -= 1 << i, i = lsb(bset##i)) // set の全要素(昇順) #define repp(a) sort(all(a)); for(bool a##_perm = true; a##_perm; a##_perm = next_permutation(all(a))) // a の順列全て(昇順) #define uniq(a) {sort(all(a)); (a).erase(unique(all(a)), (a).end());} // 重複除去 #define EXIT(a) {cout << (a) << endl; exit(0);} // 強制終了 #define inQ(x, y, u, l, d, r) ((u) <= (x) && (l) <= (y) && (x) < (d) && (y) < (r)) // 半開矩形内判定 // 汎用関数の定義 template <class T> inline ll powi(T n, int k) { ll v = 1; rep(i, k) v *= n; return v; } template <class T> inline bool chmax(T& M, const T& x) { if (M < x) { M = x; return true; } return false; } // 最大値を更新(更新されたら true を返す) template <class T> inline bool chmin(T& m, const T& x) { if (m > x) { m = x; return true; } return false; } // 最小値を更新(更新されたら true を返す) template <class T> inline int getb(T set, int i) { return (set >> i) & T(1); } template <class T> inline T smod(T n, T m) { n %= m; if (n < 0) n += m; return n; } // 非負mod // 演算子オーバーロード template <class T, class U> inline istream& operator>>(istream& is, pair<T, U>& p) { is >> p.first >> p.second; return is; } template <class T> inline istream& operator>>(istream& is, vector<T>& v) { repea(x, v) is >> x; return is; } template <class T> inline vector<T>& operator--(vector<T>& v) { repea(x, v) --x; return v; } template <class T> inline vector<T>& operator++(vector<T>& v) { repea(x, v) ++x; return v; } #endif // 折りたたみ用 #if __has_include(<atcoder/all>) #include <atcoder/all> using namespace atcoder; #ifdef _MSC_VER #include "localACL.hpp" #endif using mint = modint998244353; //using mint = static_modint<(int)1e9+7>; //using mint = modint; // mint::set_mod(m); using vm = vector<mint>; using vvm = vector<vm>; using vvvm = vector<vvm>; using vvvvm = vector<vvvm>; using pim = pair<int, mint>; #endif #ifdef _MSC_VER // 手元環境(Visual Studio) #include "local.hpp" #else // 提出用(gcc) int mute_dump = 0; int frac_print = 0; #if __has_include(<atcoder/all>) namespace atcoder { inline istream& operator>>(istream& is, mint& x) { ll x_; is >> x_; x = x_; return is; } inline ostream& operator<<(ostream& os, const mint& x) { os << x.val(); return os; } } #endif inline int popcount(int n) { return __builtin_popcount(n); } inline int popcount(ll n) { return __builtin_popcountll(n); } inline int lsb(int n) { return n != 0 ? __builtin_ctz(n) : 32; } inline int lsb(ll n) { return n != 0 ? __builtin_ctzll(n) : 64; } inline int msb(int n) { return n != 0 ? (31 - __builtin_clz(n)) : -1; } inline int msb(ll n) { return n != 0 ? (63 - __builtin_clzll(n)) : -1; } #define dump(...) #define dumpel(v) #define dump_math(v) #define input_from_file(f) #define output_to_file(f) #define Assert(b) { if (!(b)) { vc MLE(1<<30); EXIT(MLE.back()); } } // RE の代わりに MLE を出す #endif template <class VTYPE> VTYPE solve(const string& s) { // --------------- embed_coefs() からの出力を貼る ---------------- constexpr int DIM = 54; constexpr int COL = 26; tuple<int, int, VTYPE> matAs[] = { {0,1,1},{1,27,1},{2,0,-1},{2,1,1},{2,2,1},{3,0,-1},{3,1,1},{3,3,1},{4,0,-1},{4,1,1},{4,4,1},{5,0,-1},{5,1,1},{5,5,1},{6,0,-1},{6,1,1},{6,6,1},{7,0,-1},{7,1,1},{7,7,1},{8,0,-1},{8,1,1},{8,8,1},{9,0,-1},{9,1,1},{9,9,1},{10,0,-1},{10,1,1},{10,10,1},{11,0,-1},{11,1,1},{11,11,1},{12,0,-1},{12,1,1},{12,12,1},{13,0,-1},{13,1,1},{13,13,1},{14,0,-1},{14,1,1},{14,14,1},{15,0,-1},{15,1,1},{15,15,1},{16,0,-1},{16,1,1},{16,16,1},{17,0,-1},{17,1,1},{17,17,1},{18,0,-1},{18,1,1},{18,18,1},{19,0,-1},{19,1,1},{19,19,1},{20,0,-1},{20,1,1},{20,20,1},{21,0,-1},{21,1,1},{21,21,1},{22,0,-1},{22,1,1},{22,22,1},{23,0,-1},{23,1,1},{23,23,1},{24,0,-1},{24,1,1},{24,24,1},{25,0,-1},{25,1,1},{25,25,1},{26,0,-1},{26,1,1},{26,26,1},{27,0,1},{27,1,-3},{27,27,3},{28,1,1},{28,2,-1},{28,27,-1},{28,28,1},{28,53,1},{29,1,1},{29,2,-1},{29,27,-1},{29,29,1},{29,53,1},{30,1,1},{30,2,-1},{30,27,-1},{30,30,1},{30,53,1},{31,1,1},{31,2,-1},{31,27,-1},{31,31,1},{31,53,1},{32,1,1},{32,2,-1},{32,27,-1},{32,32,1},{32,53,1},{33,1,1},{33,2,-1},{33,27,-1},{33,33,1},{33,53,1},{34,1,1},{34,2,-1},{34,27,-1},{34,34,1},{34,53,1},{35,1,1},{35,2,-1},{35,27,-1},{35,35,1},{35,53,1},{36,1,1},{36,2,-1},{36,27,-1},{36,36,1},{36,53,1},{37,1,1},{37,2,-1},{37,27,-1},{37,37,1},{37,53,1},{38,1,1},{38,2,-1},{38,27,-1},{38,38,1},{38,53,1},{39,1,1},{39,2,-1},{39,27,-1},{39,39,1},{39,53,1},{40,1,1},{40,2,-1},{40,27,-1},{40,40,1},{40,53,1},{41,1,1},{41,2,-1},{41,27,-1},{41,41,1},{41,53,1},{42,1,1},{42,2,-1},{42,27,-1},{42,42,1},{42,53,1},{43,1,1},{43,2,-1},{43,27,-1},{43,43,1},{43,53,1},{44,1,1},{44,2,-1},{44,27,-1},{44,44,1},{44,53,1},{45,1,1},{45,2,-1},{45,27,-1},{45,45,1},{45,53,1},{46,1,1},{46,2,-1},{46,27,-1},{46,46,1},{46,53,1},{47,1,1},{47,2,-1},{47,27,-1},{47,47,1},{47,53,1},{48,1,1},{48,2,-1},{48,27,-1},{48,48,1},{48,53,1},{49,1,1},{49,2,-1},{49,27,-1},{49,49,1},{49,53,1},{50,1,1},{50,2,-1},{50,27,-1},{50,50,1},{50,53,1},{51,1,1},{51,2,-1},{51,27,-1},{51,51,1},{51,53,1},{52,1,1},{52,2,-1},{52,27,-1},{52,52,1},{52,53,1},{53,0,1},{53,1,-3},{53,27,2},{53,53,1},{0,2,1},{1,0,-1},{1,1,1},{1,2,1},{2,28,1},{3,0,-1},{3,2,1},{3,3,1},{4,0,-1},{4,2,1},{4,4,1},{5,0,-1},{5,2,1},{5,5,1},{6,0,-1},{6,2,1},{6,6,1},{7,0,-1},{7,2,1},{7,7,1},{8,0,-1},{8,2,1},{8,8,1},{9,0,-1},{9,2,1},{9,9,1},{10,0,-1},{10,2,1},{10,10,1},{11,0,-1},{11,2,1},{11,11,1},{12,0,-1},{12,2,1},{12,12,1},{13,0,-1},{13,2,1},{13,13,1},{14,0,-1},{14,2,1},{14,14,1},{15,0,-1},{15,2,1},{15,15,1},{16,0,-1},{16,2,1},{16,16,1},{17,0,-1},{17,2,1},{17,17,1},{18,0,-1},{18,2,1},{18,18,1},{19,0,-1},{19,2,1},{19,19,1},{20,0,-1},{20,2,1},{20,20,1},{21,0,-1},{21,2,1},{21,21,1},{22,0,-1},{22,2,1},{22,22,1},{23,0,-1},{23,2,1},{23,23,1},{24,0,-1},{24,2,1},{24,24,1},{25,0,-1},{25,2,1},{25,25,1},{26,0,-1},{26,2,1},{26,26,1},{27,53,1},{28,0,1},{28,2,-3},{28,28,3},{29,27,-1},{29,29,1},{29,53,1},{30,27,-1},{30,30,1},{30,53,1},{31,27,-1},{31,31,1},{31,53,1},{32,27,-1},{32,32,1},{32,53,1},{33,27,-1},{33,33,1},{33,53,1},{34,27,-1},{34,34,1},{34,53,1},{35,27,-1},{35,35,1},{35,53,1},{36,27,-1},{36,36,1},{36,53,1},{37,27,-1},{37,37,1},{37,53,1},{38,27,-1},{38,38,1},{38,53,1},{39,27,-1},{39,39,1},{39,53,1},{40,27,-1},{40,40,1},{40,53,1},{41,27,-1},{41,41,1},{41,53,1},{42,27,-1},{42,42,1},{42,53,1},{43,27,-1},{43,43,1},{43,53,1},{44,27,-1},{44,44,1},{44,53,1},{45,27,-1},{45,45,1},{45,53,1},{46,27,-1},{46,46,1},{46,53,1},{47,27,-1},{47,47,1},{47,53,1},{48,27,-1},{48,48,1},{48,53,1},{49,27,-1},{49,49,1},{49,53,1},{50,27,-1},{50,50,1},{50,53,1},{51,27,-1},{51,51,1},{51,53,1},{52,27,-1},{52,52,1},{52,53,1},{53,0,1},{53,2,-2},{53,27,-1},{53,28,1},{53,53,2},{0,3,1},{1,0,-1},{1,1,1},{1,3,1},{2,0,-1},{2,2,1},{2,3,1},{3,29,1},{4,0,-1},{4,3,1},{4,4,1},{5,0,-1},{5,3,1},{5,5,1},{6,0,-1},{6,3,1},{6,6,1},{7,0,-1},{7,3,1},{7,7,1},{8,0,-1},{8,3,1},{8,8,1},{9,0,-1},{9,3,1},{9,9,1},{10,0,-1},{10,3,1},{10,10,1},{11,0,-1},{11,3,1},{11,11,1},{12,0,-1},{12,3,1},{12,12,1},{13,0,-1},{13,3,1},{13,13,1},{14,0,-1},{14,3,1},{14,14,1},{15,0,-1},{15,3,1},{15,15,1},{16,0,-1},{16,3,1},{16,16,1},{17,0,-1},{17,3,1},{17,17,1},{18,0,-1},{18,3,1},{18,18,1},{19,0,-1},{19,3,1},{19,19,1},{20,0,-1},{20,3,1},{20,20,1},{21,0,-1},{21,3,1},{21,21,1},{22,0,-1},{22,3,1},{22,22,1},{23,0,-1},{23,3,1},{23,23,1},{24,0,-1},{24,3,1},{24,24,1},{25,0,-1},{25,3,1},{25,25,1},{26,0,-1},{26,3,1},{26,26,1},{27,2,-1},{27,3,1},{27,53,1},{28,2,-1},{28,3,1},{28,27,-1},{28,28,1},{28,53,1},{29,0,1},{29,3,-3},{29,29,3},{30,2,-1},{30,3,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,3,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,3,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,3,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,3,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,3,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,3,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,3,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,3,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,3,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,3,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,3,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,3,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,3,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,3,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,3,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,3,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,3,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,3,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,3,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,3,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,3,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,3,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,3,1},{53,27,-1},{53,53,2},{0,4,1},{1,0,-1},{1,1,1},{1,4,1},{2,0,-1},{2,2,1},{2,4,1},{3,0,-1},{3,3,1},{3,4,1},{4,30,1},{5,0,-1},{5,4,1},{5,5,1},{6,0,-1},{6,4,1},{6,6,1},{7,0,-1},{7,4,1},{7,7,1},{8,0,-1},{8,4,1},{8,8,1},{9,0,-1},{9,4,1},{9,9,1},{10,0,-1},{10,4,1},{10,10,1},{11,0,-1},{11,4,1},{11,11,1},{12,0,-1},{12,4,1},{12,12,1},{13,0,-1},{13,4,1},{13,13,1},{14,0,-1},{14,4,1},{14,14,1},{15,0,-1},{15,4,1},{15,15,1},{16,0,-1},{16,4,1},{16,16,1},{17,0,-1},{17,4,1},{17,17,1},{18,0,-1},{18,4,1},{18,18,1},{19,0,-1},{19,4,1},{19,19,1},{20,0,-1},{20,4,1},{20,20,1},{21,0,-1},{21,4,1},{21,21,1},{22,0,-1},{22,4,1},{22,22,1},{23,0,-1},{23,4,1},{23,23,1},{24,0,-1},{24,4,1},{24,24,1},{25,0,-1},{25,4,1},{25,25,1},{26,0,-1},{26,4,1},{26,26,1},{27,2,-1},{27,4,1},{27,53,1},{28,2,-1},{28,4,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,4,1},{29,27,-1},{29,29,1},{29,53,1},{30,0,1},{30,4,-3},{30,30,3},{31,2,-1},{31,4,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,4,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,4,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,4,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,4,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,4,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,4,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,4,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,4,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,4,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,4,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,4,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,4,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,4,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,4,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,4,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,4,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,4,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,4,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,4,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,4,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,4,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,4,1},{53,27,-1},{53,53,2},{0,5,1},{1,0,-1},{1,1,1},{1,5,1},{2,0,-1},{2,2,1},{2,5,1},{3,0,-1},{3,3,1},{3,5,1},{4,0,-1},{4,4,1},{4,5,1},{5,31,1},{6,0,-1},{6,5,1},{6,6,1},{7,0,-1},{7,5,1},{7,7,1},{8,0,-1},{8,5,1},{8,8,1},{9,0,-1},{9,5,1},{9,9,1},{10,0,-1},{10,5,1},{10,10,1},{11,0,-1},{11,5,1},{11,11,1},{12,0,-1},{12,5,1},{12,12,1},{13,0,-1},{13,5,1},{13,13,1},{14,0,-1},{14,5,1},{14,14,1},{15,0,-1},{15,5,1},{15,15,1},{16,0,-1},{16,5,1},{16,16,1},{17,0,-1},{17,5,1},{17,17,1},{18,0,-1},{18,5,1},{18,18,1},{19,0,-1},{19,5,1},{19,19,1},{20,0,-1},{20,5,1},{20,20,1},{21,0,-1},{21,5,1},{21,21,1},{22,0,-1},{22,5,1},{22,22,1},{23,0,-1},{23,5,1},{23,23,1},{24,0,-1},{24,5,1},{24,24,1},{25,0,-1},{25,5,1},{25,25,1},{26,0,-1},{26,5,1},{26,26,1},{27,2,-1},{27,5,1},{27,53,1},{28,2,-1},{28,5,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,5,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,5,1},{30,27,-1},{30,30,1},{30,53,1},{31,0,1},{31,5,-3},{31,31,3},{32,2,-1},{32,5,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,5,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,5,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,5,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,5,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,5,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,5,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,5,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,5,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,5,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,5,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,5,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,5,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,5,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,5,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,5,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,5,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,5,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,5,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,5,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,5,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,5,1},{53,27,-1},{53,53,2},{0,6,1},{1,0,-1},{1,1,1},{1,6,1},{2,0,-1},{2,2,1},{2,6,1},{3,0,-1},{3,3,1},{3,6,1},{4,0,-1},{4,4,1},{4,6,1},{5,0,-1},{5,5,1},{5,6,1},{6,32,1},{7,0,-1},{7,6,1},{7,7,1},{8,0,-1},{8,6,1},{8,8,1},{9,0,-1},{9,6,1},{9,9,1},{10,0,-1},{10,6,1},{10,10,1},{11,0,-1},{11,6,1},{11,11,1},{12,0,-1},{12,6,1},{12,12,1},{13,0,-1},{13,6,1},{13,13,1},{14,0,-1},{14,6,1},{14,14,1},{15,0,-1},{15,6,1},{15,15,1},{16,0,-1},{16,6,1},{16,16,1},{17,0,-1},{17,6,1},{17,17,1},{18,0,-1},{18,6,1},{18,18,1},{19,0,-1},{19,6,1},{19,19,1},{20,0,-1},{20,6,1},{20,20,1},{21,0,-1},{21,6,1},{21,21,1},{22,0,-1},{22,6,1},{22,22,1},{23,0,-1},{23,6,1},{23,23,1},{24,0,-1},{24,6,1},{24,24,1},{25,0,-1},{25,6,1},{25,25,1},{26,0,-1},{26,6,1},{26,26,1},{27,2,-1},{27,6,1},{27,53,1},{28,2,-1},{28,6,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,6,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,6,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,6,1},{31,27,-1},{31,31,1},{31,53,1},{32,0,1},{32,6,-3},{32,32,3},{33,2,-1},{33,6,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,6,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,6,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,6,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,6,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,6,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,6,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,6,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,6,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,6,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,6,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,6,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,6,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,6,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,6,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,6,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,6,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,6,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,6,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,6,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,6,1},{53,27,-1},{53,53,2},{0,7,1},{1,0,-1},{1,1,1},{1,7,1},{2,0,-1},{2,2,1},{2,7,1},{3,0,-1},{3,3,1},{3,7,1},{4,0,-1},{4,4,1},{4,7,1},{5,0,-1},{5,5,1},{5,7,1},{6,0,-1},{6,6,1},{6,7,1},{7,33,1},{8,0,-1},{8,7,1},{8,8,1},{9,0,-1},{9,7,1},{9,9,1},{10,0,-1},{10,7,1},{10,10,1},{11,0,-1},{11,7,1},{11,11,1},{12,0,-1},{12,7,1},{12,12,1},{13,0,-1},{13,7,1},{13,13,1},{14,0,-1},{14,7,1},{14,14,1},{15,0,-1},{15,7,1},{15,15,1},{16,0,-1},{16,7,1},{16,16,1},{17,0,-1},{17,7,1},{17,17,1},{18,0,-1},{18,7,1},{18,18,1},{19,0,-1},{19,7,1},{19,19,1},{20,0,-1},{20,7,1},{20,20,1},{21,0,-1},{21,7,1},{21,21,1},{22,0,-1},{22,7,1},{22,22,1},{23,0,-1},{23,7,1},{23,23,1},{24,0,-1},{24,7,1},{24,24,1},{25,0,-1},{25,7,1},{25,25,1},{26,0,-1},{26,7,1},{26,26,1},{27,2,-1},{27,7,1},{27,53,1},{28,2,-1},{28,7,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,7,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,7,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,7,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,7,1},{32,27,-1},{32,32,1},{32,53,1},{33,0,1},{33,7,-3},{33,33,3},{34,2,-1},{34,7,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,7,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,7,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,7,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,7,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,7,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,7,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,7,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,7,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,7,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,7,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,7,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,7,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,7,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,7,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,7,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,7,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,7,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,7,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,7,1},{53,27,-1},{53,53,2},{0,8,1},{1,0,-1},{1,1,1},{1,8,1},{2,0,-1},{2,2,1},{2,8,1},{3,0,-1},{3,3,1},{3,8,1},{4,0,-1},{4,4,1},{4,8,1},{5,0,-1},{5,5,1},{5,8,1},{6,0,-1},{6,6,1},{6,8,1},{7,0,-1},{7,7,1},{7,8,1},{8,34,1},{9,0,-1},{9,8,1},{9,9,1},{10,0,-1},{10,8,1},{10,10,1},{11,0,-1},{11,8,1},{11,11,1},{12,0,-1},{12,8,1},{12,12,1},{13,0,-1},{13,8,1},{13,13,1},{14,0,-1},{14,8,1},{14,14,1},{15,0,-1},{15,8,1},{15,15,1},{16,0,-1},{16,8,1},{16,16,1},{17,0,-1},{17,8,1},{17,17,1},{18,0,-1},{18,8,1},{18,18,1},{19,0,-1},{19,8,1},{19,19,1},{20,0,-1},{20,8,1},{20,20,1},{21,0,-1},{21,8,1},{21,21,1},{22,0,-1},{22,8,1},{22,22,1},{23,0,-1},{23,8,1},{23,23,1},{24,0,-1},{24,8,1},{24,24,1},{25,0,-1},{25,8,1},{25,25,1},{26,0,-1},{26,8,1},{26,26,1},{27,2,-1},{27,8,1},{27,53,1},{28,2,-1},{28,8,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,8,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,8,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,8,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,8,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,8,1},{33,27,-1},{33,33,1},{33,53,1},{34,0,1},{34,8,-3},{34,34,3},{35,2,-1},{35,8,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,8,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,8,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,8,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,8,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,8,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,8,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,8,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,8,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,8,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,8,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,8,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,8,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,8,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,8,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,8,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,8,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,8,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,8,1},{53,27,-1},{53,53,2},{0,9,1},{1,0,-1},{1,1,1},{1,9,1},{2,0,-1},{2,2,1},{2,9,1},{3,0,-1},{3,3,1},{3,9,1},{4,0,-1},{4,4,1},{4,9,1},{5,0,-1},{5,5,1},{5,9,1},{6,0,-1},{6,6,1},{6,9,1},{7,0,-1},{7,7,1},{7,9,1},{8,0,-1},{8,8,1},{8,9,1},{9,35,1},{10,0,-1},{10,9,1},{10,10,1},{11,0,-1},{11,9,1},{11,11,1},{12,0,-1},{12,9,1},{12,12,1},{13,0,-1},{13,9,1},{13,13,1},{14,0,-1},{14,9,1},{14,14,1},{15,0,-1},{15,9,1},{15,15,1},{16,0,-1},{16,9,1},{16,16,1},{17,0,-1},{17,9,1},{17,17,1},{18,0,-1},{18,9,1},{18,18,1},{19,0,-1},{19,9,1},{19,19,1},{20,0,-1},{20,9,1},{20,20,1},{21,0,-1},{21,9,1},{21,21,1},{22,0,-1},{22,9,1},{22,22,1},{23,0,-1},{23,9,1},{23,23,1},{24,0,-1},{24,9,1},{24,24,1},{25,0,-1},{25,9,1},{25,25,1},{26,0,-1},{26,9,1},{26,26,1},{27,2,-1},{27,9,1},{27,53,1},{28,2,-1},{28,9,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,9,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,9,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,9,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,9,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,9,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,9,1},{34,27,-1},{34,34,1},{34,53,1},{35,0,1},{35,9,-3},{35,35,3},{36,2,-1},{36,9,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,9,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,9,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,9,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,9,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,9,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,9,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,9,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,9,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,9,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,9,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,9,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,9,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,9,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,9,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,9,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,9,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,9,1},{53,27,-1},{53,53,2},{0,10,1},{1,0,-1},{1,1,1},{1,10,1},{2,0,-1},{2,2,1},{2,10,1},{3,0,-1},{3,3,1},{3,10,1},{4,0,-1},{4,4,1},{4,10,1},{5,0,-1},{5,5,1},{5,10,1},{6,0,-1},{6,6,1},{6,10,1},{7,0,-1},{7,7,1},{7,10,1},{8,0,-1},{8,8,1},{8,10,1},{9,0,-1},{9,9,1},{9,10,1},{10,36,1},{11,0,-1},{11,10,1},{11,11,1},{12,0,-1},{12,10,1},{12,12,1},{13,0,-1},{13,10,1},{13,13,1},{14,0,-1},{14,10,1},{14,14,1},{15,0,-1},{15,10,1},{15,15,1},{16,0,-1},{16,10,1},{16,16,1},{17,0,-1},{17,10,1},{17,17,1},{18,0,-1},{18,10,1},{18,18,1},{19,0,-1},{19,10,1},{19,19,1},{20,0,-1},{20,10,1},{20,20,1},{21,0,-1},{21,10,1},{21,21,1},{22,0,-1},{22,10,1},{22,22,1},{23,0,-1},{23,10,1},{23,23,1},{24,0,-1},{24,10,1},{24,24,1},{25,0,-1},{25,10,1},{25,25,1},{26,0,-1},{26,10,1},{26,26,1},{27,2,-1},{27,10,1},{27,53,1},{28,2,-1},{28,10,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,10,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,10,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,10,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,10,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,10,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,10,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,10,1},{35,27,-1},{35,35,1},{35,53,1},{36,0,1},{36,10,-3},{36,36,3},{37,2,-1},{37,10,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,10,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,10,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,10,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,10,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,10,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,10,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,10,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,10,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,10,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,10,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,10,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,10,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,10,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,10,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,10,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,10,1},{53,27,-1},{53,53,2},{0,11,1},{1,0,-1},{1,1,1},{1,11,1},{2,0,-1},{2,2,1},{2,11,1},{3,0,-1},{3,3,1},{3,11,1},{4,0,-1},{4,4,1},{4,11,1},{5,0,-1},{5,5,1},{5,11,1},{6,0,-1},{6,6,1},{6,11,1},{7,0,-1},{7,7,1},{7,11,1},{8,0,-1},{8,8,1},{8,11,1},{9,0,-1},{9,9,1},{9,11,1},{10,0,-1},{10,10,1},{10,11,1},{11,37,1},{12,0,-1},{12,11,1},{12,12,1},{13,0,-1},{13,11,1},{13,13,1},{14,0,-1},{14,11,1},{14,14,1},{15,0,-1},{15,11,1},{15,15,1},{16,0,-1},{16,11,1},{16,16,1},{17,0,-1},{17,11,1},{17,17,1},{18,0,-1},{18,11,1},{18,18,1},{19,0,-1},{19,11,1},{19,19,1},{20,0,-1},{20,11,1},{20,20,1},{21,0,-1},{21,11,1},{21,21,1},{22,0,-1},{22,11,1},{22,22,1},{23,0,-1},{23,11,1},{23,23,1},{24,0,-1},{24,11,1},{24,24,1},{25,0,-1},{25,11,1},{25,25,1},{26,0,-1},{26,11,1},{26,26,1},{27,2,-1},{27,11,1},{27,53,1},{28,2,-1},{28,11,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,11,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,11,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,11,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,11,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,11,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,11,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,11,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,11,1},{36,27,-1},{36,36,1},{36,53,1},{37,0,1},{37,11,-3},{37,37,3},{38,2,-1},{38,11,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,11,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,11,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,11,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,11,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,11,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,11,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,11,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,11,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,11,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,11,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,11,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,11,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,11,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,11,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,11,1},{53,27,-1},{53,53,2},{0,12,1},{1,0,-1},{1,1,1},{1,12,1},{2,0,-1},{2,2,1},{2,12,1},{3,0,-1},{3,3,1},{3,12,1},{4,0,-1},{4,4,1},{4,12,1},{5,0,-1},{5,5,1},{5,12,1},{6,0,-1},{6,6,1},{6,12,1},{7,0,-1},{7,7,1},{7,12,1},{8,0,-1},{8,8,1},{8,12,1},{9,0,-1},{9,9,1},{9,12,1},{10,0,-1},{10,10,1},{10,12,1},{11,0,-1},{11,11,1},{11,12,1},{12,38,1},{13,0,-1},{13,12,1},{13,13,1},{14,0,-1},{14,12,1},{14,14,1},{15,0,-1},{15,12,1},{15,15,1},{16,0,-1},{16,12,1},{16,16,1},{17,0,-1},{17,12,1},{17,17,1},{18,0,-1},{18,12,1},{18,18,1},{19,0,-1},{19,12,1},{19,19,1},{20,0,-1},{20,12,1},{20,20,1},{21,0,-1},{21,12,1},{21,21,1},{22,0,-1},{22,12,1},{22,22,1},{23,0,-1},{23,12,1},{23,23,1},{24,0,-1},{24,12,1},{24,24,1},{25,0,-1},{25,12,1},{25,25,1},{26,0,-1},{26,12,1},{26,26,1},{27,2,-1},{27,12,1},{27,53,1},{28,2,-1},{28,12,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,12,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,12,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,12,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,12,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,12,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,12,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,12,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,12,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,12,1},{37,27,-1},{37,37,1},{37,53,1},{38,0,1},{38,12,-3},{38,38,3},{39,2,-1},{39,12,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,12,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,12,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,12,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,12,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,12,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,12,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,12,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,12,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,12,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,12,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,12,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,12,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,12,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,12,1},{53,27,-1},{53,53,2},{0,13,1},{1,0,-1},{1,1,1},{1,13,1},{2,0,-1},{2,2,1},{2,13,1},{3,0,-1},{3,3,1},{3,13,1},{4,0,-1},{4,4,1},{4,13,1},{5,0,-1},{5,5,1},{5,13,1},{6,0,-1},{6,6,1},{6,13,1},{7,0,-1},{7,7,1},{7,13,1},{8,0,-1},{8,8,1},{8,13,1},{9,0,-1},{9,9,1},{9,13,1},{10,0,-1},{10,10,1},{10,13,1},{11,0,-1},{11,11,1},{11,13,1},{12,0,-1},{12,12,1},{12,13,1},{13,39,1},{14,0,-1},{14,13,1},{14,14,1},{15,0,-1},{15,13,1},{15,15,1},{16,0,-1},{16,13,1},{16,16,1},{17,0,-1},{17,13,1},{17,17,1},{18,0,-1},{18,13,1},{18,18,1},{19,0,-1},{19,13,1},{19,19,1},{20,0,-1},{20,13,1},{20,20,1},{21,0,-1},{21,13,1},{21,21,1},{22,0,-1},{22,13,1},{22,22,1},{23,0,-1},{23,13,1},{23,23,1},{24,0,-1},{24,13,1},{24,24,1},{25,0,-1},{25,13,1},{25,25,1},{26,0,-1},{26,13,1},{26,26,1},{27,2,-1},{27,13,1},{27,53,1},{28,2,-1},{28,13,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,13,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,13,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,13,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,13,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,13,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,13,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,13,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,13,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,13,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,13,1},{38,27,-1},{38,38,1},{38,53,1},{39,0,1},{39,13,-3},{39,39,3},{40,2,-1},{40,13,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,13,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,13,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,13,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,13,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,13,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,13,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,13,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,13,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,13,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,13,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,13,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,13,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,13,1},{53,27,-1},{53,53,2},{0,14,1},{1,0,-1},{1,1,1},{1,14,1},{2,0,-1},{2,2,1},{2,14,1},{3,0,-1},{3,3,1},{3,14,1},{4,0,-1},{4,4,1},{4,14,1},{5,0,-1},{5,5,1},{5,14,1},{6,0,-1},{6,6,1},{6,14,1},{7,0,-1},{7,7,1},{7,14,1},{8,0,-1},{8,8,1},{8,14,1},{9,0,-1},{9,9,1},{9,14,1},{10,0,-1},{10,10,1},{10,14,1},{11,0,-1},{11,11,1},{11,14,1},{12,0,-1},{12,12,1},{12,14,1},{13,0,-1},{13,13,1},{13,14,1},{14,40,1},{15,0,-1},{15,14,1},{15,15,1},{16,0,-1},{16,14,1},{16,16,1},{17,0,-1},{17,14,1},{17,17,1},{18,0,-1},{18,14,1},{18,18,1},{19,0,-1},{19,14,1},{19,19,1},{20,0,-1},{20,14,1},{20,20,1},{21,0,-1},{21,14,1},{21,21,1},{22,0,-1},{22,14,1},{22,22,1},{23,0,-1},{23,14,1},{23,23,1},{24,0,-1},{24,14,1},{24,24,1},{25,0,-1},{25,14,1},{25,25,1},{26,0,-1},{26,14,1},{26,26,1},{27,2,-1},{27,14,1},{27,53,1},{28,2,-1},{28,14,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,14,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,14,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,14,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,14,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,14,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,14,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,14,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,14,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,14,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,14,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,14,1},{39,27,-1},{39,39,1},{39,53,1},{40,0,1},{40,14,-3},{40,40,3},{41,2,-1},{41,14,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,14,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,14,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,14,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,14,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,14,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,14,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,14,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,14,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,14,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,14,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,14,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,14,1},{53,27,-1},{53,53,2},{0,15,1},{1,0,-1},{1,1,1},{1,15,1},{2,0,-1},{2,2,1},{2,15,1},{3,0,-1},{3,3,1},{3,15,1},{4,0,-1},{4,4,1},{4,15,1},{5,0,-1},{5,5,1},{5,15,1},{6,0,-1},{6,6,1},{6,15,1},{7,0,-1},{7,7,1},{7,15,1},{8,0,-1},{8,8,1},{8,15,1},{9,0,-1},{9,9,1},{9,15,1},{10,0,-1},{10,10,1},{10,15,1},{11,0,-1},{11,11,1},{11,15,1},{12,0,-1},{12,12,1},{12,15,1},{13,0,-1},{13,13,1},{13,15,1},{14,0,-1},{14,14,1},{14,15,1},{15,41,1},{16,0,-1},{16,15,1},{16,16,1},{17,0,-1},{17,15,1},{17,17,1},{18,0,-1},{18,15,1},{18,18,1},{19,0,-1},{19,15,1},{19,19,1},{20,0,-1},{20,15,1},{20,20,1},{21,0,-1},{21,15,1},{21,21,1},{22,0,-1},{22,15,1},{22,22,1},{23,0,-1},{23,15,1},{23,23,1},{24,0,-1},{24,15,1},{24,24,1},{25,0,-1},{25,15,1},{25,25,1},{26,0,-1},{26,15,1},{26,26,1},{27,2,-1},{27,15,1},{27,53,1},{28,2,-1},{28,15,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,15,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,15,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,15,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,15,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,15,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,15,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,15,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,15,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,15,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,15,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,15,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,15,1},{40,27,-1},{40,40,1},{40,53,1},{41,0,1},{41,15,-3},{41,41,3},{42,2,-1},{42,15,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,15,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,15,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,15,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,15,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,15,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,15,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,15,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,15,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,15,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,15,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,15,1},{53,27,-1},{53,53,2},{0,16,1},{1,0,-1},{1,1,1},{1,16,1},{2,0,-1},{2,2,1},{2,16,1},{3,0,-1},{3,3,1},{3,16,1},{4,0,-1},{4,4,1},{4,16,1},{5,0,-1},{5,5,1},{5,16,1},{6,0,-1},{6,6,1},{6,16,1},{7,0,-1},{7,7,1},{7,16,1},{8,0,-1},{8,8,1},{8,16,1},{9,0,-1},{9,9,1},{9,16,1},{10,0,-1},{10,10,1},{10,16,1},{11,0,-1},{11,11,1},{11,16,1},{12,0,-1},{12,12,1},{12,16,1},{13,0,-1},{13,13,1},{13,16,1},{14,0,-1},{14,14,1},{14,16,1},{15,0,-1},{15,15,1},{15,16,1},{16,42,1},{17,0,-1},{17,16,1},{17,17,1},{18,0,-1},{18,16,1},{18,18,1},{19,0,-1},{19,16,1},{19,19,1},{20,0,-1},{20,16,1},{20,20,1},{21,0,-1},{21,16,1},{21,21,1},{22,0,-1},{22,16,1},{22,22,1},{23,0,-1},{23,16,1},{23,23,1},{24,0,-1},{24,16,1},{24,24,1},{25,0,-1},{25,16,1},{25,25,1},{26,0,-1},{26,16,1},{26,26,1},{27,2,-1},{27,16,1},{27,53,1},{28,2,-1},{28,16,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,16,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,16,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,16,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,16,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,16,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,16,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,16,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,16,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,16,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,16,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,16,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,16,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,16,1},{41,27,-1},{41,41,1},{41,53,1},{42,0,1},{42,16,-3},{42,42,3},{43,2,-1},{43,16,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,16,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,16,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,16,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,16,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,16,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,16,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,16,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,16,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,16,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,16,1},{53,27,-1},{53,53,2},{0,17,1},{1,0,-1},{1,1,1},{1,17,1},{2,0,-1},{2,2,1},{2,17,1},{3,0,-1},{3,3,1},{3,17,1},{4,0,-1},{4,4,1},{4,17,1},{5,0,-1},{5,5,1},{5,17,1},{6,0,-1},{6,6,1},{6,17,1},{7,0,-1},{7,7,1},{7,17,1},{8,0,-1},{8,8,1},{8,17,1},{9,0,-1},{9,9,1},{9,17,1},{10,0,-1},{10,10,1},{10,17,1},{11,0,-1},{11,11,1},{11,17,1},{12,0,-1},{12,12,1},{12,17,1},{13,0,-1},{13,13,1},{13,17,1},{14,0,-1},{14,14,1},{14,17,1},{15,0,-1},{15,15,1},{15,17,1},{16,0,-1},{16,16,1},{16,17,1},{17,43,1},{18,0,-1},{18,17,1},{18,18,1},{19,0,-1},{19,17,1},{19,19,1},{20,0,-1},{20,17,1},{20,20,1},{21,0,-1},{21,17,1},{21,21,1},{22,0,-1},{22,17,1},{22,22,1},{23,0,-1},{23,17,1},{23,23,1},{24,0,-1},{24,17,1},{24,24,1},{25,0,-1},{25,17,1},{25,25,1},{26,0,-1},{26,17,1},{26,26,1},{27,2,-1},{27,17,1},{27,53,1},{28,2,-1},{28,17,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,17,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,17,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,17,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,17,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,17,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,17,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,17,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,17,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,17,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,17,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,17,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,17,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,17,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,17,1},{42,27,-1},{42,42,1},{42,53,1},{43,0,1},{43,17,-3},{43,43,3},{44,2,-1},{44,17,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,17,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,17,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,17,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,17,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,17,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,17,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,17,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,17,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,17,1},{53,27,-1},{53,53,2},{0,18,1},{1,0,-1},{1,1,1},{1,18,1},{2,0,-1},{2,2,1},{2,18,1},{3,0,-1},{3,3,1},{3,18,1},{4,0,-1},{4,4,1},{4,18,1},{5,0,-1},{5,5,1},{5,18,1},{6,0,-1},{6,6,1},{6,18,1},{7,0,-1},{7,7,1},{7,18,1},{8,0,-1},{8,8,1},{8,18,1},{9,0,-1},{9,9,1},{9,18,1},{10,0,-1},{10,10,1},{10,18,1},{11,0,-1},{11,11,1},{11,18,1},{12,0,-1},{12,12,1},{12,18,1},{13,0,-1},{13,13,1},{13,18,1},{14,0,-1},{14,14,1},{14,18,1},{15,0,-1},{15,15,1},{15,18,1},{16,0,-1},{16,16,1},{16,18,1},{17,0,-1},{17,17,1},{17,18,1},{18,44,1},{19,0,-1},{19,18,1},{19,19,1},{20,0,-1},{20,18,1},{20,20,1},{21,0,-1},{21,18,1},{21,21,1},{22,0,-1},{22,18,1},{22,22,1},{23,0,-1},{23,18,1},{23,23,1},{24,0,-1},{24,18,1},{24,24,1},{25,0,-1},{25,18,1},{25,25,1},{26,0,-1},{26,18,1},{26,26,1},{27,2,-1},{27,18,1},{27,53,1},{28,2,-1},{28,18,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,18,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,18,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,18,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,18,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,18,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,18,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,18,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,18,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,18,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,18,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,18,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,18,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,18,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,18,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,18,1},{43,27,-1},{43,43,1},{43,53,1},{44,0,1},{44,18,-3},{44,44,3},{45,2,-1},{45,18,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,18,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,18,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,18,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,18,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,18,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,18,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,18,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,18,1},{53,27,-1},{53,53,2},{0,19,1},{1,0,-1},{1,1,1},{1,19,1},{2,0,-1},{2,2,1},{2,19,1},{3,0,-1},{3,3,1},{3,19,1},{4,0,-1},{4,4,1},{4,19,1},{5,0,-1},{5,5,1},{5,19,1},{6,0,-1},{6,6,1},{6,19,1},{7,0,-1},{7,7,1},{7,19,1},{8,0,-1},{8,8,1},{8,19,1},{9,0,-1},{9,9,1},{9,19,1},{10,0,-1},{10,10,1},{10,19,1},{11,0,-1},{11,11,1},{11,19,1},{12,0,-1},{12,12,1},{12,19,1},{13,0,-1},{13,13,1},{13,19,1},{14,0,-1},{14,14,1},{14,19,1},{15,0,-1},{15,15,1},{15,19,1},{16,0,-1},{16,16,1},{16,19,1},{17,0,-1},{17,17,1},{17,19,1},{18,0,-1},{18,18,1},{18,19,1},{19,45,1},{20,0,-1},{20,19,1},{20,20,1},{21,0,-1},{21,19,1},{21,21,1},{22,0,-1},{22,19,1},{22,22,1},{23,0,-1},{23,19,1},{23,23,1},{24,0,-1},{24,19,1},{24,24,1},{25,0,-1},{25,19,1},{25,25,1},{26,0,-1},{26,19,1},{26,26,1},{27,2,-1},{27,19,1},{27,53,1},{28,2,-1},{28,19,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,19,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,19,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,19,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,19,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,19,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,19,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,19,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,19,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,19,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,19,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,19,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,19,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,19,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,19,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,19,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,19,1},{44,27,-1},{44,44,1},{44,53,1},{45,0,1},{45,19,-3},{45,45,3},{46,2,-1},{46,19,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,19,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,19,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,19,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,19,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,19,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,19,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,19,1},{53,27,-1},{53,53,2},{0,20,1},{1,0,-1},{1,1,1},{1,20,1},{2,0,-1},{2,2,1},{2,20,1},{3,0,-1},{3,3,1},{3,20,1},{4,0,-1},{4,4,1},{4,20,1},{5,0,-1},{5,5,1},{5,20,1},{6,0,-1},{6,6,1},{6,20,1},{7,0,-1},{7,7,1},{7,20,1},{8,0,-1},{8,8,1},{8,20,1},{9,0,-1},{9,9,1},{9,20,1},{10,0,-1},{10,10,1},{10,20,1},{11,0,-1},{11,11,1},{11,20,1},{12,0,-1},{12,12,1},{12,20,1},{13,0,-1},{13,13,1},{13,20,1},{14,0,-1},{14,14,1},{14,20,1},{15,0,-1},{15,15,1},{15,20,1},{16,0,-1},{16,16,1},{16,20,1},{17,0,-1},{17,17,1},{17,20,1},{18,0,-1},{18,18,1},{18,20,1},{19,0,-1},{19,19,1},{19,20,1},{20,46,1},{21,0,-1},{21,20,1},{21,21,1},{22,0,-1},{22,20,1},{22,22,1},{23,0,-1},{23,20,1},{23,23,1},{24,0,-1},{24,20,1},{24,24,1},{25,0,-1},{25,20,1},{25,25,1},{26,0,-1},{26,20,1},{26,26,1},{27,2,-1},{27,20,1},{27,53,1},{28,2,-1},{28,20,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,20,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,20,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,20,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,20,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,20,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,20,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,20,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,20,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,20,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,20,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,20,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,20,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,20,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,20,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,20,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,20,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,20,1},{45,27,-1},{45,45,1},{45,53,1},{46,0,1},{46,20,-3},{46,46,3},{47,2,-1},{47,20,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,20,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,20,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,20,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,20,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,20,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,20,1},{53,27,-1},{53,53,2},{0,21,1},{1,0,-1},{1,1,1},{1,21,1},{2,0,-1},{2,2,1},{2,21,1},{3,0,-1},{3,3,1},{3,21,1},{4,0,-1},{4,4,1},{4,21,1},{5,0,-1},{5,5,1},{5,21,1},{6,0,-1},{6,6,1},{6,21,1},{7,0,-1},{7,7,1},{7,21,1},{8,0,-1},{8,8,1},{8,21,1},{9,0,-1},{9,9,1},{9,21,1},{10,0,-1},{10,10,1},{10,21,1},{11,0,-1},{11,11,1},{11,21,1},{12,0,-1},{12,12,1},{12,21,1},{13,0,-1},{13,13,1},{13,21,1},{14,0,-1},{14,14,1},{14,21,1},{15,0,-1},{15,15,1},{15,21,1},{16,0,-1},{16,16,1},{16,21,1},{17,0,-1},{17,17,1},{17,21,1},{18,0,-1},{18,18,1},{18,21,1},{19,0,-1},{19,19,1},{19,21,1},{20,0,-1},{20,20,1},{20,21,1},{21,47,1},{22,0,-1},{22,21,1},{22,22,1},{23,0,-1},{23,21,1},{23,23,1},{24,0,-1},{24,21,1},{24,24,1},{25,0,-1},{25,21,1},{25,25,1},{26,0,-1},{26,21,1},{26,26,1},{27,2,-1},{27,21,1},{27,53,1},{28,2,-1},{28,21,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,21,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,21,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,21,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,21,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,21,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,21,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,21,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,21,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,21,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,21,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,21,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,21,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,21,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,21,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,21,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,21,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,21,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,21,1},{46,27,-1},{46,46,1},{46,53,1},{47,0,1},{47,21,-3},{47,47,3},{48,2,-1},{48,21,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,21,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,21,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,21,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,21,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,21,1},{53,27,-1},{53,53,2},{0,22,1},{1,0,-1},{1,1,1},{1,22,1},{2,0,-1},{2,2,1},{2,22,1},{3,0,-1},{3,3,1},{3,22,1},{4,0,-1},{4,4,1},{4,22,1},{5,0,-1},{5,5,1},{5,22,1},{6,0,-1},{6,6,1},{6,22,1},{7,0,-1},{7,7,1},{7,22,1},{8,0,-1},{8,8,1},{8,22,1},{9,0,-1},{9,9,1},{9,22,1},{10,0,-1},{10,10,1},{10,22,1},{11,0,-1},{11,11,1},{11,22,1},{12,0,-1},{12,12,1},{12,22,1},{13,0,-1},{13,13,1},{13,22,1},{14,0,-1},{14,14,1},{14,22,1},{15,0,-1},{15,15,1},{15,22,1},{16,0,-1},{16,16,1},{16,22,1},{17,0,-1},{17,17,1},{17,22,1},{18,0,-1},{18,18,1},{18,22,1},{19,0,-1},{19,19,1},{19,22,1},{20,0,-1},{20,20,1},{20,22,1},{21,0,-1},{21,21,1},{21,22,1},{22,48,1},{23,0,-1},{23,22,1},{23,23,1},{24,0,-1},{24,22,1},{24,24,1},{25,0,-1},{25,22,1},{25,25,1},{26,0,-1},{26,22,1},{26,26,1},{27,2,-1},{27,22,1},{27,53,1},{28,2,-1},{28,22,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,22,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,22,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,22,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,22,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,22,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,22,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,22,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,22,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,22,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,22,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,22,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,22,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,22,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,22,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,22,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,22,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,22,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,22,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,22,1},{47,27,-1},{47,47,1},{47,53,1},{48,0,1},{48,22,-3},{48,48,3},{49,2,-1},{49,22,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,22,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,22,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,22,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,22,1},{53,27,-1},{53,53,2},{0,23,1},{1,0,-1},{1,1,1},{1,23,1},{2,0,-1},{2,2,1},{2,23,1},{3,0,-1},{3,3,1},{3,23,1},{4,0,-1},{4,4,1},{4,23,1},{5,0,-1},{5,5,1},{5,23,1},{6,0,-1},{6,6,1},{6,23,1},{7,0,-1},{7,7,1},{7,23,1},{8,0,-1},{8,8,1},{8,23,1},{9,0,-1},{9,9,1},{9,23,1},{10,0,-1},{10,10,1},{10,23,1},{11,0,-1},{11,11,1},{11,23,1},{12,0,-1},{12,12,1},{12,23,1},{13,0,-1},{13,13,1},{13,23,1},{14,0,-1},{14,14,1},{14,23,1},{15,0,-1},{15,15,1},{15,23,1},{16,0,-1},{16,16,1},{16,23,1},{17,0,-1},{17,17,1},{17,23,1},{18,0,-1},{18,18,1},{18,23,1},{19,0,-1},{19,19,1},{19,23,1},{20,0,-1},{20,20,1},{20,23,1},{21,0,-1},{21,21,1},{21,23,1},{22,0,-1},{22,22,1},{22,23,1},{23,49,1},{24,0,-1},{24,23,1},{24,24,1},{25,0,-1},{25,23,1},{25,25,1},{26,0,-1},{26,23,1},{26,26,1},{27,2,-1},{27,23,1},{27,53,1},{28,2,-1},{28,23,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,23,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,23,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,23,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,23,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,23,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,23,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,23,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,23,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,23,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,23,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,23,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,23,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,23,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,23,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,23,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,23,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,23,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,23,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,23,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,23,1},{48,27,-1},{48,48,1},{48,53,1},{49,0,1},{49,23,-3},{49,49,3},{50,2,-1},{50,23,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,23,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,23,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,23,1},{53,27,-1},{53,53,2},{0,24,1},{1,0,-1},{1,1,1},{1,24,1},{2,0,-1},{2,2,1},{2,24,1},{3,0,-1},{3,3,1},{3,24,1},{4,0,-1},{4,4,1},{4,24,1},{5,0,-1},{5,5,1},{5,24,1},{6,0,-1},{6,6,1},{6,24,1},{7,0,-1},{7,7,1},{7,24,1},{8,0,-1},{8,8,1},{8,24,1},{9,0,-1},{9,9,1},{9,24,1},{10,0,-1},{10,10,1},{10,24,1},{11,0,-1},{11,11,1},{11,24,1},{12,0,-1},{12,12,1},{12,24,1},{13,0,-1},{13,13,1},{13,24,1},{14,0,-1},{14,14,1},{14,24,1},{15,0,-1},{15,15,1},{15,24,1},{16,0,-1},{16,16,1},{16,24,1},{17,0,-1},{17,17,1},{17,24,1},{18,0,-1},{18,18,1},{18,24,1},{19,0,-1},{19,19,1},{19,24,1},{20,0,-1},{20,20,1},{20,24,1},{21,0,-1},{21,21,1},{21,24,1},{22,0,-1},{22,22,1},{22,24,1},{23,0,-1},{23,23,1},{23,24,1},{24,50,1},{25,0,-1},{25,24,1},{25,25,1},{26,0,-1},{26,24,1},{26,26,1},{27,2,-1},{27,24,1},{27,53,1},{28,2,-1},{28,24,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,24,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,24,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,24,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,24,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,24,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,24,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,24,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,24,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,24,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,24,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,24,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,24,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,24,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,24,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,24,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,24,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,24,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,24,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,24,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,24,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,24,1},{49,27,-1},{49,49,1},{49,53,1},{50,0,1},{50,24,-3},{50,50,3},{51,2,-1},{51,24,1},{51,27,-1},{51,51,1},{51,53,1},{52,2,-1},{52,24,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,24,1},{53,27,-1},{53,53,2},{0,25,1},{1,0,-1},{1,1,1},{1,25,1},{2,0,-1},{2,2,1},{2,25,1},{3,0,-1},{3,3,1},{3,25,1},{4,0,-1},{4,4,1},{4,25,1},{5,0,-1},{5,5,1},{5,25,1},{6,0,-1},{6,6,1},{6,25,1},{7,0,-1},{7,7,1},{7,25,1},{8,0,-1},{8,8,1},{8,25,1},{9,0,-1},{9,9,1},{9,25,1},{10,0,-1},{10,10,1},{10,25,1},{11,0,-1},{11,11,1},{11,25,1},{12,0,-1},{12,12,1},{12,25,1},{13,0,-1},{13,13,1},{13,25,1},{14,0,-1},{14,14,1},{14,25,1},{15,0,-1},{15,15,1},{15,25,1},{16,0,-1},{16,16,1},{16,25,1},{17,0,-1},{17,17,1},{17,25,1},{18,0,-1},{18,18,1},{18,25,1},{19,0,-1},{19,19,1},{19,25,1},{20,0,-1},{20,20,1},{20,25,1},{21,0,-1},{21,21,1},{21,25,1},{22,0,-1},{22,22,1},{22,25,1},{23,0,-1},{23,23,1},{23,25,1},{24,0,-1},{24,24,1},{24,25,1},{25,51,1},{26,0,-1},{26,25,1},{26,26,1},{27,2,-1},{27,25,1},{27,53,1},{28,2,-1},{28,25,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,25,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,25,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,25,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,25,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,25,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,25,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,25,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,25,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,25,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,25,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,25,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,25,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,25,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,25,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,25,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,25,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,25,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,25,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,25,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,25,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,25,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,25,1},{50,27,-1},{50,50,1},{50,53,1},{51,0,1},{51,25,-3},{51,51,3},{52,2,-1},{52,25,1},{52,27,-1},{52,52,1},{52,53,1},{53,2,-1},{53,25,1},{53,27,-1},{53,53,2},{0,26,1},{1,0,-1},{1,1,1},{1,26,1},{2,0,-1},{2,2,1},{2,26,1},{3,0,-1},{3,3,1},{3,26,1},{4,0,-1},{4,4,1},{4,26,1},{5,0,-1},{5,5,1},{5,26,1},{6,0,-1},{6,6,1},{6,26,1},{7,0,-1},{7,7,1},{7,26,1},{8,0,-1},{8,8,1},{8,26,1},{9,0,-1},{9,9,1},{9,26,1},{10,0,-1},{10,10,1},{10,26,1},{11,0,-1},{11,11,1},{11,26,1},{12,0,-1},{12,12,1},{12,26,1},{13,0,-1},{13,13,1},{13,26,1},{14,0,-1},{14,14,1},{14,26,1},{15,0,-1},{15,15,1},{15,26,1},{16,0,-1},{16,16,1},{16,26,1},{17,0,-1},{17,17,1},{17,26,1},{18,0,-1},{18,18,1},{18,26,1},{19,0,-1},{19,19,1},{19,26,1},{20,0,-1},{20,20,1},{20,26,1},{21,0,-1},{21,21,1},{21,26,1},{22,0,-1},{22,22,1},{22,26,1},{23,0,-1},{23,23,1},{23,26,1},{24,0,-1},{24,24,1},{24,26,1},{25,0,-1},{25,25,1},{25,26,1},{26,52,1},{27,2,-1},{27,26,1},{27,53,1},{28,2,-1},{28,26,1},{28,27,-1},{28,28,1},{28,53,1},{29,2,-1},{29,26,1},{29,27,-1},{29,29,1},{29,53,1},{30,2,-1},{30,26,1},{30,27,-1},{30,30,1},{30,53,1},{31,2,-1},{31,26,1},{31,27,-1},{31,31,1},{31,53,1},{32,2,-1},{32,26,1},{32,27,-1},{32,32,1},{32,53,1},{33,2,-1},{33,26,1},{33,27,-1},{33,33,1},{33,53,1},{34,2,-1},{34,26,1},{34,27,-1},{34,34,1},{34,53,1},{35,2,-1},{35,26,1},{35,27,-1},{35,35,1},{35,53,1},{36,2,-1},{36,26,1},{36,27,-1},{36,36,1},{36,53,1},{37,2,-1},{37,26,1},{37,27,-1},{37,37,1},{37,53,1},{38,2,-1},{38,26,1},{38,27,-1},{38,38,1},{38,53,1},{39,2,-1},{39,26,1},{39,27,-1},{39,39,1},{39,53,1},{40,2,-1},{40,26,1},{40,27,-1},{40,40,1},{40,53,1},{41,2,-1},{41,26,1},{41,27,-1},{41,41,1},{41,53,1},{42,2,-1},{42,26,1},{42,27,-1},{42,42,1},{42,53,1},{43,2,-1},{43,26,1},{43,27,-1},{43,43,1},{43,53,1},{44,2,-1},{44,26,1},{44,27,-1},{44,44,1},{44,53,1},{45,2,-1},{45,26,1},{45,27,-1},{45,45,1},{45,53,1},{46,2,-1},{46,26,1},{46,27,-1},{46,46,1},{46,53,1},{47,2,-1},{47,26,1},{47,27,-1},{47,47,1},{47,53,1},{48,2,-1},{48,26,1},{48,27,-1},{48,48,1},{48,53,1},{49,2,-1},{49,26,1},{49,27,-1},{49,49,1},{49,53,1},{50,2,-1},{50,26,1},{50,27,-1},{50,50,1},{50,53,1},{51,2,-1},{51,26,1},{51,27,-1},{51,51,1},{51,53,1},{52,0,1},{52,26,-3},{52,52,3},{53,2,-1},{53,26,1},{53,27,-1},{53,53,2} }; int offset[COL + 1] = { 0,209,367,574,781,988,1195,1402,1609,1816,2023,2230,2437,2644,2851,3058,3265,3472,3679,3886,4093,4300,4507,4714,4921,5128,5335 }; VTYPE vecP[DIM] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }; // -------------------------------------------------------------- // ここ以降は書き換えなくて良い. array<VTYPE, DIM> dp; dp.fill(0); dp[0] = 1; auto apply = [&](const array<VTYPE, DIM>& x, int col) { array<VTYPE, DIM> z; z.fill(0); repi(pt, offset[col], offset[col + 1] - 1) { auto [i, j, v] = matAs[pt]; z[j] += x[i] * v; } return z; }; repe(c, s) { dp = apply(dp, c - '0'); } VTYPE res = 0; rep(i, DIM) res += dp[i] * vecP[i]; return res; } int main() { // input_from_file("input.txt"); // output_to_file("output.txt"); //【方法】 // 愚直を書いて集めたデータをもとに遷移行列を復元する. //【使い方】 // 1. mint naive(文字列) を実装する. // 2. embed_coefs(文字の種類数); を実行する. // 3. 出力を solve() 内に貼る. // 4. auto dp = solve<答えの型>(文字列) で勝手に DP してくれる. // embed_coefs(26, 3, 705); string s; cin >> s; rep(i, sz(s)) s[i] = s[i] - 'A' + '0'; dump("naive:", naive(s)); dump("======"); cout << solve<ll>(s) << "\n"; }