problem_id
stringlengths
6
6
language
stringclasses
2 values
original_status
stringclasses
3 values
original_src
stringlengths
19
243k
changed_src
stringlengths
19
243k
change
stringclasses
3 values
i1
int64
0
8.44k
i2
int64
0
8.44k
j1
int64
0
8.44k
j2
int64
0
8.44k
error
stringclasses
270 values
stderr
stringlengths
0
226k
p02973
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; long long MOD = 1000000000 + 7; int main() { cout << setprecision(10); int N; cin >> N; deque<ll> q; for (int i = 0; i < N; i++) { ll tmp; cin >> tmp; auto itr = lower_bound(q.begin(), q.end(), tmp); int index = distance(itr, q.begin()); if (index == 0) { q.push_front(tmp); } else { q[index - 1] = tmp; } } cout << q.size() << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; long long MOD = 1000000000 + 7; int main() { cout << setprecision(10); int N; cin >> N; deque<ll> q; for (int i = 0; i < N; i++) { ll tmp; cin >> tmp; auto itr = lower_bound(q.begin(), q.end(), tmp); int index = distance(q.begin(), itr); if (index == 0) { q.push_front(tmp); } else { q[index - 1] = tmp; } } cout << q.size() << endl; }
replace
18
19
18
19
0
p02973
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<long> group; for (int i = 0; i < n; i++) { long a; cin >> a; if (group.size() == 0 || group[0] > a) { // cout << "Insert top " << a << endl; group.insert(group.begin(), a); } else { auto pos = lower_bound(group.begin(), group.end(), a); --pos; // cout << "Update " << *pos << " to " << a << endl; *pos = a; } } cout << group.size() << endl; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<long> group; for (int i = 0; i < n; i++) { long a; cin >> a; if (group.size() == 0 || group[0] >= a) { // cout << "Insert top " << a << endl; group.insert(group.begin(), a); } else { auto pos = lower_bound(group.begin(), group.end(), a); --pos; // cout << "Update " << *pos << " to " << a << endl; *pos = a; } } cout << group.size() << endl; }
replace
14
15
14
15
0
p02973
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; i++) #define reps(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) #define rreps(i, e, n) for (int i = (n)-1; i >= (e); i--) #define all(x) (x).begin(), (x).end() #define sz(x) ((int)(x).size()) #define uniq(x) (x).erase(unique((x).begin(), (x).end()), (x).end()) int main() { cin.tie(0); ios::sync_with_stdio(false); // std::ifstream in("input.txt"); // std::cin.rdbuf(in.rdbuf()); int n; cin >> n; multiset<int> s; rep(i, n) { int a; cin >> a; auto it = s.lower_bound(a); if ((sz(s) > 0) && (*(--it) < a)) s.erase(it); s.insert(a); } cout << sz(s) << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; i++) #define reps(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) #define rreps(i, e, n) for (int i = (n)-1; i >= (e); i--) #define all(x) (x).begin(), (x).end() #define sz(x) ((int)(x).size()) #define uniq(x) (x).erase(unique((x).begin(), (x).end()), (x).end()) int main() { cin.tie(0); ios::sync_with_stdio(false); // std::ifstream in("input.txt"); // std::cin.rdbuf(in.rdbuf()); int n; cin >> n; multiset<int> s; rep(i, n) { int a; cin >> a; auto it = s.lower_bound(a); if ((sz(s) > 0) && (it != s.begin()) && (*(--it) < a)) s.erase(it); s.insert(a); } cout << sz(s) << endl; return 0; }
replace
23
24
23
24
0
p02973
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cmath> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <math.h> #include <queue> #include <sstream> #include <stack> #include <stdlib.h> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { int N; cin >> N; vector<ll> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } vector<ll> p_que; int ans = 1; p_que.push_back(A[0]); for (int i = 1; i < N; i++) { auto itr = lower_bound(p_que.begin(), p_que.end(), A[i]); int dist = itr - p_que.begin(); if (dist == 0) { ans++; p_que.push_back(A[i]); sort(p_que.begin(), p_que.end()); } else { p_que[dist - 1] = A[i]; } } cout << ans << endl; return 0; }
#include <algorithm> #include <bitset> #include <cmath> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <math.h> #include <queue> #include <sstream> #include <stack> #include <stdlib.h> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { int N; cin >> N; vector<ll> A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } vector<ll> p_que; int ans = 1; p_que.push_back(A[0]); for (int i = 1; i < N; i++) { auto itr = lower_bound(p_que.begin(), p_que.end(), A[i]); int dist = itr - p_que.begin(); if (dist == 0) { ans++; p_que.insert(p_que.begin(), A[i]); } else { p_que[dist - 1] = A[i]; } } cout << ans << endl; return 0; }
replace
33
35
33
34
TLE
p02973
C++
Time Limit Exceeded
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ███████████ // ██╬╬╬╬╬████╬╬████╬╬╬╬╬██ // █████████╬╬╬╬╬████████████╬╬╬╬╬██╬╬╬╬╬╬███╬╬╬╬╬██ // ████████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬██╬╬╬╬╬╬╬██ // ████╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬╬╬╬╬╬██ // ███╬╬╬█╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬███╬╬╬╬╬╬╬█████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬████████╬╬╬╬╬██ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬██ // ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬████ // █████████████╬╬╬╬╬╬╬╬██╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬██████ // ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬██████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████╬╬╬╬╬╬╬███████████╬╬╬╬╬╬╬╬██╬╬╬██╬╬╬██ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬█╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬██ // ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬▓▓▓▓▓▓╬╬╬████╬╬████╬╬╬╬╬╬╬▓▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬███ // ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬█████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ // ██████████████ // ████╬╬╬╬╬╬███████████████████████████╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████ // ███████ █████ // ███████████████████ #include "bits/stdc++.h" using namespace std; #define MOD 1000000007 // #define MOD 998244353 const double EPS = 1e-9; #define INF (1LL << 60) #define D double #define fs first #define sc second #define int long long #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, a, b) for (int i = (b - 1); i >= (a); --i) #define REP(i, n) FOR(i, 0, (n)) #define RREP(i, n) RFOR(i, 0, (n)) #define ITR(itr, mp) for (auto itr = (mp).begin(); itr != (mp).end(); ++itr) #define RITR(itr, mp) for (auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr) #define range(i, a, b) ((a) <= (i) && (i) < (b)) #define debug(x) cout << #x << " = " << (x) << endl; #define SP << " " << typedef pair<int, int> P; typedef vector<int> vec; typedef vector<vector<int>> mat; signed main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<int> a(n); REP(i, n) cin >> a[i]; multiset<int> st; REP(i, n) { if (i == 0) { st.insert(-a[i]); continue; } auto itr = upper_bound(st.begin(), st.end(), -a[i]); if (itr == st.end()) st.insert(-a[i]); else { st.erase(itr); st.insert(-a[i]); } } cout << st.size() << endl; return 0; }
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ███████████ // ██╬╬╬╬╬████╬╬████╬╬╬╬╬██ // █████████╬╬╬╬╬████████████╬╬╬╬╬██╬╬╬╬╬╬███╬╬╬╬╬██ // ████████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬██╬╬╬╬╬╬╬██ // ████╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬╬╬╬╬╬██ // ███╬╬╬█╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬███╬╬╬╬╬╬╬█████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬████████╬╬╬╬╬██ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬██ // ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬████ // █████████████╬╬╬╬╬╬╬╬██╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬██████ // ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬██████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████╬╬╬╬╬╬╬███████████╬╬╬╬╬╬╬╬██╬╬╬██╬╬╬██ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬█╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬██ // ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬▓▓▓▓▓▓╬╬╬████╬╬████╬╬╬╬╬╬╬▓▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬███ // ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬█████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ // ██████████████ // ████╬╬╬╬╬╬███████████████████████████╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████ // ███████ █████ // ███████████████████ #include "bits/stdc++.h" using namespace std; #define MOD 1000000007 // #define MOD 998244353 const double EPS = 1e-9; #define INF (1LL << 60) #define D double #define fs first #define sc second #define int long long #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, a, b) for (int i = (b - 1); i >= (a); --i) #define REP(i, n) FOR(i, 0, (n)) #define RREP(i, n) RFOR(i, 0, (n)) #define ITR(itr, mp) for (auto itr = (mp).begin(); itr != (mp).end(); ++itr) #define RITR(itr, mp) for (auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr) #define range(i, a, b) ((a) <= (i) && (i) < (b)) #define debug(x) cout << #x << " = " << (x) << endl; #define SP << " " << typedef pair<int, int> P; typedef vector<int> vec; typedef vector<vector<int>> mat; signed main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector<int> a(n); REP(i, n) cin >> a[i]; multiset<int> st; REP(i, n) { if (i == 0) { st.insert(-a[i]); continue; } auto itr = st.upper_bound(-a[i]); if (itr == st.end()) st.insert(-a[i]); else { st.erase(itr); st.insert(-a[i]); } } cout << st.size() << endl; return 0; }
replace
64
65
64
65
TLE
p02973
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <vector> using namespace std; int n, m = 1; int a[100000]; int main() { cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; vector<pair<int, int>> c; c.push_back(make_pair(a[n - 1], 1)); for (int i = n - 2; i >= 0; i--) { if (a[i] >= c.back().first) { m++; c.push_back(make_pair(a[i], m)); } else { int j = 0; while (a[i] >= c[j].first) j++; c[j].first = a[i]; sort(c.begin(), c.end()); } } cout << m << endl; return 0; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int n, m = 1; int a[100000]; int main() { cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; vector<pair<int, int>> c; c.push_back(make_pair(a[n - 1], 1)); for (int i = n - 2; i >= 0; i--) { if (a[i] >= c.back().first) { m++; c.push_back(make_pair(a[i], m)); } else { int j = 0; while (a[i] >= c[j].first) j++; c[j].first = a[i]; while (j > 0 && c[j].first < c[j - 1].first) { swap(c[j], c[j - 1]); j--; } } } cout << m << endl; return 0; }
replace
28
29
28
33
TLE
p02973
C++
Time Limit Exceeded
/* これを入れて実行 g++ code.cpp ./a.out */ #include <algorithm> #include <bitset> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string> #include <tuple> #include <unordered_map> #include <utility> #include <vector> using namespace std; typedef long long ll; typedef long double ld; int dy4[4] = {-1, 0, +1, 0}; int dx4[4] = {0, +1, 0, -1}; int dy8[8] = {-1, -1, 0, 1, 1, 1, 0, -1}; int dx8[8] = {0, 1, 1, 1, 0, -1, -1, -1}; const long long INF = 1LL << 60; const ll MOD = 1e9 + 7; bool greaterSecond(const pair<int, int> &f, const pair<int, int> &s) { return f.second > s.second; } ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } ll nCr(ll n, ll r) { if (r == 0 || r == n) { return 1; } else if (r == 1) { return n; } return (nCr(n - 1, r) + nCr(n - 1, r - 1)); } ll nPr(ll n, ll r) { r = n - r; ll ret = 1; for (ll i = n; i >= r + 1; i--) ret *= i; return ret; } //-----------------------ここから----------- int main(void) { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) cin >> a[i]; multiset<int> st; for (int i = 0; i < n; i++) { auto itr = lower_bound(st.begin(), st.end(), a[i]); if (itr == st.begin()) { st.insert(a[i]); } else { itr--; st.erase(itr); st.insert(a[i]); } } cout << st.size() << endl; }
/* これを入れて実行 g++ code.cpp ./a.out */ #include <algorithm> #include <bitset> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string> #include <tuple> #include <unordered_map> #include <utility> #include <vector> using namespace std; typedef long long ll; typedef long double ld; int dy4[4] = {-1, 0, +1, 0}; int dx4[4] = {0, +1, 0, -1}; int dy8[8] = {-1, -1, 0, 1, 1, 1, 0, -1}; int dx8[8] = {0, 1, 1, 1, 0, -1, -1, -1}; const long long INF = 1LL << 60; const ll MOD = 1e9 + 7; bool greaterSecond(const pair<int, int> &f, const pair<int, int> &s) { return f.second > s.second; } ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } ll nCr(ll n, ll r) { if (r == 0 || r == n) { return 1; } else if (r == 1) { return n; } return (nCr(n - 1, r) + nCr(n - 1, r - 1)); } ll nPr(ll n, ll r) { r = n - r; ll ret = 1; for (ll i = n; i >= r + 1; i--) ret *= i; return ret; } //-----------------------ここから----------- int main(void) { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) cin >> a[i]; multiset<int> st; for (int i = 0; i < n; i++) { auto itr = st.lower_bound(a[i]); if (itr == st.begin()) { st.insert(a[i]); } else { itr--; st.erase(itr); st.insert(a[i]); } } cout << st.size() << endl; }
replace
76
77
76
77
TLE
p02973
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, a, b) for (int i = (a); i < (b); i++) int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vector<int> a(n); rep(i, 0, n) cin >> a[i]; reverse(a.begin(), a.end()); vector<int> x; x.push_back(1e9 + 100); rep(i, 0, n) { int j = upper_bound(x.begin(), x.end(), a[i]) - x.begin(); if (x[j] > 1e9) { x[j] = a[i]; x.push_back(1e9 + 100); } else { x[j] = a[i]; sort(x.begin(), x.end()); } } cout << x.size() - 1 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, a, b) for (int i = (a); i < (b); i++) int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vector<int> a(n); rep(i, 0, n) cin >> a[i]; reverse(a.begin(), a.end()); vector<int> x; x.push_back(1e9 + 100); rep(i, 0, n) { int j = upper_bound(x.begin(), x.end(), a[i]) - x.begin(); if (x[j] > 1e9) { x[j] = a[i]; x.push_back(1e9 + 100); } else { x[j] = a[i]; } } cout << x.size() - 1 << endl; return 0; }
delete
25
26
25
25
TLE
p02973
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) using ll = long long; int main() { int N; cin >> N; vector<int> A(N); rep(i, N) cin >> A[i]; multiset<int> mst; mst.insert(A[N - 1]); for (int i = N - 2; i >= 0; i--) { if (A[i] <= *(mst.rbegin())) { auto it = mst.upper_bound(A[i]); if (it != mst.end()) { int a = *it; int num = mst.erase(*it); rep(j, num - 1) mst.insert(a); } } mst.insert(A[i]); } cout << mst.size() << endl; return 0; }
#include <algorithm> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) using ll = long long; int main() { int N; cin >> N; vector<int> A(N); rep(i, N) cin >> A[i]; multiset<int> mst; mst.insert(A[N - 1]); for (int i = N - 2; i >= 0; i--) { if (A[i] <= *(mst.rbegin())) { auto beg = mst.upper_bound(A[i]); auto en = beg; en++; if (beg != mst.end()) { mst.erase(beg, en); } } mst.insert(A[i]); } cout << mst.size() << endl; return 0; }
replace
27
32
27
32
TLE
p02973
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep1(i, n) for (ll i = 1; i < (ll)(n); i++) #define INF 10000000000 #define MOD 998244353 using ll = long long; using Graph = vector<vector<int>>; int main() { int N; cin >> N; vector<ll> A(N); rep(i, N) cin >> A.at(i); vector<ll> res; res.push_back(A.at(N - 1)); for (int i = N - 2; i >= 0; i--) { sort(begin(res), end(res)); auto iter = upper_bound(begin(res), end(res), A.at(i)); ll dist = distance(begin(res), iter); if (dist == (ll)res.size()) { res.push_back(A.at(i)); } else { res.at(dist) = A.at(i); } } cout << res.size() << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep1(i, n) for (ll i = 1; i < (ll)(n); i++) #define INF 10000000000 #define MOD 998244353 using ll = long long; using Graph = vector<vector<int>>; int main() { int N; cin >> N; vector<ll> A(N); rep(i, N) cin >> A.at(i); vector<ll> res; res.push_back(A.at(N - 1)); for (int i = N - 2; i >= 0; i--) { // sort(begin(res),end(res)); auto iter = upper_bound(begin(res), end(res), A.at(i)); ll dist = distance(begin(res), iter); if (dist == (ll)res.size()) { res.push_back(A.at(i)); } else { res.at(dist) = A.at(i); } } cout << res.size() << endl; }
replace
18
19
18
19
TLE
p02973
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const ll MOD = 1000000007; // const ll MOD = 998244353; const ll INF = MOD * MOD; const long double EPS = 1e-12; struct mint { ll x; mint(ll x = 0) : x((x % MOD + MOD) % MOD) {} mint operator-() const { return mint(-x); } mint &operator+=(const mint a) { if ((x += a.x) >= MOD) x -= MOD; return *this; } mint &operator-=(const mint a) { if ((x += MOD - a.x) >= MOD) x -= MOD; return *this; } mint &operator*=(const mint a) { (x *= a.x) %= MOD; return *this; } mint operator+(const mint a) const { return mint(*this) += a; } mint operator-(const mint a) const { return mint(*this) -= a; } mint operator*(const mint a) const { return mint(*this) *= a; } mint pow(ll t) const { if (!t) return 1; mint a = pow(t >> 1); a *= a; if (t & 1) a *= *this; return a; } // for prime mod mint inv() const { return pow(MOD - 2); } mint &operator/=(const mint a) { return *this *= a.inv(); } mint operator/(const mint a) const { return mint(*this) /= a; } }; istream &operator>>(istream &is, const mint &a) { return is >> a.x; } ostream &operator<<(ostream &os, const mint &a) { return os << a.x; } struct edge { ll to, cost; tuple<ll, ll> get_value() { return make_tuple(to, cost); } }; struct fpoint { ld x = 0; ld y = 0; bool operator<(const fpoint &p) const { if (x == p.x) return y < p.y; return x < p.x; } bool operator==(const fpoint &p) const { if (p.x - EPS < x && x < p.x + EPS && p.y - EPS < y && y < p.y + EPS) return true; return false; } bool operator!=(const fpoint &p) const { if (p.x - EPS > x || x > p.x + EPS || p.y - EPS > y || y > p.y + EPS) return true; return false; } fpoint &operator+=(const ld a) { x += a, y += a; return *this; } fpoint &operator-=(const ld a) { x -= a, y -= a; return *this; } fpoint &operator*=(const ld a) { x *= a, y *= a; return *this; } fpoint &operator/=(const ld a) { x /= a, y /= a; return *this; } fpoint &operator+=(const fpoint p) { x += p.x, y += p.y; return *this; } fpoint &operator-=(const fpoint p) { x -= p.x, y -= p.y; return *this; } fpoint &operator*=(const fpoint p) { x *= p.x, y *= p.y; return *this; } fpoint &operator/=(const fpoint p) { x /= p.x, y /= p.y; return *this; } fpoint operator+(const fpoint p) const { return fpoint(*this) += p; } fpoint operator-(const fpoint p) const { return fpoint(*this) -= p; } fpoint operator*(const fpoint p) const { return fpoint(*this) *= p; } fpoint operator/(const fpoint p) const { return fpoint(*this) /= p; } fpoint operator+(const ld a) const { return fpoint(*this) += a; } fpoint operator-(const ld a) const { return fpoint(*this) -= a; } fpoint operator*(const ld a) const { return fpoint(*this) *= a; } fpoint operator/(const ld a) const { return fpoint(*this) /= a; } ld dot(const fpoint &p) const { return x * p.x + y * p.y; } ll cross(const fpoint &p) const { return x * p.y - y * p.x; } ld squared_norm() const { return x * x + y * y; } ld norm() const { return sqrt(x * x + y * y); } tuple<ld, ld> get_value() { return make_tuple(x, y); } ll which_quadrant() const { if (abs(x) < EPS && abs(y) < EPS) return 0; if (y > 0) return x > 0 ? 1 : 2; return x < 0 ? 3 : 4; } bool is_zero() { fpoint z = {0, 0}; return z == *this; } }; struct point { ll x = 0; ll y = 0; bool operator<(const point &p) const { if (x == p.x) return y < p.y; return x < p.x; } bool operator==(const point &p) const { if (x == p.x && y == p.y) return true; return false; } bool operator!=(const point &p) const { if (x != p.x || y != p.y) return true; return false; } point &operator+=(const ll a) { x += a, y += a; return *this; } point &operator-=(const ll a) { x -= a, y -= a; return *this; } point &operator*=(const ll a) { x *= a, y *= a; return *this; } point &operator+=(const point p) { x += p.x, y += p.y; return *this; } point &operator-=(const point p) { x -= p.x, y -= p.y; return *this; } point &operator*=(const point p) { x *= p.x, y *= p.y; return *this; } void operator++(int) { x++, y++; } void operator++() { x++, y++; } void operator--(int) { x--, y--; } void operator--() { x--, y--; } point operator+(const point p) const { return point(*this) += p; } point operator-(const point p) const { return point(*this) -= p; } point operator*(const point p) const { return point(*this) *= p; } point operator+(const ll a) const { return point(*this) += a; } point operator-(const ll a) const { return point(*this) -= a; } point operator*(const ll a) const { return point(*this) *= a; } ll dot(const point &p) const { return x * p.x + y * p.y; } ll cross(const point &p) const { return x * p.y - y * p.x; } ll squared_norm() const { return x * x + y * y; } tuple<ll, ll> get_value() { return make_tuple(x, y); } ll which_quadrant() const { if (x == 0 && y == 0) return 0; if (x >= 0 && y >= 0) return 1; else if (x <= 0 && y >= 0) return 2; else if (x <= 0 && y <= 0) return 3; else return 4; } bool is_zero() { point z = {0, 0}; return z == *this; } fpoint to_fpoint() { fpoint ret = {ld(x), ld(y)}; return ret; } }; // angle_comparator struct { template <typename T> bool operator()(const T p1, const T p2) const { ll q1 = p1.which_quadrant(); ll q2 = p2.which_quadrant(); if (q1 != q2) return q1 < q2; // judge for parallel lines // if p1 cross p2 > 0 -> sin arg(p1 -> o -> p2) > 0 return p1.cross(p2) > 0; } } angle_comparator; struct undirected_edge { ll from; ll to; ll cost; bool operator<(const undirected_edge &ue) const { return cost < ue.cost; } tuple<ll, ll, ll> get_value() { return make_tuple(from, to, cost); } }; struct event { ll loc, val, sgn; bool operator<(const event &e) const { if (loc == e.loc) return sgn == 1; return loc < e.loc; } bool operator>(const event &e) const { if (loc == e.loc) return sgn == -1; return loc > e.loc; } tuple<ll, ll, ll> get_value() { return make_tuple(loc, val, sgn); } }; typedef std::pair<ll, ll> pl; typedef std::tuple<ll, ll, ll> tp3; typedef std::tuple<ll, ll, ll, ll> tp4; typedef std::vector<ll> vl; typedef std::vector<vl> vl2; typedef std::vector<vl2> vl3; typedef std::vector<vl3> vl4; typedef std::vector<mint> vmi; typedef std::vector<vmi> vmi2; typedef std::vector<vmi2> vmi3; typedef std::vector<vmi3> vmi4; typedef std::vector<bool> vb; typedef std::vector<vb> vb2; typedef std::vector<vb2> vb3; typedef std::vector<vb3> vb4; typedef std::vector<pl> vpl; typedef std::vector<tp3> vtp3; typedef std::vector<tp4> vtp4; typedef std::vector<point> points; typedef std::vector<fpoint> fpoints; // priority queue. Taking from the higher value. Don't forget calling !q.empty() typedef std::priority_queue<ll> pq; // priority queue. Taking from the lower value typedef std::priority_queue<ll, vl, greater<ll>> pql; typedef std::vector<vector<edge>> Graph; const ll N_DIGITS = 60; const long double PI = 3.14159265358979323846; const points dirs = {{-1, 0}, {1, 0}, {0, 1}, {0, -1}, // four directions {1, 1}, {-1, 1}, {-1, -1}, {1, -1}, // diagonal {0, 0}}; // self template <typename A, typename B> string to_string(pair<A, B> p); template <typename A, typename B, typename C> string to_string(tuple<A, B, C> p); template <typename A, typename B, typename C, typename D> string to_string(tuple<A, B, C, D> p); string to_string(const string &s) { return '"' + s + '"'; } string to_string(char c) { return string(1, c); } string to_string(const char *s) { return to_string((string)s); } string to_string(bool b) { return (b ? "true" : "false"); } string to_string(mint a) { return to_string(a.x); } string to_string(point p) { return "{" + to_string(p.x) + ", " + to_string(p.y) + "}"; } string to_string(fpoint p) { return "{" + to_string(p.x) + ", " + to_string(p.y) + "}"; } string to_string(edge e) { return "{" + to_string(e.to) + ", " + to_string(e.cost) + "}"; } template <typename A, typename B> string to_string(pair<A, B> p) { return "(" + to_string(p.first) + ", " + to_string(p.second) + ")"; } template <typename A, typename B, typename C> string to_string(tuple<A, B, C> p) { return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")"; } template <typename A, typename B, typename C, typename D> string to_string(tuple<A, B, C, D> p) { return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")"; } string to_string(vector<bool> v) { bool first = true; string res = "{"; for (int i = 0; i < static_cast<int>(v.size()); i++) { if (!first) res += ", "; first = false; res += to_string(v[i]); } res += "}"; return res; } template <size_t N> string to_string(bitset<N> v) { string res = ""; for (size_t i = 0; i < N; i++) res += static_cast<char>('0' + v[i]); return res; } template <typename A> string to_string(A v) { bool first = true; string res = "{"; for (const auto &x : v) { if (!first) { res += ", "; } first = false; res += to_string(x); } res += "}"; return res; } template <typename T> string to_string(priority_queue<T> &q) { priority_queue<T> copy; bool first = true; string res = "{"; while (!q.empty()) { if (!first) { res += ", "; } first = false; res += to_string(q.top()); copy.push(q.top()); q.pop(); } swap(q, copy); res += "}"; return res; } template <typename T> string to_string(queue<T> &q) { queue<T> copy; bool first = true; string res = "{"; while (!q.empty()) { if (!first) { res += ", "; } first = false; res += to_string(q.front()); copy.push(q.front()); q.pop(); } swap(q, copy); res += "}"; return res; } void debug_out() { cerr << endl; } template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << to_string(H); debug_out(T...); } #define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++) #define revrep(i, n) for (ll(i) = (n)-1; (i) >= 0; (i)--) #define For(i, a, b) for (ll(i) = (a); (i) < (b); (i)++) #define revFor(i, b, a) for (ll(i) = (b)-1; (i) >= (a); (i)--) #define all(a) (a).begin(), (a).end() #define rall(a) (a).rbegin(), (a).rend() #define isUpper(c) ('a' - (c) > 0) #define isNum(c) (0 <= (c) - '0' && (c) - '0' <= 9) #define toLower(c) char((c) + 0x20) #define toUpper(c) char((c)-0x20) #define pb push_back #define mp make_pair #define mt make_tuple #define pr(a) std::cout << (a) #define prl(a) std::cout << (a) << endl #define prl2(a, b) std::cout << (a) << " " << (b) << endl #define prl3(a, b, c) std::cout << (a) << " " << (b) << " " << (c) << endl #define prl4(a, b, c, d) \ std::cout << (a) << " " << (b) << " " << (c) << " " << (d) << endl #define prs(a) std::cout << (a) << " " #define prs2(a, b) std::cout << (a) << " " << (b) << " " #define prs3(a, b, c) std::cout << (a) << " " << (b) << " " << (c) << " " #define prs4(a, b, c, d) \ std::cout << (a) << " " << (b) << " " << (c) << " " << (d) << " " #define yn(condition) \ if ((condition)) \ prl("Yes"); \ else \ prl("No"); #define YN(condition) \ if ((condition)) \ prl("YES"); \ else \ prl("NO"); #define in1(a) cin >> (a) #define in2(a, b) cin >> (a) >> (b) #define in3(a, b, c) cin >> (a) >> (b) >> (c) #define in4(a, b, c, d) cin >> (a) >> (b) >> (c) >> (d) #define in5(a, b, c, d, e) cin >> (a) >> (b) >> (c) >> (d) >> (e) #define in6(a, b, c, d, e, f) cin >> (a) >> (b) >> (c) >> (d) >> (e) >> (f) #define in7(a, b, c, d, e, f, g) \ cin >> (a) >> (b) >> (c) >> (d) >> (e) >> (f) >> (g) #define e1 first #define e2 second #define popcount(i) __builtin_popcountl((i)) #define Forchar(c, a, z) for (char(c) = (a); (c) <= (z); (c)++) #define cntchar(s, c) count(all((s)), c) #define substring(s, start, end) s.substr((start), (end) - (start) + 1) #define prl_nd(num, digits) \ std::cout << fixed << setprecision(digits) << (num) << endl; #define prl_time(s) \ prl3("Elapsed Time:", 1000.0 * (clock() - s) / CLOCKS_PER_SEC, "[ms]"); #define char_to_str(c) string(1, (c)) #ifdef _LOCAL #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__) #else #define debug(...) 42 #endif ll modf(ll x, ll m) { return (x % m + m) % m; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } struct MaxFlow { struct F_edge { ll to, rev, capacity; F_edge(ll to, ll rev, ll capacity) : to(to), rev(rev), capacity(capacity) {} }; typedef vector<F_edge> F_edges; vector<F_edges> graph; ll n_vertex; // level is the shortest path to get a given node from the source node. vl level, iter; MaxFlow(ll n_vertex) : n_vertex(n_vertex) { graph.resize(n_vertex); } void add_edge(ll from, ll to, ll capacity = 1) { graph[from].pb({to, ll(graph[to].size()), capacity}); graph[to].pb({from, ll(graph[from].size()) - 1, 0}); } void bfs(ll source) { level = vl(n_vertex, -1); level[source] = 0; queue<ll> q; q.push(source); while (!q.empty()) { ll vertex = q.front(); q.pop(); rep(i, graph[vertex].size()) { ll target = graph[vertex][i].to; ll cap_target = graph[vertex][i].capacity; // if the flow can be into the target node, implement below. if (cap_target > 0 && level[target] < 0) { level[target] = level[vertex] + 1; q.push(target); } } } } ll dfs(ll vertex, ll sink, ll flow) { if (vertex == sink) return flow; for (ll &i = iter[vertex]; i < graph[vertex].size(); i++) { ll target = graph[vertex][i].to; ll cap_target = graph[vertex][i].capacity; ll rev_target = graph[vertex][i].rev; // if capasitiy is not full yet and target is farther, // then assign current flow. if (cap_target > 0 && level[vertex] < level[target]) { ll d = dfs(target, sink, min(cap_target, flow)); if (d > 0) { // if the flow successfully reaches the sink, reduce the // flow from the capacity graph[vertex][i].capacity -= d; graph[target][rev_target].capacity += d; return d; } } } return 0; } ll dinic(ll source, ll sink) { // complexity O(EV^2) ll flow = 0; while (true) { bfs(source); // if there is no path leading to the sink, the maximum flow is 0. if (level[sink] < 0) return flow; iter = vl(n_vertex, 0); ll f; while ((f = dfs(source, sink, INF)) > 0) flow += f; } } }; struct UnionFind { vl parents, set_size; set<ll> root_idx; ll n_groups; UnionFind(ll n) { parents = set_size = vl(n); n_groups = n; rep(i, n) { parents[i] = i; set_size[i] = 1LL; root_idx.insert(i); } } ll root_find(ll x) { if (parents[x] == x) return x; return parents[x] = root_find(parents[x]); } void unite(ll x, ll y) { // priority for x is larger than that of y x = root_find(x); y = root_find(y); if (x == y) return; parents[y] = x, set_size[x] += set_size[y]; root_idx.erase(y); n_groups--; } // connected or not bool is_same(ll x, ll y) { return root_find(x) == root_find(y); } ll size(ll x) { return set_size[root_find(x)]; } }; struct WeightedUnionFind { vl parents, set_size, weights; set<ll> root_idx; ll n_groups; WeightedUnionFind(ll n) { parents = set_size = weights = vl(n); n_groups = n; rep(i, n) { parents[i] = i; set_size[i] = 1LL; weights[i] = 0; root_idx.insert(i); } } ll root_find(ll x) { if (parents[x] == x) return x; ll r = root_find(parents[x]); weights[x] += weights[parents[x]]; return parents[x] = r; } ll weight(ll x) { root_find(x); return weights[x]; } void unite(ll x, ll y, ll w) { // priority for x is larger than that of y w += weight(x) - weight(y); x = root_find(x); y = root_find(y); if (x == y) return; parents[y] = x, set_size[x] += set_size[y]; root_idx.erase(y); weights[y] = w; n_groups--; } // connected or not bool is_same(ll x, ll y) { return root_find(x) == root_find(y); } ll size(ll x) { return set_size[root_find(x)]; } ll difference(ll x, ll y) { return weight(y) - weight(x); } }; struct Doubling { // ABC167D ll n; ll sz; vl2 next; /* next[k + 1][i] := next[k][next[k][i]] next[0][i] := edge[i] e.g. a0, a1, ..., an-1 / 0 <= ai <= n - 1 a0 -> a[a0] -> a[a[a0]] -> ... -> a[a[...[a[0]]]] (m times) Let the function repeatedly inputting a[i] m times be f[m](a[i]) - get(i, x) returns f[x](a[i]) - lower_bound(i, j) returns minimum x which satisfies f[x](a[i]) >= j. if not possible returns n. */ // edge[i]: i -> edge[i] by one operation Doubling(vl &edge) : n(edge.size()), sz(62) { next.resize(sz, vl(n, -1)); rep(i, n) next[0][i] = edge[i]; rep(k, sz - 1) rep(i, n) next[k + 1][i] = next[k][next[k][i]]; } // return the result obtained when starting from i and advancing x times ll get(ll i, ll x) { ll ret = i; rep(bit, sz) { if (!(x >> bit & 1)) continue; ret = next[bit][ret]; } return ret; } // return the iteration x where the value exceeds j for the first time. // if it is not possible, then return n. ll lower_bound(ll i, ll j) { ll cur = i, acc = 0; revrep(wid, sz) { if (next[wid][cur] < j) { acc += 1LL << wid; cur = next[wid][cur]; } } return min(n, acc + 1); } }; template <class T> class LowestCommonAncestor { public: ll N, logN; vl depth, len; T tree; vl2 parents; LowestCommonAncestor(ll n, T &_tree) { N = n; logN = 0; while (N > (1LL << logN)) logN++; depth = len = vl(N); parents = vl2(logN, vl(N)); tree = _tree; _init(0, -1, 0, 0); _build(); } void _init(ll source, ll parent, ll d, ll l) { depth[source] = d; parents[0][source] = parent; len[source] = l; rep(i, tree[source].size()) { ll target = tree[source][i].to; ll cost = tree[source][i].cost; if (target == parent) continue; _init(target, source, d + 1, cost + l); } } void _build() { rep(k, logN - 1) rep(n, N) { // if there is no parent, -1. // otherwise, the parent of the parent is the parent. if (parents[k][n] < 0) parents[k + 1][n] = -1; else parents[k + 1][n] = parents[k][parents[k][n]]; } } ll query(ll u, ll v) { if (depth[u] > depth[v]) swap(u, v); rep(k, logN) if ((depth[v] - depth[u]) >> k & 1) v = parents[k][v]; if (u == v) return u; revrep(k, logN) { if (parents[k][u] != parents[k][v]) { u = parents[k][u]; v = parents[k][v]; } } return parents[0][u]; } ll distance(ll u, ll v) { ll w = query(u, v); return len[u] + len[v] - 2 * len[w]; } }; struct BinaryIndexedTree { ll n, ini, M; vl dat; BinaryIndexedTree(ll n, ll ini = 0) : dat(n + 1, ini), n(n), ini(ini) { M = 1; while (M <= n) M <<= 1; }; // x: 1001 1010 1100 1011 1101 1111 // x & - x: 0001 0010 0100 0001 0001 0001 // ->: 1010 1100 10000 1100 1100 10000 ll update_func(ll val, ll d) { // if maximum -> max(val, dat) // return max(val, d); // if cumulative sum return val + d; } ll query(ll i) { /* v[0] + v[1] + ... + v[i] e.g.) i = 10101 itr1. 10101 -> 10100 itr2. 10100 -> 10000 itr3. 10000 -> 00000 (break) */ if (i < 0) return ini; ll ret = 0; for (ll j = i; j >= 0; j = (j & (j + 1)) - 1) { ret = update_func(ret, dat[j]); } return ret; } ll query(ll l, ll r) { // a[l] + a[l + 1] + ... + a[r - 1] + a[r] return query(r) - query(l - 1); } ll lower_bound(ll key) { // v[0] + v[1] + ... + v[left - 1] < key <= v[0] + v[1] + ... + v[left] if (key <= 0) return 0; ll left = 0, right = 1; while (right <= n) right <<= 2; for (ll i = right; i > 0; i /= 2) { if (left + i <= n && dat[left + i - 1] < key) { key -= dat[left + i - 1]; left += i; } } return left; } void update(ll i, ll val) { /* e.g.) i = 10101, n = 11111 itr1. i: 10101, i+1: 10110 -> 10111 itr2. i: 10111, i+1: 11000 -> 11111 (break) */ if (i < 0) return; for (ll j = i; j < n; j |= j + 1) { dat[j] = update_func(val, dat[j]); } } }; struct SegmentTree { ll n, ini, minimize; vl dat; // when seeking minimum // ini = INF // when seeking maximum // ini = -INF SegmentTree(ll n_, bool minimize_ = true) { n = 1; minimize = minimize_; if (minimize) ini = INF; else ini = -INF; while (n < n_) n *= 2; dat.resize(2 * n - 1); rep(i, 2 * n - 1) dat[i] = ini; }; void update(ll idx, ll val, bool force = false) { idx += n - 1; if (!force) { if (minimize && dat[idx] <= val) return; if (!minimize && dat[idx] >= val) return; } dat[idx] = val; while (idx > 0) { idx = (idx - 1) / 2; // when seeking minimum if (minimize) dat[idx] = min(dat[idx * 2 + 1], dat[idx * 2 + 2]); // when seeking maximum else dat[idx] = max(dat[idx * 2 + 1], dat[idx * 2 + 2]); } } ll query(ll l, ll r) { // ### NOTE ### // the range is [l, r] // l, l + 1, ..., r r++; // to adjust to this method return query_segment(l, r, 0, 0, n); } ll query_segment(ll a, ll b, ll idx, ll l, ll r) { assert(a <= b); if (r <= a || b <= l) return ini; if (a <= l && r <= b) return dat[idx]; else { ll seg1 = query_segment(a, b, idx * 2 + 1, l, (l + r) / 2); ll seg2 = query_segment(a, b, idx * 2 + 2, (l + r) / 2, r); // when seeking minimum if (minimize) return min(seg1, seg2); // when seeking maximum else return max(seg1, seg2); } } }; template <class Target> class RerootingTreeDP { public: using T = typename Target::type; struct DP_edge { ll to, rev; // rev is the index to trace the source node. T value; // objective value }; private: ll n; void dfs_fwd(ll source, ll parent) { ll par_idx = -1; vector<T> values; rep(i, tree[source].size()) { const DP_edge &e = tree[source][i]; if (e.to == parent) { par_idx = i; continue; } dfs_fwd(e.to, source); values.pb(e.value); } // If the parent != -1, update the value on edge from parent to source if (par_idx != -1) { ll src_idx = tree[source][par_idx].rev; // update values on the edge from parent to source tree[parent][src_idx].value = Target::merge(values); } } void dfs_bwd(ll source, ll parent) { vector<T> values; for (auto &&e : tree[source]) values.pb(e.value); values = Target::evaluate(values); rep(i, tree[source].size()) { const DP_edge &e = tree[source][i]; if (e.to == parent) continue; // tree[e.to][e.rev]: e.to -> source tree[e.to][e.rev].value = values[i]; dfs_bwd(e.to, source); } } public: UnionFind uf; vector<vector<DP_edge>> tree; RerootingTreeDP(ll n) : n(n), uf(n), tree(n) {} void add_edge(ll u, ll v, T val) { assert(!uf.is_same(u, v)); tree[u].pb({v, ll(tree[v].size()), val}); tree[v].pb({u, ll(tree[u].size()) - 1, val}); uf.unite(u, v); } void dp() { vb visited(n, false); rep(i, n) { if (visited[uf.root_find(i)]) continue; dfs_fwd(i, -1); visited[uf.root_find(i)] = true; } visited.assign(n, false); rep(i, n) { if (visited[uf.root_find(i)]) continue; dfs_bwd(i, -1); visited[uf.root_find(i)] = true; } } ll size() const { return tree.size(); } }; // ABC160F is one example // Modify the functions evaluate and merge based on given problems struct Merger { using type = ll; // This is the exaple of the number of children static type merge(const vector<type> &value) { // merge the result below the source node // each value is from each child node of the source node // value[i] := f(child i) // Here, we would like to obtain f(source) using f(child i) (i = 0, 1, ..., // n_children) ll ret = 1; for (auto &&v : value) ret += v; return ret; } static vector<type> evaluate(const vector<type> &value) { // value[i] := f(source -> child i) // we would like to obtain f(child i -> source) // child j (j != i) is the grandchildren of child i // represent f(child i -> source) using f(source -> j) (j != i) // L[i + 1] := the result using f(source -> k) (k = 0, 1, ..., i) // R[i] := the result using f(source -> k) (k = i, i + 1, ..., n_children) const ll n_children = value.size(); vl L(n_children + 1, 0), R(n_children + 1, 0); rep(i, n_children) L[i + 1] = L[i] + value[i]; revrep(i, n_children) R[i] = R[i + 1] + value[i]; vl ret(n_children); rep(i, n_children) ret[i] = L[i] + R[i + 1] + 1; return ret; } }; struct StronglyConnectedComponents { /* dag: [cmp idx][# of connected cmp] the index of connected cmp cmp: [cmp idx][# of vertex included in a cmp] the index of vertex cmp_idx: [vertex idx] the component which the vertex belongs to Use graph_rev when you would like to know the vertex with zero indegree */ ll n, n_cmp; vl2 graph, graph_rev, dag, cmp; vl order, visited, cmp_idx; StronglyConnectedComponents() {} StronglyConnectedComponents(ll sz) : n(sz), graph(sz), graph_rev(sz), visited(sz), cmp_idx(sz) {} void add_edge(ll from, ll to) { graph[from].pb(to); graph_rev[to].pb(from); } void input(ll m, ll offset = -1) { ll a, b; rep(i, m) { in2(a, b); add_edge(a + offset, b + offset); } } ll operator[](ll k) { return cmp_idx[k]; } void dfs_fwd(ll source) { visited[source] = 1; rep(i, graph[source].size()) { ll target = graph[source][i]; if (!visited[target]) dfs_fwd(target); } order.pb(source); } void dfs_bwd(ll source, ll num) { visited[source] = 1, cmp_idx[source] = num; cmp[num].pb(source); rep(i, graph_rev[source].size()) { ll target = graph_rev[source][i]; if (!visited[target]) dfs_bwd(target, num); } } ll build() { fill(all(visited), 0); order.clear(); rep(i, n) if (!visited[i]) dfs_fwd(i); fill(all(visited), 0); ll num = 0; revrep(i, order.size()) { if (!visited[order[i]]) { dag.pb(vl()); cmp.pb(vl()); dfs_bwd(order[i], num++); } } rep(i, n) for (ll to : graph[i]) if (cmp_idx[i] != cmp_idx[to]) dag[cmp_idx[i]] .pb(cmp_idx[to]); rep(i, num) { sort(all(dag[i])); dag[i].erase(unique(all(dag[i])), dag[i].end()); } return n_cmp = num; } // if the v-th vertex is in loop or not bool in_loop(ll v) { return cmp[cmp_idx[v]].size() > 1; } // if the dag has loops or not bool has_loop() { rep(i, cmp.size()) if (cmp[i].size() > 1) return true; return false; } }; struct CombinationMemo { ll sz, mod; vl fact, fact_inv, minv; CombinationMemo(ll sz, ll _mod) : sz(sz), mod(_mod) { fact.resize(sz + 5); fact_inv.resize(sz + 5); minv.resize(sz + 5); init(); } void init() { fact[0] = fact[1] = 1; minv[1] = 1; fact_inv[0] = fact_inv[1] = 1; For(i, 2, sz + 3) { fact[i] = (i * fact[i - 1]) % mod; minv[i] = mod - minv[mod % i] * (mod / i) % mod; fact_inv[i] = fact_inv[i - 1] * minv[i] % mod; } } ll nCk(ll n, ll r) { if (n == r && n == 0) return 1; else if (n <= 0 || r < 0 || r > n) return 0; ll val = (fact[n] * fact_inv[n - r]) % mod; val *= fact_inv[r]; return val % mod; } ll nPk(ll n, ll r) { if (n == r && n == 0) return 1; else if (n <= 0 || r < 0 || r > n) return 0; ll val = (fact[n] * fact_inv[n - r]) % mod; return val % mod; } }; struct PowerMemo { ll sz, mod, base; vl powB; PowerMemo(ll sz, ll base, ll _mod) : sz(sz), base(base), mod(_mod) { powB.resize(sz + 5); init(); } void init() { powB[0] = 1; rep(i, sz + 3) powB[i + 1] = (powB[i] * base) % mod; } ll operator[](ll k) { return powB[k]; } }; struct Grid2D { Graph graph; ll Width, Height; Grid2D(ll w, ll h, vb2 &block) : Width(w), Height(h) { graph.resize(w * h); _build(block); } ll pos_to_idx(point p) { return p.y * Width + p.x; } point idx_to_pos(ll idx) { return {idx % Width, idx / Width}; } bool undefined_region(point p, vb2 &block) { if (p.x < 0 || p.x > Width - 1) return true; if (p.y < 0 || p.y > Height - 1) return true; if (block[p.x][p.y]) return true; return false; } void _build(vb2 &block, ll val = 1) { rep(x, Width) rep(y, Height) { point p = {x, y}; ll idx1 = pos_to_idx(p); ll idx2; if (block[x][y]) continue; rep(i, 4) { point nxt = p + dirs[i]; idx2 = pos_to_idx(nxt); if (!undefined_region(nxt, block)) graph[idx1].pb( {idx2, val}); // dist[idx1][idx2] = val; (warshall-floyd) } } } }; struct Cumulative2D { vl2 cum; ll w, h; Cumulative2D(ll w, ll h) : w(w), h(h) { cum = vl2(w + 1, vl(h + 1, 0)); } template <typename T> void build(vector<T> &vec) { // never forget building rep(x, w + 1) cum[x][0] = 0; rep(y, h + 1) cum[0][y] = 0; rep(y, h) rep(x, w) cum[x + 1][y + 1] = cum[x][y + 1] + vec[x][y]; rep(x, w + 1) rep(y, h) cum[x][y + 1] += cum[x][y]; } ll func(ll x, ll y, ll dx, ll dy) { // 1-indexed // the rectangle of (x, y), (x + dx, y), (x, y + dy) and (x + dx, y + dy) // think about the case of (1, 1, 1, 1). if (x + dx > w || y + dy > h) return -INF; ll val = cum[x + dx][y + dy]; val += cum[x][y]; val -= cum[x][y + dy]; val -= cum[x + dx][y]; return val; } }; struct LinearSystemIncidence { struct Edge { ll idx, to; bool fwd; }; /* Ax = c A: A in R^(V * E) <- given x: x in R^E <- estimate this vector c: c in R^V <- given */ ll n_vertex, n_edge; bool mod2; vl x; vb visited; vector<vector<Edge>> graph; LinearSystemIncidence(ll n, vpl &es, bool mod2 = false) : n_vertex(n), n_edge(es.size()), mod2(mod2) { graph.resize(n); visited.resize(n); rep(i, n_edge) { auto &e = es[i]; graph[e.e1].pb({i, e.e2, true}); graph[e.e2].pb({i, e.e1, false}); } } ll dfs(vl &c, ll src) { visited[src] = true; ll ret = c[src]; for (Edge &e : graph[src]) { if (visited[e.to]) continue; ll tmp = dfs(c, e.to); x[e.idx] = e.fwd ? tmp : -tmp; ret += tmp; if (mod2) x[e.idx] = modf(x[e.idx], 2); } return mod2 ? ret % 2 : ret; } bool solve(vl &c) { x.assign(n_edge, 0); visited.assign(n_vertex, false); rep(src, n_vertex) { if (visited[src]) continue; if (dfs(c, src)) return false; } return true; } }; struct BigInt10 { string num; map<ll, vl> mod; BigInt10(string num = "0") : num(num) {} size_t size() { return num.size(); } void compute_mod(ll _mod) { ll sz = num.size(); mod[_mod] = vl(sz + 1, 0); ll tenth = 1; rep(i, sz) { ll top = num[sz - 1 - i] - '0'; mod[_mod][i + 1] = (mod[_mod][i] + top * tenth) % _mod; (tenth *= 10) %= _mod; } } ll operator[](ll k) { return num[k] - '0'; } ll subseq_mod(ll l, ll r, ll m) { // s1 s2 ... sl .... sr ... sn // the modulo of 00 ... 0 sl ... sr 00 ... 0 assert(l <= r); ll sz = num.size(); ll tot = mod[m][sz]; ll ls = modf(tot - mod[m][sz - l], m); ll rs = mod[m][sz - r]; return (tot - ls - rs + 2 * m) % m; } bool operator<(BigInt10 &n2) const { if (num.length() < n2.size()) return true; else if (num.length() > n2.size()) return false; rep(i, num.length()) if (ll(num[i] - '0') != n2[i]) return ll(num[i] - '0') < n2[i]; return false; } bool operator<=(BigInt10 &n2) const { if (num.length() < n2.size()) return true; else if (num.length() > n2.size()) return false; rep(i, num.length()) if (ll(num[i] - '0') != n2[i]) return ll(num[i] - '0') < n2[i]; return true; } bool operator>(BigInt10 &n2) const { if (num.length() > n2.size()) return true; else if (num.length() < n2.size()) return false; rep(i, num.length()) if (ll(num[i] - '0') != n2[i]) return ll(num[i] - '0') > n2[i]; return false; } bool operator>=(BigInt10 &n2) const { if (num.length() > n2.size()) return true; else if (num.length() < n2.size()) return false; rep(i, num.length()) if (ll(num[i] - '0') != n2[i]) return ll(num[i] - '0') > n2[i]; return true; } }; istream &operator>>(istream &is, BigInt10 &a) { return is >> a.num; } ostream &operator<<(ostream &os, BigInt10 &a) { return os << a.num; } BigInt10 add(BigInt10 s1, BigInt10 s2) { ll sz1 = s1.size(), sz2 = s2.size(), sz = max(sz1, sz2); ll r = abs(sz2 - sz1); string a(r, '0'); if (sz1 < sz2) s1.num = a + s1.num; else if (sz1 > sz2) s2.num = a + s2.num; bool inc = false; rep(i, sz) { ll nxt = s1[sz - 1 - i] + s2[sz - 1 - i] + inc; if (nxt >= 10) inc = true; else inc = false; s1.num[sz - 1 - i] = to_string(nxt % 10)[0]; } if (inc) s1.num = "1" + s1.num; return s1; } BigInt10 add(BigInt10 s, ll x) { return add(s, BigInt10(to_string(x))); } BigInt10 subtract(BigInt10 s1, BigInt10 s2) { ll sz1 = s1.size(), sz2 = s2.size(), sz = max(sz1, sz2); assert(sz1 >= sz2); ll r = abs(sz2 - sz1); string a(r, '0'); if (sz1 > sz2) s2.num = a + s2.num; bool dec = false; rep(i, sz) { ll nxt = s1[sz - 1 - i] - s2[sz - 1 - i] - dec; if (nxt < 0) dec = true; else dec = false; s1.num[sz - 1 - i] = to_string((nxt + 10) % 10)[0]; } ll n0 = 0; while (s1.num[n0] == '0') n0++; s1.num = substring(s1.num, n0, sz); return s1; } BigInt10 subtract(BigInt10 s, ll x) { return subtract(s, BigInt10(to_string(x))); } BigInt10 multiply(BigInt10 s, ll x) { assert(x <= 10); assert(x >= 0); if (x == 0) return BigInt10("0"); else if (x == 1) return BigInt10(s.num); if (x == 10) return BigInt10(s.num + "0"); ll sz = s.size(); ll inc = 0; rep(i, sz) { ll nxt = s[sz - 1 - i] * x + inc; inc = nxt / 10; s.num[sz - 1 - i] = to_string(nxt % 10)[0]; } if (inc) s.num = to_string(inc) + s.num; return s; } BigInt10 multiply(BigInt10 s1, BigInt10 s2) { ll sz = s2.size(); BigInt10 ret; rep(i, sz) { ll x = s2[sz - 1 - i]; ret = add(ret, multiply(s1, x)); s1.num += "0"; } return ret; } BigInt10 shift(BigInt10 s, ll k) { if (k >= s.size()) return BigInt10("0"); s.num = substring(s.num, 0, s.size() - k - 1); return s; } struct BigInt2 { string num; ll sz; map<ll, vl> mod; ll nz; BigInt2(string num) : num(num), sz(num.size()) { nz = 0; rep(i, sz) if (num[i] == '1') nz++; } size_t size() { return num.size(); } void compute_mod(ll _mod) { mod[_mod] = vl(sz + 1, 0); ll base = 1; rep(i, sz) { ll top = num[sz - 1 - i] - '0'; mod[_mod][i + 1] = (mod[_mod][i] + top * base) % _mod; (base *= 2) %= _mod; } } ll bit_count() { return nz; } ll operator[](ll k) { return num[k] - '0'; } ll subseq_mod(ll l, ll r, ll m) { // s1 s2 ... sl .... sr ... sn // the modulo of 00 ... 0 sl ... sr 00 ... 0 assert(l <= r); ll tot = mod[m][sz]; ll ls = modf(tot - mod[m][sz - l], m); ll rs = mod[m][sz - r]; return modf(tot - ls - rs, m); } bool operator<(BigInt10 &n2) const { if (num.length() < n2.size()) return true; else if (num.length() > n2.size()) return false; rep(i, num.length()) if (ll(num[i] - '0') != n2[i]) return ll(num[i] - '0') < n2[i]; return false; } bool operator>(BigInt10 &n2) const { if (num.length() > n2.size()) return true; else if (num.length() < n2.size()) return false; rep(i, num.length()) if (ll(num[i] - '0') != n2[i]) return ll(num[i] - '0') > n2[i]; return num > n2.num; } }; istream &operator>>(istream &is, BigInt2 &a) { return is >> a.num; } ostream &operator<<(ostream &os, BigInt2 &a) { return os << a.num; } struct MedianManager { ll sz = 0, median = 0; priority_queue<ll> lower; priority_queue<ll, vl, greater<ll>> upper; vl in, out; ll ini; MedianManager(ll _ini = -INF) { ini = _ini; in = out = vl(2, _ini); } void update(ll v) { sz++; if (sz == 1) median = v, in[0] = in[1] = out[0] = out[1] = ini; else if (sz % 2 == 0) { if (v < median) lower.push(v), upper.push(median), in[0] = v, in[1] = median, out[0] = out[1] = ini; else lower.push(median), upper.push(v), in[0] = median, in[1] = v, out[0] = out[1] = ini; } else if (sz % 2) { ll lower_top = lower.top(), upper_bottom = upper.top(); if (v < lower_top) median = lower_top, lower.pop(), lower.push(v), in[0] = v, out[0] = median, in[1] = out[1] = ini; else if (v > upper_bottom) median = upper_bottom, upper.pop(), upper.push(v), in[1] = v, out[1] = median, in[0] = out[0] = ini; else median = v, in[0] = out[0] = in[1] = out[1] = ini; } } ll size() { return sz; } pl medians() { return sz % 2 ? mp(median, median) : mp(lower.top(), upper.top()); } }; struct RangeTypeQuery { ll n, cur, Q; vl types, most_right, ans; vtp3 queries; BinaryIndexedTree bit; RangeTypeQuery(ll _n, ll _Q, BinaryIndexedTree _bit) : bit(_bit) { n = _n, Q = _Q, cur = 0; queries.resize(Q); ans.resize(Q); types.resize(n); most_right = vl(n, -1); } void get_queries(ll offset = -1) { rep(i, Q) { ll l, r; in2(l, r); l += offset, r += offset; queries[i] = {r, l, i}; } sort(all(queries)); } void get_sequence(ll offset = -1) { rep(i, n) { in1(types[i]); types[i] += offset; // type num must be less than n. assert(types[i] <= n - 1); } } void update(ll nxt) { while (cur <= nxt) { if (most_right[types[cur]] != -1) bit.update(most_right[types[cur]], -1); most_right[types[cur]] = cur; bit.update(most_right[types[cur]], 1); cur++; } } void process_queries() { rep(i, Q) { ll l, r, v, idx; tie(r, l, idx) = queries[i]; update(r); v = bit.query(l, r); ans[idx] = v; } } }; ll gcd(ll m, ll n) { ll a = max(m, n); ll b = min(m, n); while (b != 1 && b != 0) { a %= b; swap(a, b); } return b == 1 ? 1 : a; } ll lcm(ll m, ll n) { return m / gcd(m, n) * n; } ll power_normal(ll a, ll power) { ll value = 1; while (power != 0) { if (power & 1) value = value * a; a = a * a; power = power >> 1; } return value; } ll power_mod(ll a, ll power, ll mod) { __int128_t value = 1; __int128_t b = a; while (power != 0) { if (power & 1) value = (value * b) % mod; b = (b * b) % mod; power = power >> 1; } return value % mod; } ll modinv(ll a, ll mod) { return power_mod(a, mod - 2, mod); } ll combination(ll n, ll r, ll mod) { if (n == r && n == 0) return 1; else if (n <= 0 || r < 0 || r > n) return 0; ll numerator = 1; ll denomenator = 1; for (ll i = 0; i < r; i++) { ll num = (n - i) % mod, den = (i + 1) % mod; (numerator *= num) %= mod; (denomenator *= modinv(den, mod)) %= mod; } return (numerator * denomenator) % mod; } vl2 pascal_triangle(ll n) { /* Complexity: O(n^2) The upper bound of n is nearly 50. Parameters ---------- n; the size of returned vector Returns ------- comb[i][j]: combination(i, j). 0 <= i <= n, 0 <= j <= i */ vl2 comb(n + 1, vl(n + 1)); comb[0][0] = 1; For(i, 1, n + 1) rep(j, i + 1) { comb[i][j] += comb[i - 1][j]; if (j > 0) comb[i][j] += comb[i - 1][j - 1]; } return comb; } ld log_combination(ll n, ll r) { if (n == r && n == 0) return 0; else if (n <= 0 || r < 0 || r > n) return -INF; ld val = 0; for (ll i = 0; i < r; i++) { val += log(n - i); val -= log(i + 1); } return val; } string bin_expression(ll n, ll dig) { string s = ""; rep(i, dig) { s += to_string(n % 2); n /= 2; } reverse(all(s)); return s; } bool is_prime(ll n) { if (n <= 1) return false; for (ll i = 2; i * i <= n; i++) { if (n % i == 0) return false; } return true; } vl eratosthenes(ll n, vl &div) { // return the list of prime number up to n div = vl(n + 1, 0); vl ps; rep(i, n + 1) div[i] = i; For(i, 2, n + 1) { if (div[i] == i) { for (ll j = 2 * i; j <= n; j += i) chmin(div[j], i); ps.pb(i); } } return ps; } map<ll, ll> quick_prime_factorization(vl &div, ll n) { // ABC177E using the div from eratosthenes map<ll, ll> table; while (n != 1) { table[div[n]]++; n /= div[n]; } return table; } map<ll, ll> prime_factorization(ll n) { ll i = 2; map<ll, ll> table; while (i * i <= n) { while (n % i == 0) { table[i]++; n /= i; } i++; } if (n > 1) table[n] = 1; return table; } vl divisor_table(ll n, bool asc = true) { vl table; ll i = 1; while (i * i <= n) { if (n % i == 0) { table.pb(i); if (i * i != n) table.pb(n / i); } i++; } if (asc) sort(all(table)); else sort(rall(table)); return table; } ll euler_function(ll x) { // the number of coprime numbers for x (including 1) vl dt = divisor_table(x, false); ll ret = x; map<ll, ll> cnt; for (ll d : dt) { if (d == 1) continue; cnt[d] = x / d; for (auto &c : cnt) if (c.e1 != d && c.e1 % d == 0) cnt[d] -= c.e2; ret -= cnt[d]; } return ret; } vl base_converter(ll num, ll base, ll sz) { vl coefs(sz); ll cur = 0; while (num) { ll val = num % base; assert(cur < sz); coefs[cur++] = val; num -= val, num /= base; } while (cur < sz) coefs[cur++] = 0; return coefs; } string indexed_alphabet(ll leng, ll idx) { // 0-indexed // returns the string whose order is the-idx-th in the set of strings of the // given length. string ret = ""; if (idx >= power_normal(26, leng)) return ret; vl cs = base_converter(idx, 26, leng); reverse(all(cs)); rep(i, cs.size()) ret += char('a' + cs[i]); return ret; } ll alphabetical_index(string s) { // including the strings whose length is less than that of s. // excluding the empty string. ll leng = s.length(); ll ret = 0, p = 1; rep(i, leng) { ll b = s[leng - 1 - i] - 'a'; ret += p + p * b, p *= 26; } return ret; } // just change the input if you want to change the target. // If you want to check the common sequences in two strings, // combine them. e.g. ABC150F template <typename T> vl z_algorithm(T &s, ll n) { /* Paramters --------- T: the string or list of interest n: the size of string or list Returns ------- res[i] is the maximum number of K which satisfies s[:K] == s[i:i + K] for each i = 0, 1, 2, ..., n - 1. */ vl res(n); res[0] = n; ll i1 = 1, i2 = 0; while (i1 < n) { /* i1: the starting point i2: the length of substring */ while (i1 + i2 < n && s[i2] == s[i1 + i2]) ++i2; res[i1] = i2; if (i2 == 0) { ++i1; continue; } ll i3 = 1; // update the already seen points while (i1 + i3 < n && i3 + res[i3] < i2) { res[i1 + i3] = res[i3]; ++i3; } // update up to i1 + i3 and the next possible minimum length is i2 - i3 (= // res[i3]) i1 += i3, i2 -= i3; } return res; } ll string_to_ll(string s) { ll l = s.length(); ll idx = 0; ll val = 0; ll tenth = 1; while (idx < l) { ll m = s[l - 1 - idx] - '0'; val += (m * tenth); tenth *= 10; idx++; } return val; } string reflected_string(string s) { string t, u; ll n = s.length(); t = s; reverse(all(t)); u = substring(t, 0, n - 2) + s + substring(t, 1, n - 1); return u; } ld distance_between_point_line(point l_begin, point l_end, point p) { ll xl1 = l_begin.x, yl1 = l_begin.y; ll xl2 = l_end.x, yl2 = l_end.y; ll xp = p.x, yp = p.y; ll a = yl2 - yl1; ll b = -xl2 + xl1; ll c = -a * xl2 - b * yl2; return abs(ld(a * xp + b * yp + c)) / ld(sqrt(a * a + b * b)); } bool is_cross(point l1_begin, point l1_end, point l2_begin, point l2_end) { ll x1 = l1_begin.x, y1 = l1_begin.y; ll x2 = l1_end.x, y2 = l1_end.y; ll x3 = l2_begin.x, y3 = l2_begin.y; ll x4 = l2_end.x, y4 = l2_end.y; ll val1 = (x1 - x2) * (y3 - y1) + (y1 - y2) * (x1 - x3); ll val2 = (x1 - x2) * (y4 - y1) + (y1 - y2) * (x1 - x4); ll val3 = (x3 - x4) * (y1 - y3) + (y3 - y4) * (x3 - x1); ll val4 = (x3 - x4) * (y2 - y3) + (y3 - y4) * (x3 - x2); return val1 * val2 < 0 && val3 * val4 < 0; } template <typename T> bool isColinear(T p1, T p2, T p3) { T v1 = p2 - p1, v2 = p3 - p1; return v1.x * v2.y == v1.y * v2.x; } template <typename T> T PerpendicularBisector(T p1, T p2) { T vec = p2 - p1; assert(!vec.is_zero()); T ret = {vec.y, -vec.x}; return ret; } template <typename T> ld Distance2DPoints(T p1, T p2) { T vec = (p1 - p2) * (p1 - p2); return sqrt(vec.x + vec.y); } ll SquaredDistance2DPoints(point p1, point p2) { point vec = (p1 - p2) * (p1 - p2); return vec.x + vec.y; } ld space_of_triangle(point p1, point p2, point p3) { ll x1 = p1.x, y1 = p1.y; ll x2 = p2.x, y2 = p2.y; ll x3 = p3.x, y3 = p3.y; ll v1 = x2 - x1; ll u1 = y2 - y1; ll v2 = x3 - x1; ll u2 = y3 - y1; ld s = ld(v1 * u2 - u1 * v2) / ld(2); return abs(s); } pair<point, ll> OuterCenter(point p1, point p2, point p3) { // the center of circle on the given three points // return the determinant value and the product of center points and 2 * // determinant value point ret; if (isColinear(p1, p2, p3)) { ll d1 = SquaredDistance2DPoints(p1, p2); ll d2 = SquaredDistance2DPoints(p2, p3); ll d3 = SquaredDistance2DPoints(p3, p1); if (d1 >= d2 && d1 >= d3) { ret = p1 + p2; return mp(ret, 2); } else if (d2 >= d1 && d2 >= d3) { ret = p2 + p3; return mp(ret, 2); } else { ret = p3 + p1; return mp(ret, 2); } } point pv1 = PerpendicularBisector(p1, p2); point pv2 = PerpendicularBisector(p1, p3); point cv1_2x = p1 + p2, cv2_2x = p1 + p3; // cv1 + k pv1 == cv2 + m pv2 // (pv1x -pv2x) (k) = (cv2x - cv1x) // (pv1y -pv2y) (m) = (cv2y - cv1y) ll det_inv = -pv1.x * pv2.y + pv1.y * pv2.x; ll x1_2x = cv2_2x.x - cv1_2x.x, x2_2x = cv2_2x.y - cv1_2x.y; pl c_2x_det = {-pv2.y * x1_2x + pv2.x * x2_2x, -pv1.y * x1_2x + pv1.x * x2_2x}; // ret.x = ld(cv1_2x.x * det_inv + pv1.x * c_2x_det.e1) / ld(2 * det_inv); // ret.y = ld(cv1_2x.y * det_inv + pv1.y * c_2x_det.e1) / ld(2 * det_inv); ret.x = cv1_2x.x * det_inv + pv1.x * c_2x_det.e1; ret.y = cv1_2x.y * det_inv + pv1.y * c_2x_det.e1; ll jacobian = 2 * det_inv; return mp(ret, jacobian); } ll inversion_number(vl a, ll a_max) { /* Paramters --------- a: vector<ll> All the elements must be non-negative. Prefably the elements are compressed to reduce the computational cost. a_max: ll The maximum value of the vector a or the value bigger than the value stated previously. */ BinaryIndexedTree bit(a_max + 1); ll val = 0; rep(i, a.size()) { // i is the number of elements that have lower index than a[i]. // call the number of elements that have lower value than a[i] // by subtracting these two, the residual number is the number of elements // that have larger value. val += i - bit.query(a[i] - 1); // cumulative sum from 0 to a[i] - 1 bit.update(a[i], 1); } return val; } ld bin_search(ld left, ld right, bool lb, function<bool(ld)> judge) { ld mid; while (right - left > EPS * 5) { mid = (right + left) / 2; if (lb) { if (judge(mid)) right = mid; else left = mid + EPS; } else { if (judge(mid)) left = mid; else right = mid - EPS; } } return right; } ll bin_search(ll left, ll right, bool lb, function<bool(ll)> judge) { ll mid; while (right > left) { if (lb) { // if true (satisfies the condition), range shifts smaller direction mid = (right + left) / 2; if (judge(mid)) right = mid; else left = mid + 1; } else { // if true (satisfies the condition), range shitfs larger direction mid = (right + left + 1) / 2; if (judge(mid)) left = mid; else right = mid - 1; } } return right; } ld trinary_search(ld left, ld right, function<ld(ld)> func) { // Care the value EPS!!! Compare to the condition while (abs(right - left) > EPS) { ld left2 = (2.0 * left + right) / 3.0; ld right2 = (left + 2.0 * right) / 3.0; ld f1 = func(left2); ld f2 = func(right2); if (f1 <= f2) right = right2; else if (f2 <= f1) left = left2; } return right; } template <typename T> vector<T> compress(vector<T> v) { // sort and remove all the duplicated values sort(all(v)); v.erase(unique(all(v)), v.end()); return v; } template <typename T> map<T, ll> dict(const vector<T> &v) { map<T, ll> d; rep(i, v.size()) d[v[i]] = i; return d; } points compress2D(vl xs, vl ys) { /* NOTE ---- Add the corner points if required */ ll n = xs.size(); vl xcs = compress(xs), ycs = compress(ys); map<ll, ll> xd = dict(xcs), yd = dict(ycs); points ps(n); rep(i, n) xs[i] = xd[xs[i]], ys[i] = yd[ys[i]]; rep(i, n) ps[i] = {xs[i], ys[i]}; sort(all(ps)); return ps; } ll kruskal(vector<undirected_edge> &es, ll n_vertex) { // O(ElogE) sort(all(es)); UnionFind uf(n_vertex); ll min_cost = 0; rep(i, es.size()) { undirected_edge &e = es[i]; if (!uf.is_same(e.from, e.to)) { min_cost += e.cost; uf.unite(e.from, e.to); } } return min_cost; } ll LongestIncreasedSequence(vl &v) { ll n = v.size(); vl dp(n, INF); rep(i, n) * lower_bound(all(dp), v[i]) = v[i]; return lower_bound(all(dp), INF) - dp.begin(); } void dijkstra(ll start, Graph &graph, vl &dist, vl &vertex_pre, bool trace = false) { priority_queue<pl, vpl, greater<pl>> q; ll n = graph.size(); dist = vl(n, INF); dist[start] = 0; if (trace) vertex_pre = vl(n, -1); q.push(pl(0, start)); while (!q.empty()) { ll idx, cost; tie(cost, idx) = q.top(); q.pop(); if (dist[idx] < cost) continue; for (auto &e : graph[idx]) if (chmin(dist[e.to], dist[idx] + e.cost)) { if (trace) vertex_pre[e.to] = idx; q.push(pl(dist[e.to], e.to)); } } } vl get_predecessor(ll g, vl &vertex_pre) { vl path; for (; g != -1; g = vertex_pre[g]) path.pb(g); reverse(all(path)); return path; } void warshall_floyd(vl2 &dist) { ll n = dist.size(); // Dont forget the initialization // rep(i, n) rep(j, n) dist[i][j] = INF * (i != j); rep(k, n) rep(i, n) rep(j, n) dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j]); } void update_warshall_floyd(vl2 &dist, ll v1, ll v2, ll cost) { ll n = dist.size(); if (!chmin(dist[v1][v2], cost)) return; dist[v2][v1] = dist[v1][v2]; rep(i, n) rep(j, n) dist[i][j] = min(dist[i][j], dist[i][v1] + dist[v1][j]); rep(i, n) rep(j, n) dist[i][j] = min(dist[i][j], dist[i][v2] + dist[v2][j]); } // ABC061D, 137E bool find_negative_cycle(ll n, ll goal, Graph &graph, vl &dist) { rep(i, n) rep(v, n) rep(k, graph[v].size()) { edge e = graph[v][k]; if (dist[e.to] != INF && dist[e.to] > dist[v] + e.cost) { dist[e.to] = -INF; if (goal == -1) return true; else if (goal == e.to) return true; } } return false; } bool bellman_ford(ll start, ll goal, Graph &graph, vl &dist) { // if there is a closed circuit, it returns false. (when goal == -1) // if the distance to goal cannot be obtained, it returns false (when goal != // -1) ll n = graph.size(); dist = vl(n, INF); dist[start] = 0; rep(i, n) rep(v, n) rep(k, graph[v].size()) { edge e = graph[v][k]; if (dist[v] != INF && dist[e.to] > dist[v] + e.cost) dist[e.to] = dist[v] + e.cost; } if (find_negative_cycle(n, goal, graph, dist)) return false; return true; } void Euler_Tour(Graph &tree, vl &euler_tour, vl &in, vl &out, ll anc = 0) { // record only when we first reach a node and leave the node. ll n = tree.size(); vb visited(n, false); in = out = vl(n); auto dfs = [&](auto dfs, ll source) -> void { visited[source] = true; in[source] = euler_tour.size(); euler_tour.pb(source); bool is_leaf = true; for (auto &e : tree[source]) { ll target = e.to; if (visited[target]) continue; else is_leaf = false; dfs(dfs, target); } euler_tour.pb(-source); out[source] = euler_tour.size() - 1; }; dfs(dfs, anc); } void Euler_Tour2(Graph &tree, vl &euler_tour, vl &in, vl &out, ll anc = 0) { // record everytime we reach a node ll n = tree.size(); vb visited(n, false); in = out = vl(n); auto dfs = [&](auto dfs, ll source) -> void { visited[source] = true; in[source] = euler_tour.size(); euler_tour.pb(source); bool is_leaf = true; for (auto &e : tree[source]) { ll target = e.to; if (visited[target]) continue; else is_leaf = false; dfs(dfs, target); euler_tour.pb(source); } out[source] = euler_tour.size() - 1; }; dfs(dfs, anc); } std::mt19937 create_rand_engine() { std::random_device rnd; std::vector<std::uint_least32_t> v(10); std::generate(v.begin(), v.end(), std::ref(rnd)); std::seed_seq seed(v.begin(), v.end()); return std::mt19937(seed); } vl generate_unique_array(const size_t sz, ll vm, ll vM) { const size_t range = static_cast<size_t>(vM - vm + 1); const size_t num = static_cast<size_t>(sz * 1.2); assert(vm <= vM); assert(sz <= range); vl ret; auto engine = create_rand_engine(); std::uniform_int_distribution<ll> distribution(vm, vM); while (ret.size() < sz) { while (ret.size() < num) ret.pb(distribution(engine)); sort(all(ret)); auto unique_end = unique(all(ret)); if (sz < distance(ret.begin(), unique_end)) unique_end = next(ret.begin(), sz); ret.erase(unique_end, ret.end()); } return ret; } vl generate_array(const size_t sz, ll vm, ll vM) { const size_t range = static_cast<size_t>(vM - vm + 1); assert(vm <= vM); vl ret; auto engine = create_rand_engine(); std::uniform_int_distribution<ll> distribution(vm, vM); while (ret.size() < sz) ret.pb(distribution(engine)); return ret; } template <typename T> void read_vector(ll n, vector<T> &v, ll offset = 0) { v.resize(n); rep(i, n) { in1(v[i]); if (offset) v[i] += offset; } } template <typename T> void read_vector(ll n, vector<T> &v1, vector<T> &v2, ll offset1 = 0, ll offset2 = 0) { v1.resize(n); v2.resize(n); rep(i, n) { in2(v1[i], v2[i]); if (offset1) v1[i] += offset1; if (offset2) v2[i] += offset2; } } void read_points(ll n, points &ps, ll offset = 0) { ps.resize(n); rep(i, n) { ll x, y; in2(x, y); ps[i] = {x, y}; ps[i] += offset; } } void read_2DMap(ll w, ll h, vb2 &block, char b) { block = vb2(w, vb(h, false)); string s; rep(y, h) { in1(s); rep(x, w) block[x][y] = (s[x] == b); } } ll diameter_of_tree(Graph &tree) { ll dM = 0, vM = 0, v1, v2; auto dfs = [&](auto dfs, ll src, ll par, ll d) -> void { if (chmax(dM, d)) vM = src; for (auto &e : tree[src]) { if (e.to == par) continue; dfs(dfs, e.to, src, d + 1); } }; dfs(dfs, 0, -1, 0); v1 = vM; dfs(dfs, vM, -1, 0); v2 = vM; return dM; } void trit_search(ll n, function<void(ll, ll)> func) { rep(bit, 1LL << n) { ll sub = bit; do { func(bit, sub); sub = (sub - 1) & bit; } while (sub != bit); } } ll convert_string_to_int(string s, ll n_below_decimal) { // return double(s) * coef ll ret = 0, comma = s.length(), n10 = 1, coef = power_normal(10, n_below_decimal); rep(i, s.length()) if (s[i] == '.') comma = i; revrep(i, comma) { ll num = s[i] - '0'; ret += n10 * num; n10 *= 10; } ret *= coef; n10 = coef / 10; For(i, comma + 1, s.length()) { ll num = s[i] - '0'; ret += n10 * num; n10 /= 10; } return ret; } void iter_combination(ll n, ll k, function<void(ll)> func) { /* sub & -sub: the binary which shares the last digit whose value is 1 in sub sub + x : carry up the last digit ~y : the binary whose digits are 1 if y's digit is 0. (sub & ~y) / x: reduce the same number of 0s after first 1 in x from (sub & ~y). */ auto next_combination = [&](ll sub) -> ll { ll x = sub & -sub, y = sub + x; if (x != 0) return (((sub & ~y) / x) >> 1) | y; else return INF; }; ll M = 1LL << n; for (ll bit = (1LL << k) - 1; bit < M; bit = next_combination(bit)) func(bit); } ll count_in_sorted_seq(vl &as, ll val) { ll lb = lower_bound(all(as), val) - as.begin(); ll ub = upper_bound(all(as), val) - as.begin(); return ub - lb; } bool win_first_player(vl &grundy_nums) { ll x = 0; for (ll &gn : grundy_nums) x ^= gn; return x != 0; } ll create1001001(ll num, ll m, ll num_of_1, ll nb = 31) { // e.g. 1001001001 -> num = 3 // e.g. 111111 -> num = 1 (REPUNIT) // Calculate the modulo m of 100..100...100..1 (the length of each 00... is // num - 1. The # of 1 is 2^i.) Then calculate the modulo m of // 100...100...100...1 (The # of 1 is num_of_1 using the memo.) vl memo(nb, 1); ll v = 0, tot = 1, coef = power_mod(10, num, m); rep(j, nb) { ll c10 = power_mod(coef, 1LL << j, m); memo[j + 1] = ((memo[j] * c10) % m + memo[j]) % m; if (num_of_1 >> j & 1) { (v += (memo[j] * tot) % m) %= m; (tot *= power_mod(coef, 1LL << j, m)) %= m; } } return v; } ll GaussJordanBitVector(vl &bs) { ll n = bs.size(); ll rank = 0; ll j = 0; revrep(i, N_DIGITS) { for (j = rank; j < n; j++) if (bs[j] & (1LL << i)) break; if (j == n) continue; if (j > rank) bs[rank] ^= bs[j]; for (j = 0; j < n; j++) if (j != rank) bs[j] = min(bs[j], bs[j] ^ bs[rank]); rank++; } return rank; } ll GaussJordan(vl2 &A, ll mod, bool is_extended = false, bool det = false) { /* Ax = b Parameters ---------- A: m x n matrix The matrix of interest is_extended: bool if A includes the term of b (e.g. when solving linear equation), true otherwise false. Property: The product of diagonal elements of upper triangle matrix is equal to the determinant of this matrix. */ ll rank = 0, m = A.size(), n = A[0].size(); rep(r, m) rep(c, n) A[r][c] = modf(A[r][c], mod); ll pivot, inv, ret = 1; vl tmp; if (det) tmp = vl(n); rep(c, n) { if (is_extended && c == n - 1) break; pivot = -1; For(r, rank, m) if (A[r][c] != 0) { pivot = r; break; } if (pivot == -1) { if (det) return 0; continue; } swap(A[pivot], A[rank]); ret = modf(ret * A[rank][c], mod), inv = modinv(A[rank][c], mod); vl &ax = det ? tmp : A[rank]; rep(c2, n) ax[c2] = A[rank][c2] * inv % mod; rep(r, m) if (r != rank && A[r][c]) { ll base = A[r][c]; rep(c2, n) A[r][c2] = modf(A[r][c2] - ax[c2] * base, mod); } ++rank; } return det ? ret : rank; } ll linear_equation(vl2 A, vl b, vl &res) { ll m = A.size(), n = A[0].size(); vl2 M(m, vl(n + 1)); rep(r, m) { rep(c, n) M[r][c] = A[r][c]; M[r][n] = b[r]; } ll rank = GaussJordan(M, true); For(r, rank, m) if (M[r][n]) return -1; res.assign(n, 0); rep(i, rank) res[i] = M[i][n]; return rank; } ll determinant(vl2 &A, ll mod) { return GaussJordan(A, mod, false, true); }; /* #5. shakutori method (syakutori, two pointers technique) // 1. strech right side while the condition is met. // 2. renew the answer // 3. increments left side // 4. Back to 1. (l <= r must be satisfied all the time.) ll l = 0, r = 0; while (l < n){ if (l == r) r++; while(r < n && cond) r++; l++; } prl(answer); #11. bfs ABC146D, ABC007C 1. first create a graph. 2. start searching from a node. 3. do some processes and push nodes connected with a given target node in BFS. 4. repeat a series of procedure until queue is empty. ll n; in1(n); queue<tp3> q; vb visited(n, false); auto bfs = [&](ll src, ll par){ visited[src] = true; for (auto& e: graph[src]){ if (e.to != par && !visited[e.to]){ q.push(mt(e.to, src, ...)); } } }; q.push(mt(0, -1, 0)); while(!q.empty()){ ll src, par, ...; tie(src, par, ...) = q.front(); q.pop(); bfs(src, par, ...); } Grundy number (ARC038C) void grundy(ll x, vl& gn){ // the example from the ari book // the player can take a[0], a[1], ..., a[k - 1] coins from 1 mountain set<ll> s; rep(i, k) if (a[i] <= x) s.insert(gn[x - a[i]]) while (s.count(gn[x])) gn[x]++; } */ /* x: 1001 1010 1100 1011 1101 1111 x & ~ x: 0001 0010 0100 0001 0001 0001 sum: 1010 1100 10000 1100 1100 10000 ####### Attention ####### S | (1 << i) -> S union {i} S & ~(1 << i) -> S - {i} # inclusion-exclusion principle |U[i = 1 to n] Ai| = sum[i = 1 to n] |Ai| - sum[i < j]|Ai ^ Aj| + ... + (-1)^(n - 1) |^[i = 1 to n]Ai| */ const ll MAX_N = 200005; const size_t MAX_BIT = 160 * 160 + 10; typedef bitset<MAX_BIT> bts; typedef vector<bts> vbt; typedef vector<vbt> vbt2; typedef vector<vbt2> vbt3; const bool multiple_queries = false; void solve() { /* *** 注意 *** ・マイナスの整数の除算が0 (マイナスのときはCeil関数になる)になって,マイナスの判定ができていない. ・MODの逆元を取るときは素数か否かに注意. ・Queue, stack, deque等で必ず`empty`なら飛ばすようにする. ・set, multisetで`RE`を起こすときは初期段階で解法に影響が出ないようなダミーをsetに入れておくとエラーを回避できる. ・掛け算のOverflow注意.(x * y > 10^18 -> x > 10^18 / y) のような形で判定するとよい. ・総和を取る公式 (1+2+...+n = n * (n + 1) / 2)の計算時等で最終的には10^18に収まる場合は`/2`の順序を早める. ・Bit演算をするときに`a ^ b != c`のような式は代入演算子になったりするので注意. (ABC150F) ・aborted (core dumped) のエラーが出ているときは変数の二重宣言やベクトルの区間外参照を確認. ・`tuple`のコンパイルエラーは`make_tuple(a, b, c, ...)`で回避. ・グラフの最短経路と木の最短経路は同じDFSでも更新方法に注意. (ABC148E) ・Running Errorの1つとして,関数の返り値のタイプが定義されているのに何も返していないことが考えられる. ・Running Errorとしてベクトルサイズが0であるにもかかわらずsortをしている場合がある. ・境界条件は必ず試す. ・Overflow不等式: (前提条件:a, b, c > 0) 1. a * b <= c -> a <= c / b 2. a * b < c -> a <= c / b && (c % b || a != c / b) 3. c <= a * b -> (c + b - 1) / b <= a 4. c < a * b -> (c + b - 1) / b <= a && (c % b || a != c / b) */ // generate_array(size, min, max); ll n; in1(n); vl as; read_vector(n, as); multiset<ll> ms; ms.insert(MOD); ms.insert(-1); ms.insert(as[0]); For(i, 1, n) { auto it = lower_bound(all(ms), as[i]); --it; if (it != ms.begin()) ms.erase(it); ms.insert(as[i]); } prl(ms.size() - 2); // ### DEBUG PART ### auto naive_solver = [&]() {}; #ifdef _LOCAL naive_solver(); #endif } void test(ll num = 0, bool verbose = false) { rep(i, max(1LL, num)) { ll t = clock(); if (verbose) prl4("\n#####", i + 1, "#####", "\n## Answer ##"); solve(); if (verbose) { prl(""); prl_time(t); } } } int main(void) { ios::sync_with_stdio(false); cin.tie(nullptr); #ifdef _LOCAL test(6, true); #else ll t = 0; if (multiple_queries) in1(t); test(t, false); #endif return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const ll MOD = 1000000007; // const ll MOD = 998244353; const ll INF = MOD * MOD; const long double EPS = 1e-12; struct mint { ll x; mint(ll x = 0) : x((x % MOD + MOD) % MOD) {} mint operator-() const { return mint(-x); } mint &operator+=(const mint a) { if ((x += a.x) >= MOD) x -= MOD; return *this; } mint &operator-=(const mint a) { if ((x += MOD - a.x) >= MOD) x -= MOD; return *this; } mint &operator*=(const mint a) { (x *= a.x) %= MOD; return *this; } mint operator+(const mint a) const { return mint(*this) += a; } mint operator-(const mint a) const { return mint(*this) -= a; } mint operator*(const mint a) const { return mint(*this) *= a; } mint pow(ll t) const { if (!t) return 1; mint a = pow(t >> 1); a *= a; if (t & 1) a *= *this; return a; } // for prime mod mint inv() const { return pow(MOD - 2); } mint &operator/=(const mint a) { return *this *= a.inv(); } mint operator/(const mint a) const { return mint(*this) /= a; } }; istream &operator>>(istream &is, const mint &a) { return is >> a.x; } ostream &operator<<(ostream &os, const mint &a) { return os << a.x; } struct edge { ll to, cost; tuple<ll, ll> get_value() { return make_tuple(to, cost); } }; struct fpoint { ld x = 0; ld y = 0; bool operator<(const fpoint &p) const { if (x == p.x) return y < p.y; return x < p.x; } bool operator==(const fpoint &p) const { if (p.x - EPS < x && x < p.x + EPS && p.y - EPS < y && y < p.y + EPS) return true; return false; } bool operator!=(const fpoint &p) const { if (p.x - EPS > x || x > p.x + EPS || p.y - EPS > y || y > p.y + EPS) return true; return false; } fpoint &operator+=(const ld a) { x += a, y += a; return *this; } fpoint &operator-=(const ld a) { x -= a, y -= a; return *this; } fpoint &operator*=(const ld a) { x *= a, y *= a; return *this; } fpoint &operator/=(const ld a) { x /= a, y /= a; return *this; } fpoint &operator+=(const fpoint p) { x += p.x, y += p.y; return *this; } fpoint &operator-=(const fpoint p) { x -= p.x, y -= p.y; return *this; } fpoint &operator*=(const fpoint p) { x *= p.x, y *= p.y; return *this; } fpoint &operator/=(const fpoint p) { x /= p.x, y /= p.y; return *this; } fpoint operator+(const fpoint p) const { return fpoint(*this) += p; } fpoint operator-(const fpoint p) const { return fpoint(*this) -= p; } fpoint operator*(const fpoint p) const { return fpoint(*this) *= p; } fpoint operator/(const fpoint p) const { return fpoint(*this) /= p; } fpoint operator+(const ld a) const { return fpoint(*this) += a; } fpoint operator-(const ld a) const { return fpoint(*this) -= a; } fpoint operator*(const ld a) const { return fpoint(*this) *= a; } fpoint operator/(const ld a) const { return fpoint(*this) /= a; } ld dot(const fpoint &p) const { return x * p.x + y * p.y; } ll cross(const fpoint &p) const { return x * p.y - y * p.x; } ld squared_norm() const { return x * x + y * y; } ld norm() const { return sqrt(x * x + y * y); } tuple<ld, ld> get_value() { return make_tuple(x, y); } ll which_quadrant() const { if (abs(x) < EPS && abs(y) < EPS) return 0; if (y > 0) return x > 0 ? 1 : 2; return x < 0 ? 3 : 4; } bool is_zero() { fpoint z = {0, 0}; return z == *this; } }; struct point { ll x = 0; ll y = 0; bool operator<(const point &p) const { if (x == p.x) return y < p.y; return x < p.x; } bool operator==(const point &p) const { if (x == p.x && y == p.y) return true; return false; } bool operator!=(const point &p) const { if (x != p.x || y != p.y) return true; return false; } point &operator+=(const ll a) { x += a, y += a; return *this; } point &operator-=(const ll a) { x -= a, y -= a; return *this; } point &operator*=(const ll a) { x *= a, y *= a; return *this; } point &operator+=(const point p) { x += p.x, y += p.y; return *this; } point &operator-=(const point p) { x -= p.x, y -= p.y; return *this; } point &operator*=(const point p) { x *= p.x, y *= p.y; return *this; } void operator++(int) { x++, y++; } void operator++() { x++, y++; } void operator--(int) { x--, y--; } void operator--() { x--, y--; } point operator+(const point p) const { return point(*this) += p; } point operator-(const point p) const { return point(*this) -= p; } point operator*(const point p) const { return point(*this) *= p; } point operator+(const ll a) const { return point(*this) += a; } point operator-(const ll a) const { return point(*this) -= a; } point operator*(const ll a) const { return point(*this) *= a; } ll dot(const point &p) const { return x * p.x + y * p.y; } ll cross(const point &p) const { return x * p.y - y * p.x; } ll squared_norm() const { return x * x + y * y; } tuple<ll, ll> get_value() { return make_tuple(x, y); } ll which_quadrant() const { if (x == 0 && y == 0) return 0; if (x >= 0 && y >= 0) return 1; else if (x <= 0 && y >= 0) return 2; else if (x <= 0 && y <= 0) return 3; else return 4; } bool is_zero() { point z = {0, 0}; return z == *this; } fpoint to_fpoint() { fpoint ret = {ld(x), ld(y)}; return ret; } }; // angle_comparator struct { template <typename T> bool operator()(const T p1, const T p2) const { ll q1 = p1.which_quadrant(); ll q2 = p2.which_quadrant(); if (q1 != q2) return q1 < q2; // judge for parallel lines // if p1 cross p2 > 0 -> sin arg(p1 -> o -> p2) > 0 return p1.cross(p2) > 0; } } angle_comparator; struct undirected_edge { ll from; ll to; ll cost; bool operator<(const undirected_edge &ue) const { return cost < ue.cost; } tuple<ll, ll, ll> get_value() { return make_tuple(from, to, cost); } }; struct event { ll loc, val, sgn; bool operator<(const event &e) const { if (loc == e.loc) return sgn == 1; return loc < e.loc; } bool operator>(const event &e) const { if (loc == e.loc) return sgn == -1; return loc > e.loc; } tuple<ll, ll, ll> get_value() { return make_tuple(loc, val, sgn); } }; typedef std::pair<ll, ll> pl; typedef std::tuple<ll, ll, ll> tp3; typedef std::tuple<ll, ll, ll, ll> tp4; typedef std::vector<ll> vl; typedef std::vector<vl> vl2; typedef std::vector<vl2> vl3; typedef std::vector<vl3> vl4; typedef std::vector<mint> vmi; typedef std::vector<vmi> vmi2; typedef std::vector<vmi2> vmi3; typedef std::vector<vmi3> vmi4; typedef std::vector<bool> vb; typedef std::vector<vb> vb2; typedef std::vector<vb2> vb3; typedef std::vector<vb3> vb4; typedef std::vector<pl> vpl; typedef std::vector<tp3> vtp3; typedef std::vector<tp4> vtp4; typedef std::vector<point> points; typedef std::vector<fpoint> fpoints; // priority queue. Taking from the higher value. Don't forget calling !q.empty() typedef std::priority_queue<ll> pq; // priority queue. Taking from the lower value typedef std::priority_queue<ll, vl, greater<ll>> pql; typedef std::vector<vector<edge>> Graph; const ll N_DIGITS = 60; const long double PI = 3.14159265358979323846; const points dirs = {{-1, 0}, {1, 0}, {0, 1}, {0, -1}, // four directions {1, 1}, {-1, 1}, {-1, -1}, {1, -1}, // diagonal {0, 0}}; // self template <typename A, typename B> string to_string(pair<A, B> p); template <typename A, typename B, typename C> string to_string(tuple<A, B, C> p); template <typename A, typename B, typename C, typename D> string to_string(tuple<A, B, C, D> p); string to_string(const string &s) { return '"' + s + '"'; } string to_string(char c) { return string(1, c); } string to_string(const char *s) { return to_string((string)s); } string to_string(bool b) { return (b ? "true" : "false"); } string to_string(mint a) { return to_string(a.x); } string to_string(point p) { return "{" + to_string(p.x) + ", " + to_string(p.y) + "}"; } string to_string(fpoint p) { return "{" + to_string(p.x) + ", " + to_string(p.y) + "}"; } string to_string(edge e) { return "{" + to_string(e.to) + ", " + to_string(e.cost) + "}"; } template <typename A, typename B> string to_string(pair<A, B> p) { return "(" + to_string(p.first) + ", " + to_string(p.second) + ")"; } template <typename A, typename B, typename C> string to_string(tuple<A, B, C> p) { return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")"; } template <typename A, typename B, typename C, typename D> string to_string(tuple<A, B, C, D> p) { return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")"; } string to_string(vector<bool> v) { bool first = true; string res = "{"; for (int i = 0; i < static_cast<int>(v.size()); i++) { if (!first) res += ", "; first = false; res += to_string(v[i]); } res += "}"; return res; } template <size_t N> string to_string(bitset<N> v) { string res = ""; for (size_t i = 0; i < N; i++) res += static_cast<char>('0' + v[i]); return res; } template <typename A> string to_string(A v) { bool first = true; string res = "{"; for (const auto &x : v) { if (!first) { res += ", "; } first = false; res += to_string(x); } res += "}"; return res; } template <typename T> string to_string(priority_queue<T> &q) { priority_queue<T> copy; bool first = true; string res = "{"; while (!q.empty()) { if (!first) { res += ", "; } first = false; res += to_string(q.top()); copy.push(q.top()); q.pop(); } swap(q, copy); res += "}"; return res; } template <typename T> string to_string(queue<T> &q) { queue<T> copy; bool first = true; string res = "{"; while (!q.empty()) { if (!first) { res += ", "; } first = false; res += to_string(q.front()); copy.push(q.front()); q.pop(); } swap(q, copy); res += "}"; return res; } void debug_out() { cerr << endl; } template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << to_string(H); debug_out(T...); } #define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++) #define revrep(i, n) for (ll(i) = (n)-1; (i) >= 0; (i)--) #define For(i, a, b) for (ll(i) = (a); (i) < (b); (i)++) #define revFor(i, b, a) for (ll(i) = (b)-1; (i) >= (a); (i)--) #define all(a) (a).begin(), (a).end() #define rall(a) (a).rbegin(), (a).rend() #define isUpper(c) ('a' - (c) > 0) #define isNum(c) (0 <= (c) - '0' && (c) - '0' <= 9) #define toLower(c) char((c) + 0x20) #define toUpper(c) char((c)-0x20) #define pb push_back #define mp make_pair #define mt make_tuple #define pr(a) std::cout << (a) #define prl(a) std::cout << (a) << endl #define prl2(a, b) std::cout << (a) << " " << (b) << endl #define prl3(a, b, c) std::cout << (a) << " " << (b) << " " << (c) << endl #define prl4(a, b, c, d) \ std::cout << (a) << " " << (b) << " " << (c) << " " << (d) << endl #define prs(a) std::cout << (a) << " " #define prs2(a, b) std::cout << (a) << " " << (b) << " " #define prs3(a, b, c) std::cout << (a) << " " << (b) << " " << (c) << " " #define prs4(a, b, c, d) \ std::cout << (a) << " " << (b) << " " << (c) << " " << (d) << " " #define yn(condition) \ if ((condition)) \ prl("Yes"); \ else \ prl("No"); #define YN(condition) \ if ((condition)) \ prl("YES"); \ else \ prl("NO"); #define in1(a) cin >> (a) #define in2(a, b) cin >> (a) >> (b) #define in3(a, b, c) cin >> (a) >> (b) >> (c) #define in4(a, b, c, d) cin >> (a) >> (b) >> (c) >> (d) #define in5(a, b, c, d, e) cin >> (a) >> (b) >> (c) >> (d) >> (e) #define in6(a, b, c, d, e, f) cin >> (a) >> (b) >> (c) >> (d) >> (e) >> (f) #define in7(a, b, c, d, e, f, g) \ cin >> (a) >> (b) >> (c) >> (d) >> (e) >> (f) >> (g) #define e1 first #define e2 second #define popcount(i) __builtin_popcountl((i)) #define Forchar(c, a, z) for (char(c) = (a); (c) <= (z); (c)++) #define cntchar(s, c) count(all((s)), c) #define substring(s, start, end) s.substr((start), (end) - (start) + 1) #define prl_nd(num, digits) \ std::cout << fixed << setprecision(digits) << (num) << endl; #define prl_time(s) \ prl3("Elapsed Time:", 1000.0 * (clock() - s) / CLOCKS_PER_SEC, "[ms]"); #define char_to_str(c) string(1, (c)) #ifdef _LOCAL #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__) #else #define debug(...) 42 #endif ll modf(ll x, ll m) { return (x % m + m) % m; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } struct MaxFlow { struct F_edge { ll to, rev, capacity; F_edge(ll to, ll rev, ll capacity) : to(to), rev(rev), capacity(capacity) {} }; typedef vector<F_edge> F_edges; vector<F_edges> graph; ll n_vertex; // level is the shortest path to get a given node from the source node. vl level, iter; MaxFlow(ll n_vertex) : n_vertex(n_vertex) { graph.resize(n_vertex); } void add_edge(ll from, ll to, ll capacity = 1) { graph[from].pb({to, ll(graph[to].size()), capacity}); graph[to].pb({from, ll(graph[from].size()) - 1, 0}); } void bfs(ll source) { level = vl(n_vertex, -1); level[source] = 0; queue<ll> q; q.push(source); while (!q.empty()) { ll vertex = q.front(); q.pop(); rep(i, graph[vertex].size()) { ll target = graph[vertex][i].to; ll cap_target = graph[vertex][i].capacity; // if the flow can be into the target node, implement below. if (cap_target > 0 && level[target] < 0) { level[target] = level[vertex] + 1; q.push(target); } } } } ll dfs(ll vertex, ll sink, ll flow) { if (vertex == sink) return flow; for (ll &i = iter[vertex]; i < graph[vertex].size(); i++) { ll target = graph[vertex][i].to; ll cap_target = graph[vertex][i].capacity; ll rev_target = graph[vertex][i].rev; // if capasitiy is not full yet and target is farther, // then assign current flow. if (cap_target > 0 && level[vertex] < level[target]) { ll d = dfs(target, sink, min(cap_target, flow)); if (d > 0) { // if the flow successfully reaches the sink, reduce the // flow from the capacity graph[vertex][i].capacity -= d; graph[target][rev_target].capacity += d; return d; } } } return 0; } ll dinic(ll source, ll sink) { // complexity O(EV^2) ll flow = 0; while (true) { bfs(source); // if there is no path leading to the sink, the maximum flow is 0. if (level[sink] < 0) return flow; iter = vl(n_vertex, 0); ll f; while ((f = dfs(source, sink, INF)) > 0) flow += f; } } }; struct UnionFind { vl parents, set_size; set<ll> root_idx; ll n_groups; UnionFind(ll n) { parents = set_size = vl(n); n_groups = n; rep(i, n) { parents[i] = i; set_size[i] = 1LL; root_idx.insert(i); } } ll root_find(ll x) { if (parents[x] == x) return x; return parents[x] = root_find(parents[x]); } void unite(ll x, ll y) { // priority for x is larger than that of y x = root_find(x); y = root_find(y); if (x == y) return; parents[y] = x, set_size[x] += set_size[y]; root_idx.erase(y); n_groups--; } // connected or not bool is_same(ll x, ll y) { return root_find(x) == root_find(y); } ll size(ll x) { return set_size[root_find(x)]; } }; struct WeightedUnionFind { vl parents, set_size, weights; set<ll> root_idx; ll n_groups; WeightedUnionFind(ll n) { parents = set_size = weights = vl(n); n_groups = n; rep(i, n) { parents[i] = i; set_size[i] = 1LL; weights[i] = 0; root_idx.insert(i); } } ll root_find(ll x) { if (parents[x] == x) return x; ll r = root_find(parents[x]); weights[x] += weights[parents[x]]; return parents[x] = r; } ll weight(ll x) { root_find(x); return weights[x]; } void unite(ll x, ll y, ll w) { // priority for x is larger than that of y w += weight(x) - weight(y); x = root_find(x); y = root_find(y); if (x == y) return; parents[y] = x, set_size[x] += set_size[y]; root_idx.erase(y); weights[y] = w; n_groups--; } // connected or not bool is_same(ll x, ll y) { return root_find(x) == root_find(y); } ll size(ll x) { return set_size[root_find(x)]; } ll difference(ll x, ll y) { return weight(y) - weight(x); } }; struct Doubling { // ABC167D ll n; ll sz; vl2 next; /* next[k + 1][i] := next[k][next[k][i]] next[0][i] := edge[i] e.g. a0, a1, ..., an-1 / 0 <= ai <= n - 1 a0 -> a[a0] -> a[a[a0]] -> ... -> a[a[...[a[0]]]] (m times) Let the function repeatedly inputting a[i] m times be f[m](a[i]) - get(i, x) returns f[x](a[i]) - lower_bound(i, j) returns minimum x which satisfies f[x](a[i]) >= j. if not possible returns n. */ // edge[i]: i -> edge[i] by one operation Doubling(vl &edge) : n(edge.size()), sz(62) { next.resize(sz, vl(n, -1)); rep(i, n) next[0][i] = edge[i]; rep(k, sz - 1) rep(i, n) next[k + 1][i] = next[k][next[k][i]]; } // return the result obtained when starting from i and advancing x times ll get(ll i, ll x) { ll ret = i; rep(bit, sz) { if (!(x >> bit & 1)) continue; ret = next[bit][ret]; } return ret; } // return the iteration x where the value exceeds j for the first time. // if it is not possible, then return n. ll lower_bound(ll i, ll j) { ll cur = i, acc = 0; revrep(wid, sz) { if (next[wid][cur] < j) { acc += 1LL << wid; cur = next[wid][cur]; } } return min(n, acc + 1); } }; template <class T> class LowestCommonAncestor { public: ll N, logN; vl depth, len; T tree; vl2 parents; LowestCommonAncestor(ll n, T &_tree) { N = n; logN = 0; while (N > (1LL << logN)) logN++; depth = len = vl(N); parents = vl2(logN, vl(N)); tree = _tree; _init(0, -1, 0, 0); _build(); } void _init(ll source, ll parent, ll d, ll l) { depth[source] = d; parents[0][source] = parent; len[source] = l; rep(i, tree[source].size()) { ll target = tree[source][i].to; ll cost = tree[source][i].cost; if (target == parent) continue; _init(target, source, d + 1, cost + l); } } void _build() { rep(k, logN - 1) rep(n, N) { // if there is no parent, -1. // otherwise, the parent of the parent is the parent. if (parents[k][n] < 0) parents[k + 1][n] = -1; else parents[k + 1][n] = parents[k][parents[k][n]]; } } ll query(ll u, ll v) { if (depth[u] > depth[v]) swap(u, v); rep(k, logN) if ((depth[v] - depth[u]) >> k & 1) v = parents[k][v]; if (u == v) return u; revrep(k, logN) { if (parents[k][u] != parents[k][v]) { u = parents[k][u]; v = parents[k][v]; } } return parents[0][u]; } ll distance(ll u, ll v) { ll w = query(u, v); return len[u] + len[v] - 2 * len[w]; } }; struct BinaryIndexedTree { ll n, ini, M; vl dat; BinaryIndexedTree(ll n, ll ini = 0) : dat(n + 1, ini), n(n), ini(ini) { M = 1; while (M <= n) M <<= 1; }; // x: 1001 1010 1100 1011 1101 1111 // x & - x: 0001 0010 0100 0001 0001 0001 // ->: 1010 1100 10000 1100 1100 10000 ll update_func(ll val, ll d) { // if maximum -> max(val, dat) // return max(val, d); // if cumulative sum return val + d; } ll query(ll i) { /* v[0] + v[1] + ... + v[i] e.g.) i = 10101 itr1. 10101 -> 10100 itr2. 10100 -> 10000 itr3. 10000 -> 00000 (break) */ if (i < 0) return ini; ll ret = 0; for (ll j = i; j >= 0; j = (j & (j + 1)) - 1) { ret = update_func(ret, dat[j]); } return ret; } ll query(ll l, ll r) { // a[l] + a[l + 1] + ... + a[r - 1] + a[r] return query(r) - query(l - 1); } ll lower_bound(ll key) { // v[0] + v[1] + ... + v[left - 1] < key <= v[0] + v[1] + ... + v[left] if (key <= 0) return 0; ll left = 0, right = 1; while (right <= n) right <<= 2; for (ll i = right; i > 0; i /= 2) { if (left + i <= n && dat[left + i - 1] < key) { key -= dat[left + i - 1]; left += i; } } return left; } void update(ll i, ll val) { /* e.g.) i = 10101, n = 11111 itr1. i: 10101, i+1: 10110 -> 10111 itr2. i: 10111, i+1: 11000 -> 11111 (break) */ if (i < 0) return; for (ll j = i; j < n; j |= j + 1) { dat[j] = update_func(val, dat[j]); } } }; struct SegmentTree { ll n, ini, minimize; vl dat; // when seeking minimum // ini = INF // when seeking maximum // ini = -INF SegmentTree(ll n_, bool minimize_ = true) { n = 1; minimize = minimize_; if (minimize) ini = INF; else ini = -INF; while (n < n_) n *= 2; dat.resize(2 * n - 1); rep(i, 2 * n - 1) dat[i] = ini; }; void update(ll idx, ll val, bool force = false) { idx += n - 1; if (!force) { if (minimize && dat[idx] <= val) return; if (!minimize && dat[idx] >= val) return; } dat[idx] = val; while (idx > 0) { idx = (idx - 1) / 2; // when seeking minimum if (minimize) dat[idx] = min(dat[idx * 2 + 1], dat[idx * 2 + 2]); // when seeking maximum else dat[idx] = max(dat[idx * 2 + 1], dat[idx * 2 + 2]); } } ll query(ll l, ll r) { // ### NOTE ### // the range is [l, r] // l, l + 1, ..., r r++; // to adjust to this method return query_segment(l, r, 0, 0, n); } ll query_segment(ll a, ll b, ll idx, ll l, ll r) { assert(a <= b); if (r <= a || b <= l) return ini; if (a <= l && r <= b) return dat[idx]; else { ll seg1 = query_segment(a, b, idx * 2 + 1, l, (l + r) / 2); ll seg2 = query_segment(a, b, idx * 2 + 2, (l + r) / 2, r); // when seeking minimum if (minimize) return min(seg1, seg2); // when seeking maximum else return max(seg1, seg2); } } }; template <class Target> class RerootingTreeDP { public: using T = typename Target::type; struct DP_edge { ll to, rev; // rev is the index to trace the source node. T value; // objective value }; private: ll n; void dfs_fwd(ll source, ll parent) { ll par_idx = -1; vector<T> values; rep(i, tree[source].size()) { const DP_edge &e = tree[source][i]; if (e.to == parent) { par_idx = i; continue; } dfs_fwd(e.to, source); values.pb(e.value); } // If the parent != -1, update the value on edge from parent to source if (par_idx != -1) { ll src_idx = tree[source][par_idx].rev; // update values on the edge from parent to source tree[parent][src_idx].value = Target::merge(values); } } void dfs_bwd(ll source, ll parent) { vector<T> values; for (auto &&e : tree[source]) values.pb(e.value); values = Target::evaluate(values); rep(i, tree[source].size()) { const DP_edge &e = tree[source][i]; if (e.to == parent) continue; // tree[e.to][e.rev]: e.to -> source tree[e.to][e.rev].value = values[i]; dfs_bwd(e.to, source); } } public: UnionFind uf; vector<vector<DP_edge>> tree; RerootingTreeDP(ll n) : n(n), uf(n), tree(n) {} void add_edge(ll u, ll v, T val) { assert(!uf.is_same(u, v)); tree[u].pb({v, ll(tree[v].size()), val}); tree[v].pb({u, ll(tree[u].size()) - 1, val}); uf.unite(u, v); } void dp() { vb visited(n, false); rep(i, n) { if (visited[uf.root_find(i)]) continue; dfs_fwd(i, -1); visited[uf.root_find(i)] = true; } visited.assign(n, false); rep(i, n) { if (visited[uf.root_find(i)]) continue; dfs_bwd(i, -1); visited[uf.root_find(i)] = true; } } ll size() const { return tree.size(); } }; // ABC160F is one example // Modify the functions evaluate and merge based on given problems struct Merger { using type = ll; // This is the exaple of the number of children static type merge(const vector<type> &value) { // merge the result below the source node // each value is from each child node of the source node // value[i] := f(child i) // Here, we would like to obtain f(source) using f(child i) (i = 0, 1, ..., // n_children) ll ret = 1; for (auto &&v : value) ret += v; return ret; } static vector<type> evaluate(const vector<type> &value) { // value[i] := f(source -> child i) // we would like to obtain f(child i -> source) // child j (j != i) is the grandchildren of child i // represent f(child i -> source) using f(source -> j) (j != i) // L[i + 1] := the result using f(source -> k) (k = 0, 1, ..., i) // R[i] := the result using f(source -> k) (k = i, i + 1, ..., n_children) const ll n_children = value.size(); vl L(n_children + 1, 0), R(n_children + 1, 0); rep(i, n_children) L[i + 1] = L[i] + value[i]; revrep(i, n_children) R[i] = R[i + 1] + value[i]; vl ret(n_children); rep(i, n_children) ret[i] = L[i] + R[i + 1] + 1; return ret; } }; struct StronglyConnectedComponents { /* dag: [cmp idx][# of connected cmp] the index of connected cmp cmp: [cmp idx][# of vertex included in a cmp] the index of vertex cmp_idx: [vertex idx] the component which the vertex belongs to Use graph_rev when you would like to know the vertex with zero indegree */ ll n, n_cmp; vl2 graph, graph_rev, dag, cmp; vl order, visited, cmp_idx; StronglyConnectedComponents() {} StronglyConnectedComponents(ll sz) : n(sz), graph(sz), graph_rev(sz), visited(sz), cmp_idx(sz) {} void add_edge(ll from, ll to) { graph[from].pb(to); graph_rev[to].pb(from); } void input(ll m, ll offset = -1) { ll a, b; rep(i, m) { in2(a, b); add_edge(a + offset, b + offset); } } ll operator[](ll k) { return cmp_idx[k]; } void dfs_fwd(ll source) { visited[source] = 1; rep(i, graph[source].size()) { ll target = graph[source][i]; if (!visited[target]) dfs_fwd(target); } order.pb(source); } void dfs_bwd(ll source, ll num) { visited[source] = 1, cmp_idx[source] = num; cmp[num].pb(source); rep(i, graph_rev[source].size()) { ll target = graph_rev[source][i]; if (!visited[target]) dfs_bwd(target, num); } } ll build() { fill(all(visited), 0); order.clear(); rep(i, n) if (!visited[i]) dfs_fwd(i); fill(all(visited), 0); ll num = 0; revrep(i, order.size()) { if (!visited[order[i]]) { dag.pb(vl()); cmp.pb(vl()); dfs_bwd(order[i], num++); } } rep(i, n) for (ll to : graph[i]) if (cmp_idx[i] != cmp_idx[to]) dag[cmp_idx[i]] .pb(cmp_idx[to]); rep(i, num) { sort(all(dag[i])); dag[i].erase(unique(all(dag[i])), dag[i].end()); } return n_cmp = num; } // if the v-th vertex is in loop or not bool in_loop(ll v) { return cmp[cmp_idx[v]].size() > 1; } // if the dag has loops or not bool has_loop() { rep(i, cmp.size()) if (cmp[i].size() > 1) return true; return false; } }; struct CombinationMemo { ll sz, mod; vl fact, fact_inv, minv; CombinationMemo(ll sz, ll _mod) : sz(sz), mod(_mod) { fact.resize(sz + 5); fact_inv.resize(sz + 5); minv.resize(sz + 5); init(); } void init() { fact[0] = fact[1] = 1; minv[1] = 1; fact_inv[0] = fact_inv[1] = 1; For(i, 2, sz + 3) { fact[i] = (i * fact[i - 1]) % mod; minv[i] = mod - minv[mod % i] * (mod / i) % mod; fact_inv[i] = fact_inv[i - 1] * minv[i] % mod; } } ll nCk(ll n, ll r) { if (n == r && n == 0) return 1; else if (n <= 0 || r < 0 || r > n) return 0; ll val = (fact[n] * fact_inv[n - r]) % mod; val *= fact_inv[r]; return val % mod; } ll nPk(ll n, ll r) { if (n == r && n == 0) return 1; else if (n <= 0 || r < 0 || r > n) return 0; ll val = (fact[n] * fact_inv[n - r]) % mod; return val % mod; } }; struct PowerMemo { ll sz, mod, base; vl powB; PowerMemo(ll sz, ll base, ll _mod) : sz(sz), base(base), mod(_mod) { powB.resize(sz + 5); init(); } void init() { powB[0] = 1; rep(i, sz + 3) powB[i + 1] = (powB[i] * base) % mod; } ll operator[](ll k) { return powB[k]; } }; struct Grid2D { Graph graph; ll Width, Height; Grid2D(ll w, ll h, vb2 &block) : Width(w), Height(h) { graph.resize(w * h); _build(block); } ll pos_to_idx(point p) { return p.y * Width + p.x; } point idx_to_pos(ll idx) { return {idx % Width, idx / Width}; } bool undefined_region(point p, vb2 &block) { if (p.x < 0 || p.x > Width - 1) return true; if (p.y < 0 || p.y > Height - 1) return true; if (block[p.x][p.y]) return true; return false; } void _build(vb2 &block, ll val = 1) { rep(x, Width) rep(y, Height) { point p = {x, y}; ll idx1 = pos_to_idx(p); ll idx2; if (block[x][y]) continue; rep(i, 4) { point nxt = p + dirs[i]; idx2 = pos_to_idx(nxt); if (!undefined_region(nxt, block)) graph[idx1].pb( {idx2, val}); // dist[idx1][idx2] = val; (warshall-floyd) } } } }; struct Cumulative2D { vl2 cum; ll w, h; Cumulative2D(ll w, ll h) : w(w), h(h) { cum = vl2(w + 1, vl(h + 1, 0)); } template <typename T> void build(vector<T> &vec) { // never forget building rep(x, w + 1) cum[x][0] = 0; rep(y, h + 1) cum[0][y] = 0; rep(y, h) rep(x, w) cum[x + 1][y + 1] = cum[x][y + 1] + vec[x][y]; rep(x, w + 1) rep(y, h) cum[x][y + 1] += cum[x][y]; } ll func(ll x, ll y, ll dx, ll dy) { // 1-indexed // the rectangle of (x, y), (x + dx, y), (x, y + dy) and (x + dx, y + dy) // think about the case of (1, 1, 1, 1). if (x + dx > w || y + dy > h) return -INF; ll val = cum[x + dx][y + dy]; val += cum[x][y]; val -= cum[x][y + dy]; val -= cum[x + dx][y]; return val; } }; struct LinearSystemIncidence { struct Edge { ll idx, to; bool fwd; }; /* Ax = c A: A in R^(V * E) <- given x: x in R^E <- estimate this vector c: c in R^V <- given */ ll n_vertex, n_edge; bool mod2; vl x; vb visited; vector<vector<Edge>> graph; LinearSystemIncidence(ll n, vpl &es, bool mod2 = false) : n_vertex(n), n_edge(es.size()), mod2(mod2) { graph.resize(n); visited.resize(n); rep(i, n_edge) { auto &e = es[i]; graph[e.e1].pb({i, e.e2, true}); graph[e.e2].pb({i, e.e1, false}); } } ll dfs(vl &c, ll src) { visited[src] = true; ll ret = c[src]; for (Edge &e : graph[src]) { if (visited[e.to]) continue; ll tmp = dfs(c, e.to); x[e.idx] = e.fwd ? tmp : -tmp; ret += tmp; if (mod2) x[e.idx] = modf(x[e.idx], 2); } return mod2 ? ret % 2 : ret; } bool solve(vl &c) { x.assign(n_edge, 0); visited.assign(n_vertex, false); rep(src, n_vertex) { if (visited[src]) continue; if (dfs(c, src)) return false; } return true; } }; struct BigInt10 { string num; map<ll, vl> mod; BigInt10(string num = "0") : num(num) {} size_t size() { return num.size(); } void compute_mod(ll _mod) { ll sz = num.size(); mod[_mod] = vl(sz + 1, 0); ll tenth = 1; rep(i, sz) { ll top = num[sz - 1 - i] - '0'; mod[_mod][i + 1] = (mod[_mod][i] + top * tenth) % _mod; (tenth *= 10) %= _mod; } } ll operator[](ll k) { return num[k] - '0'; } ll subseq_mod(ll l, ll r, ll m) { // s1 s2 ... sl .... sr ... sn // the modulo of 00 ... 0 sl ... sr 00 ... 0 assert(l <= r); ll sz = num.size(); ll tot = mod[m][sz]; ll ls = modf(tot - mod[m][sz - l], m); ll rs = mod[m][sz - r]; return (tot - ls - rs + 2 * m) % m; } bool operator<(BigInt10 &n2) const { if (num.length() < n2.size()) return true; else if (num.length() > n2.size()) return false; rep(i, num.length()) if (ll(num[i] - '0') != n2[i]) return ll(num[i] - '0') < n2[i]; return false; } bool operator<=(BigInt10 &n2) const { if (num.length() < n2.size()) return true; else if (num.length() > n2.size()) return false; rep(i, num.length()) if (ll(num[i] - '0') != n2[i]) return ll(num[i] - '0') < n2[i]; return true; } bool operator>(BigInt10 &n2) const { if (num.length() > n2.size()) return true; else if (num.length() < n2.size()) return false; rep(i, num.length()) if (ll(num[i] - '0') != n2[i]) return ll(num[i] - '0') > n2[i]; return false; } bool operator>=(BigInt10 &n2) const { if (num.length() > n2.size()) return true; else if (num.length() < n2.size()) return false; rep(i, num.length()) if (ll(num[i] - '0') != n2[i]) return ll(num[i] - '0') > n2[i]; return true; } }; istream &operator>>(istream &is, BigInt10 &a) { return is >> a.num; } ostream &operator<<(ostream &os, BigInt10 &a) { return os << a.num; } BigInt10 add(BigInt10 s1, BigInt10 s2) { ll sz1 = s1.size(), sz2 = s2.size(), sz = max(sz1, sz2); ll r = abs(sz2 - sz1); string a(r, '0'); if (sz1 < sz2) s1.num = a + s1.num; else if (sz1 > sz2) s2.num = a + s2.num; bool inc = false; rep(i, sz) { ll nxt = s1[sz - 1 - i] + s2[sz - 1 - i] + inc; if (nxt >= 10) inc = true; else inc = false; s1.num[sz - 1 - i] = to_string(nxt % 10)[0]; } if (inc) s1.num = "1" + s1.num; return s1; } BigInt10 add(BigInt10 s, ll x) { return add(s, BigInt10(to_string(x))); } BigInt10 subtract(BigInt10 s1, BigInt10 s2) { ll sz1 = s1.size(), sz2 = s2.size(), sz = max(sz1, sz2); assert(sz1 >= sz2); ll r = abs(sz2 - sz1); string a(r, '0'); if (sz1 > sz2) s2.num = a + s2.num; bool dec = false; rep(i, sz) { ll nxt = s1[sz - 1 - i] - s2[sz - 1 - i] - dec; if (nxt < 0) dec = true; else dec = false; s1.num[sz - 1 - i] = to_string((nxt + 10) % 10)[0]; } ll n0 = 0; while (s1.num[n0] == '0') n0++; s1.num = substring(s1.num, n0, sz); return s1; } BigInt10 subtract(BigInt10 s, ll x) { return subtract(s, BigInt10(to_string(x))); } BigInt10 multiply(BigInt10 s, ll x) { assert(x <= 10); assert(x >= 0); if (x == 0) return BigInt10("0"); else if (x == 1) return BigInt10(s.num); if (x == 10) return BigInt10(s.num + "0"); ll sz = s.size(); ll inc = 0; rep(i, sz) { ll nxt = s[sz - 1 - i] * x + inc; inc = nxt / 10; s.num[sz - 1 - i] = to_string(nxt % 10)[0]; } if (inc) s.num = to_string(inc) + s.num; return s; } BigInt10 multiply(BigInt10 s1, BigInt10 s2) { ll sz = s2.size(); BigInt10 ret; rep(i, sz) { ll x = s2[sz - 1 - i]; ret = add(ret, multiply(s1, x)); s1.num += "0"; } return ret; } BigInt10 shift(BigInt10 s, ll k) { if (k >= s.size()) return BigInt10("0"); s.num = substring(s.num, 0, s.size() - k - 1); return s; } struct BigInt2 { string num; ll sz; map<ll, vl> mod; ll nz; BigInt2(string num) : num(num), sz(num.size()) { nz = 0; rep(i, sz) if (num[i] == '1') nz++; } size_t size() { return num.size(); } void compute_mod(ll _mod) { mod[_mod] = vl(sz + 1, 0); ll base = 1; rep(i, sz) { ll top = num[sz - 1 - i] - '0'; mod[_mod][i + 1] = (mod[_mod][i] + top * base) % _mod; (base *= 2) %= _mod; } } ll bit_count() { return nz; } ll operator[](ll k) { return num[k] - '0'; } ll subseq_mod(ll l, ll r, ll m) { // s1 s2 ... sl .... sr ... sn // the modulo of 00 ... 0 sl ... sr 00 ... 0 assert(l <= r); ll tot = mod[m][sz]; ll ls = modf(tot - mod[m][sz - l], m); ll rs = mod[m][sz - r]; return modf(tot - ls - rs, m); } bool operator<(BigInt10 &n2) const { if (num.length() < n2.size()) return true; else if (num.length() > n2.size()) return false; rep(i, num.length()) if (ll(num[i] - '0') != n2[i]) return ll(num[i] - '0') < n2[i]; return false; } bool operator>(BigInt10 &n2) const { if (num.length() > n2.size()) return true; else if (num.length() < n2.size()) return false; rep(i, num.length()) if (ll(num[i] - '0') != n2[i]) return ll(num[i] - '0') > n2[i]; return num > n2.num; } }; istream &operator>>(istream &is, BigInt2 &a) { return is >> a.num; } ostream &operator<<(ostream &os, BigInt2 &a) { return os << a.num; } struct MedianManager { ll sz = 0, median = 0; priority_queue<ll> lower; priority_queue<ll, vl, greater<ll>> upper; vl in, out; ll ini; MedianManager(ll _ini = -INF) { ini = _ini; in = out = vl(2, _ini); } void update(ll v) { sz++; if (sz == 1) median = v, in[0] = in[1] = out[0] = out[1] = ini; else if (sz % 2 == 0) { if (v < median) lower.push(v), upper.push(median), in[0] = v, in[1] = median, out[0] = out[1] = ini; else lower.push(median), upper.push(v), in[0] = median, in[1] = v, out[0] = out[1] = ini; } else if (sz % 2) { ll lower_top = lower.top(), upper_bottom = upper.top(); if (v < lower_top) median = lower_top, lower.pop(), lower.push(v), in[0] = v, out[0] = median, in[1] = out[1] = ini; else if (v > upper_bottom) median = upper_bottom, upper.pop(), upper.push(v), in[1] = v, out[1] = median, in[0] = out[0] = ini; else median = v, in[0] = out[0] = in[1] = out[1] = ini; } } ll size() { return sz; } pl medians() { return sz % 2 ? mp(median, median) : mp(lower.top(), upper.top()); } }; struct RangeTypeQuery { ll n, cur, Q; vl types, most_right, ans; vtp3 queries; BinaryIndexedTree bit; RangeTypeQuery(ll _n, ll _Q, BinaryIndexedTree _bit) : bit(_bit) { n = _n, Q = _Q, cur = 0; queries.resize(Q); ans.resize(Q); types.resize(n); most_right = vl(n, -1); } void get_queries(ll offset = -1) { rep(i, Q) { ll l, r; in2(l, r); l += offset, r += offset; queries[i] = {r, l, i}; } sort(all(queries)); } void get_sequence(ll offset = -1) { rep(i, n) { in1(types[i]); types[i] += offset; // type num must be less than n. assert(types[i] <= n - 1); } } void update(ll nxt) { while (cur <= nxt) { if (most_right[types[cur]] != -1) bit.update(most_right[types[cur]], -1); most_right[types[cur]] = cur; bit.update(most_right[types[cur]], 1); cur++; } } void process_queries() { rep(i, Q) { ll l, r, v, idx; tie(r, l, idx) = queries[i]; update(r); v = bit.query(l, r); ans[idx] = v; } } }; ll gcd(ll m, ll n) { ll a = max(m, n); ll b = min(m, n); while (b != 1 && b != 0) { a %= b; swap(a, b); } return b == 1 ? 1 : a; } ll lcm(ll m, ll n) { return m / gcd(m, n) * n; } ll power_normal(ll a, ll power) { ll value = 1; while (power != 0) { if (power & 1) value = value * a; a = a * a; power = power >> 1; } return value; } ll power_mod(ll a, ll power, ll mod) { __int128_t value = 1; __int128_t b = a; while (power != 0) { if (power & 1) value = (value * b) % mod; b = (b * b) % mod; power = power >> 1; } return value % mod; } ll modinv(ll a, ll mod) { return power_mod(a, mod - 2, mod); } ll combination(ll n, ll r, ll mod) { if (n == r && n == 0) return 1; else if (n <= 0 || r < 0 || r > n) return 0; ll numerator = 1; ll denomenator = 1; for (ll i = 0; i < r; i++) { ll num = (n - i) % mod, den = (i + 1) % mod; (numerator *= num) %= mod; (denomenator *= modinv(den, mod)) %= mod; } return (numerator * denomenator) % mod; } vl2 pascal_triangle(ll n) { /* Complexity: O(n^2) The upper bound of n is nearly 50. Parameters ---------- n; the size of returned vector Returns ------- comb[i][j]: combination(i, j). 0 <= i <= n, 0 <= j <= i */ vl2 comb(n + 1, vl(n + 1)); comb[0][0] = 1; For(i, 1, n + 1) rep(j, i + 1) { comb[i][j] += comb[i - 1][j]; if (j > 0) comb[i][j] += comb[i - 1][j - 1]; } return comb; } ld log_combination(ll n, ll r) { if (n == r && n == 0) return 0; else if (n <= 0 || r < 0 || r > n) return -INF; ld val = 0; for (ll i = 0; i < r; i++) { val += log(n - i); val -= log(i + 1); } return val; } string bin_expression(ll n, ll dig) { string s = ""; rep(i, dig) { s += to_string(n % 2); n /= 2; } reverse(all(s)); return s; } bool is_prime(ll n) { if (n <= 1) return false; for (ll i = 2; i * i <= n; i++) { if (n % i == 0) return false; } return true; } vl eratosthenes(ll n, vl &div) { // return the list of prime number up to n div = vl(n + 1, 0); vl ps; rep(i, n + 1) div[i] = i; For(i, 2, n + 1) { if (div[i] == i) { for (ll j = 2 * i; j <= n; j += i) chmin(div[j], i); ps.pb(i); } } return ps; } map<ll, ll> quick_prime_factorization(vl &div, ll n) { // ABC177E using the div from eratosthenes map<ll, ll> table; while (n != 1) { table[div[n]]++; n /= div[n]; } return table; } map<ll, ll> prime_factorization(ll n) { ll i = 2; map<ll, ll> table; while (i * i <= n) { while (n % i == 0) { table[i]++; n /= i; } i++; } if (n > 1) table[n] = 1; return table; } vl divisor_table(ll n, bool asc = true) { vl table; ll i = 1; while (i * i <= n) { if (n % i == 0) { table.pb(i); if (i * i != n) table.pb(n / i); } i++; } if (asc) sort(all(table)); else sort(rall(table)); return table; } ll euler_function(ll x) { // the number of coprime numbers for x (including 1) vl dt = divisor_table(x, false); ll ret = x; map<ll, ll> cnt; for (ll d : dt) { if (d == 1) continue; cnt[d] = x / d; for (auto &c : cnt) if (c.e1 != d && c.e1 % d == 0) cnt[d] -= c.e2; ret -= cnt[d]; } return ret; } vl base_converter(ll num, ll base, ll sz) { vl coefs(sz); ll cur = 0; while (num) { ll val = num % base; assert(cur < sz); coefs[cur++] = val; num -= val, num /= base; } while (cur < sz) coefs[cur++] = 0; return coefs; } string indexed_alphabet(ll leng, ll idx) { // 0-indexed // returns the string whose order is the-idx-th in the set of strings of the // given length. string ret = ""; if (idx >= power_normal(26, leng)) return ret; vl cs = base_converter(idx, 26, leng); reverse(all(cs)); rep(i, cs.size()) ret += char('a' + cs[i]); return ret; } ll alphabetical_index(string s) { // including the strings whose length is less than that of s. // excluding the empty string. ll leng = s.length(); ll ret = 0, p = 1; rep(i, leng) { ll b = s[leng - 1 - i] - 'a'; ret += p + p * b, p *= 26; } return ret; } // just change the input if you want to change the target. // If you want to check the common sequences in two strings, // combine them. e.g. ABC150F template <typename T> vl z_algorithm(T &s, ll n) { /* Paramters --------- T: the string or list of interest n: the size of string or list Returns ------- res[i] is the maximum number of K which satisfies s[:K] == s[i:i + K] for each i = 0, 1, 2, ..., n - 1. */ vl res(n); res[0] = n; ll i1 = 1, i2 = 0; while (i1 < n) { /* i1: the starting point i2: the length of substring */ while (i1 + i2 < n && s[i2] == s[i1 + i2]) ++i2; res[i1] = i2; if (i2 == 0) { ++i1; continue; } ll i3 = 1; // update the already seen points while (i1 + i3 < n && i3 + res[i3] < i2) { res[i1 + i3] = res[i3]; ++i3; } // update up to i1 + i3 and the next possible minimum length is i2 - i3 (= // res[i3]) i1 += i3, i2 -= i3; } return res; } ll string_to_ll(string s) { ll l = s.length(); ll idx = 0; ll val = 0; ll tenth = 1; while (idx < l) { ll m = s[l - 1 - idx] - '0'; val += (m * tenth); tenth *= 10; idx++; } return val; } string reflected_string(string s) { string t, u; ll n = s.length(); t = s; reverse(all(t)); u = substring(t, 0, n - 2) + s + substring(t, 1, n - 1); return u; } ld distance_between_point_line(point l_begin, point l_end, point p) { ll xl1 = l_begin.x, yl1 = l_begin.y; ll xl2 = l_end.x, yl2 = l_end.y; ll xp = p.x, yp = p.y; ll a = yl2 - yl1; ll b = -xl2 + xl1; ll c = -a * xl2 - b * yl2; return abs(ld(a * xp + b * yp + c)) / ld(sqrt(a * a + b * b)); } bool is_cross(point l1_begin, point l1_end, point l2_begin, point l2_end) { ll x1 = l1_begin.x, y1 = l1_begin.y; ll x2 = l1_end.x, y2 = l1_end.y; ll x3 = l2_begin.x, y3 = l2_begin.y; ll x4 = l2_end.x, y4 = l2_end.y; ll val1 = (x1 - x2) * (y3 - y1) + (y1 - y2) * (x1 - x3); ll val2 = (x1 - x2) * (y4 - y1) + (y1 - y2) * (x1 - x4); ll val3 = (x3 - x4) * (y1 - y3) + (y3 - y4) * (x3 - x1); ll val4 = (x3 - x4) * (y2 - y3) + (y3 - y4) * (x3 - x2); return val1 * val2 < 0 && val3 * val4 < 0; } template <typename T> bool isColinear(T p1, T p2, T p3) { T v1 = p2 - p1, v2 = p3 - p1; return v1.x * v2.y == v1.y * v2.x; } template <typename T> T PerpendicularBisector(T p1, T p2) { T vec = p2 - p1; assert(!vec.is_zero()); T ret = {vec.y, -vec.x}; return ret; } template <typename T> ld Distance2DPoints(T p1, T p2) { T vec = (p1 - p2) * (p1 - p2); return sqrt(vec.x + vec.y); } ll SquaredDistance2DPoints(point p1, point p2) { point vec = (p1 - p2) * (p1 - p2); return vec.x + vec.y; } ld space_of_triangle(point p1, point p2, point p3) { ll x1 = p1.x, y1 = p1.y; ll x2 = p2.x, y2 = p2.y; ll x3 = p3.x, y3 = p3.y; ll v1 = x2 - x1; ll u1 = y2 - y1; ll v2 = x3 - x1; ll u2 = y3 - y1; ld s = ld(v1 * u2 - u1 * v2) / ld(2); return abs(s); } pair<point, ll> OuterCenter(point p1, point p2, point p3) { // the center of circle on the given three points // return the determinant value and the product of center points and 2 * // determinant value point ret; if (isColinear(p1, p2, p3)) { ll d1 = SquaredDistance2DPoints(p1, p2); ll d2 = SquaredDistance2DPoints(p2, p3); ll d3 = SquaredDistance2DPoints(p3, p1); if (d1 >= d2 && d1 >= d3) { ret = p1 + p2; return mp(ret, 2); } else if (d2 >= d1 && d2 >= d3) { ret = p2 + p3; return mp(ret, 2); } else { ret = p3 + p1; return mp(ret, 2); } } point pv1 = PerpendicularBisector(p1, p2); point pv2 = PerpendicularBisector(p1, p3); point cv1_2x = p1 + p2, cv2_2x = p1 + p3; // cv1 + k pv1 == cv2 + m pv2 // (pv1x -pv2x) (k) = (cv2x - cv1x) // (pv1y -pv2y) (m) = (cv2y - cv1y) ll det_inv = -pv1.x * pv2.y + pv1.y * pv2.x; ll x1_2x = cv2_2x.x - cv1_2x.x, x2_2x = cv2_2x.y - cv1_2x.y; pl c_2x_det = {-pv2.y * x1_2x + pv2.x * x2_2x, -pv1.y * x1_2x + pv1.x * x2_2x}; // ret.x = ld(cv1_2x.x * det_inv + pv1.x * c_2x_det.e1) / ld(2 * det_inv); // ret.y = ld(cv1_2x.y * det_inv + pv1.y * c_2x_det.e1) / ld(2 * det_inv); ret.x = cv1_2x.x * det_inv + pv1.x * c_2x_det.e1; ret.y = cv1_2x.y * det_inv + pv1.y * c_2x_det.e1; ll jacobian = 2 * det_inv; return mp(ret, jacobian); } ll inversion_number(vl a, ll a_max) { /* Paramters --------- a: vector<ll> All the elements must be non-negative. Prefably the elements are compressed to reduce the computational cost. a_max: ll The maximum value of the vector a or the value bigger than the value stated previously. */ BinaryIndexedTree bit(a_max + 1); ll val = 0; rep(i, a.size()) { // i is the number of elements that have lower index than a[i]. // call the number of elements that have lower value than a[i] // by subtracting these two, the residual number is the number of elements // that have larger value. val += i - bit.query(a[i] - 1); // cumulative sum from 0 to a[i] - 1 bit.update(a[i], 1); } return val; } ld bin_search(ld left, ld right, bool lb, function<bool(ld)> judge) { ld mid; while (right - left > EPS * 5) { mid = (right + left) / 2; if (lb) { if (judge(mid)) right = mid; else left = mid + EPS; } else { if (judge(mid)) left = mid; else right = mid - EPS; } } return right; } ll bin_search(ll left, ll right, bool lb, function<bool(ll)> judge) { ll mid; while (right > left) { if (lb) { // if true (satisfies the condition), range shifts smaller direction mid = (right + left) / 2; if (judge(mid)) right = mid; else left = mid + 1; } else { // if true (satisfies the condition), range shitfs larger direction mid = (right + left + 1) / 2; if (judge(mid)) left = mid; else right = mid - 1; } } return right; } ld trinary_search(ld left, ld right, function<ld(ld)> func) { // Care the value EPS!!! Compare to the condition while (abs(right - left) > EPS) { ld left2 = (2.0 * left + right) / 3.0; ld right2 = (left + 2.0 * right) / 3.0; ld f1 = func(left2); ld f2 = func(right2); if (f1 <= f2) right = right2; else if (f2 <= f1) left = left2; } return right; } template <typename T> vector<T> compress(vector<T> v) { // sort and remove all the duplicated values sort(all(v)); v.erase(unique(all(v)), v.end()); return v; } template <typename T> map<T, ll> dict(const vector<T> &v) { map<T, ll> d; rep(i, v.size()) d[v[i]] = i; return d; } points compress2D(vl xs, vl ys) { /* NOTE ---- Add the corner points if required */ ll n = xs.size(); vl xcs = compress(xs), ycs = compress(ys); map<ll, ll> xd = dict(xcs), yd = dict(ycs); points ps(n); rep(i, n) xs[i] = xd[xs[i]], ys[i] = yd[ys[i]]; rep(i, n) ps[i] = {xs[i], ys[i]}; sort(all(ps)); return ps; } ll kruskal(vector<undirected_edge> &es, ll n_vertex) { // O(ElogE) sort(all(es)); UnionFind uf(n_vertex); ll min_cost = 0; rep(i, es.size()) { undirected_edge &e = es[i]; if (!uf.is_same(e.from, e.to)) { min_cost += e.cost; uf.unite(e.from, e.to); } } return min_cost; } ll LongestIncreasedSequence(vl &v) { ll n = v.size(); vl dp(n, INF); rep(i, n) * lower_bound(all(dp), v[i]) = v[i]; return lower_bound(all(dp), INF) - dp.begin(); } void dijkstra(ll start, Graph &graph, vl &dist, vl &vertex_pre, bool trace = false) { priority_queue<pl, vpl, greater<pl>> q; ll n = graph.size(); dist = vl(n, INF); dist[start] = 0; if (trace) vertex_pre = vl(n, -1); q.push(pl(0, start)); while (!q.empty()) { ll idx, cost; tie(cost, idx) = q.top(); q.pop(); if (dist[idx] < cost) continue; for (auto &e : graph[idx]) if (chmin(dist[e.to], dist[idx] + e.cost)) { if (trace) vertex_pre[e.to] = idx; q.push(pl(dist[e.to], e.to)); } } } vl get_predecessor(ll g, vl &vertex_pre) { vl path; for (; g != -1; g = vertex_pre[g]) path.pb(g); reverse(all(path)); return path; } void warshall_floyd(vl2 &dist) { ll n = dist.size(); // Dont forget the initialization // rep(i, n) rep(j, n) dist[i][j] = INF * (i != j); rep(k, n) rep(i, n) rep(j, n) dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j]); } void update_warshall_floyd(vl2 &dist, ll v1, ll v2, ll cost) { ll n = dist.size(); if (!chmin(dist[v1][v2], cost)) return; dist[v2][v1] = dist[v1][v2]; rep(i, n) rep(j, n) dist[i][j] = min(dist[i][j], dist[i][v1] + dist[v1][j]); rep(i, n) rep(j, n) dist[i][j] = min(dist[i][j], dist[i][v2] + dist[v2][j]); } // ABC061D, 137E bool find_negative_cycle(ll n, ll goal, Graph &graph, vl &dist) { rep(i, n) rep(v, n) rep(k, graph[v].size()) { edge e = graph[v][k]; if (dist[e.to] != INF && dist[e.to] > dist[v] + e.cost) { dist[e.to] = -INF; if (goal == -1) return true; else if (goal == e.to) return true; } } return false; } bool bellman_ford(ll start, ll goal, Graph &graph, vl &dist) { // if there is a closed circuit, it returns false. (when goal == -1) // if the distance to goal cannot be obtained, it returns false (when goal != // -1) ll n = graph.size(); dist = vl(n, INF); dist[start] = 0; rep(i, n) rep(v, n) rep(k, graph[v].size()) { edge e = graph[v][k]; if (dist[v] != INF && dist[e.to] > dist[v] + e.cost) dist[e.to] = dist[v] + e.cost; } if (find_negative_cycle(n, goal, graph, dist)) return false; return true; } void Euler_Tour(Graph &tree, vl &euler_tour, vl &in, vl &out, ll anc = 0) { // record only when we first reach a node and leave the node. ll n = tree.size(); vb visited(n, false); in = out = vl(n); auto dfs = [&](auto dfs, ll source) -> void { visited[source] = true; in[source] = euler_tour.size(); euler_tour.pb(source); bool is_leaf = true; for (auto &e : tree[source]) { ll target = e.to; if (visited[target]) continue; else is_leaf = false; dfs(dfs, target); } euler_tour.pb(-source); out[source] = euler_tour.size() - 1; }; dfs(dfs, anc); } void Euler_Tour2(Graph &tree, vl &euler_tour, vl &in, vl &out, ll anc = 0) { // record everytime we reach a node ll n = tree.size(); vb visited(n, false); in = out = vl(n); auto dfs = [&](auto dfs, ll source) -> void { visited[source] = true; in[source] = euler_tour.size(); euler_tour.pb(source); bool is_leaf = true; for (auto &e : tree[source]) { ll target = e.to; if (visited[target]) continue; else is_leaf = false; dfs(dfs, target); euler_tour.pb(source); } out[source] = euler_tour.size() - 1; }; dfs(dfs, anc); } std::mt19937 create_rand_engine() { std::random_device rnd; std::vector<std::uint_least32_t> v(10); std::generate(v.begin(), v.end(), std::ref(rnd)); std::seed_seq seed(v.begin(), v.end()); return std::mt19937(seed); } vl generate_unique_array(const size_t sz, ll vm, ll vM) { const size_t range = static_cast<size_t>(vM - vm + 1); const size_t num = static_cast<size_t>(sz * 1.2); assert(vm <= vM); assert(sz <= range); vl ret; auto engine = create_rand_engine(); std::uniform_int_distribution<ll> distribution(vm, vM); while (ret.size() < sz) { while (ret.size() < num) ret.pb(distribution(engine)); sort(all(ret)); auto unique_end = unique(all(ret)); if (sz < distance(ret.begin(), unique_end)) unique_end = next(ret.begin(), sz); ret.erase(unique_end, ret.end()); } return ret; } vl generate_array(const size_t sz, ll vm, ll vM) { const size_t range = static_cast<size_t>(vM - vm + 1); assert(vm <= vM); vl ret; auto engine = create_rand_engine(); std::uniform_int_distribution<ll> distribution(vm, vM); while (ret.size() < sz) ret.pb(distribution(engine)); return ret; } template <typename T> void read_vector(ll n, vector<T> &v, ll offset = 0) { v.resize(n); rep(i, n) { in1(v[i]); if (offset) v[i] += offset; } } template <typename T> void read_vector(ll n, vector<T> &v1, vector<T> &v2, ll offset1 = 0, ll offset2 = 0) { v1.resize(n); v2.resize(n); rep(i, n) { in2(v1[i], v2[i]); if (offset1) v1[i] += offset1; if (offset2) v2[i] += offset2; } } void read_points(ll n, points &ps, ll offset = 0) { ps.resize(n); rep(i, n) { ll x, y; in2(x, y); ps[i] = {x, y}; ps[i] += offset; } } void read_2DMap(ll w, ll h, vb2 &block, char b) { block = vb2(w, vb(h, false)); string s; rep(y, h) { in1(s); rep(x, w) block[x][y] = (s[x] == b); } } ll diameter_of_tree(Graph &tree) { ll dM = 0, vM = 0, v1, v2; auto dfs = [&](auto dfs, ll src, ll par, ll d) -> void { if (chmax(dM, d)) vM = src; for (auto &e : tree[src]) { if (e.to == par) continue; dfs(dfs, e.to, src, d + 1); } }; dfs(dfs, 0, -1, 0); v1 = vM; dfs(dfs, vM, -1, 0); v2 = vM; return dM; } void trit_search(ll n, function<void(ll, ll)> func) { rep(bit, 1LL << n) { ll sub = bit; do { func(bit, sub); sub = (sub - 1) & bit; } while (sub != bit); } } ll convert_string_to_int(string s, ll n_below_decimal) { // return double(s) * coef ll ret = 0, comma = s.length(), n10 = 1, coef = power_normal(10, n_below_decimal); rep(i, s.length()) if (s[i] == '.') comma = i; revrep(i, comma) { ll num = s[i] - '0'; ret += n10 * num; n10 *= 10; } ret *= coef; n10 = coef / 10; For(i, comma + 1, s.length()) { ll num = s[i] - '0'; ret += n10 * num; n10 /= 10; } return ret; } void iter_combination(ll n, ll k, function<void(ll)> func) { /* sub & -sub: the binary which shares the last digit whose value is 1 in sub sub + x : carry up the last digit ~y : the binary whose digits are 1 if y's digit is 0. (sub & ~y) / x: reduce the same number of 0s after first 1 in x from (sub & ~y). */ auto next_combination = [&](ll sub) -> ll { ll x = sub & -sub, y = sub + x; if (x != 0) return (((sub & ~y) / x) >> 1) | y; else return INF; }; ll M = 1LL << n; for (ll bit = (1LL << k) - 1; bit < M; bit = next_combination(bit)) func(bit); } ll count_in_sorted_seq(vl &as, ll val) { ll lb = lower_bound(all(as), val) - as.begin(); ll ub = upper_bound(all(as), val) - as.begin(); return ub - lb; } bool win_first_player(vl &grundy_nums) { ll x = 0; for (ll &gn : grundy_nums) x ^= gn; return x != 0; } ll create1001001(ll num, ll m, ll num_of_1, ll nb = 31) { // e.g. 1001001001 -> num = 3 // e.g. 111111 -> num = 1 (REPUNIT) // Calculate the modulo m of 100..100...100..1 (the length of each 00... is // num - 1. The # of 1 is 2^i.) Then calculate the modulo m of // 100...100...100...1 (The # of 1 is num_of_1 using the memo.) vl memo(nb, 1); ll v = 0, tot = 1, coef = power_mod(10, num, m); rep(j, nb) { ll c10 = power_mod(coef, 1LL << j, m); memo[j + 1] = ((memo[j] * c10) % m + memo[j]) % m; if (num_of_1 >> j & 1) { (v += (memo[j] * tot) % m) %= m; (tot *= power_mod(coef, 1LL << j, m)) %= m; } } return v; } ll GaussJordanBitVector(vl &bs) { ll n = bs.size(); ll rank = 0; ll j = 0; revrep(i, N_DIGITS) { for (j = rank; j < n; j++) if (bs[j] & (1LL << i)) break; if (j == n) continue; if (j > rank) bs[rank] ^= bs[j]; for (j = 0; j < n; j++) if (j != rank) bs[j] = min(bs[j], bs[j] ^ bs[rank]); rank++; } return rank; } ll GaussJordan(vl2 &A, ll mod, bool is_extended = false, bool det = false) { /* Ax = b Parameters ---------- A: m x n matrix The matrix of interest is_extended: bool if A includes the term of b (e.g. when solving linear equation), true otherwise false. Property: The product of diagonal elements of upper triangle matrix is equal to the determinant of this matrix. */ ll rank = 0, m = A.size(), n = A[0].size(); rep(r, m) rep(c, n) A[r][c] = modf(A[r][c], mod); ll pivot, inv, ret = 1; vl tmp; if (det) tmp = vl(n); rep(c, n) { if (is_extended && c == n - 1) break; pivot = -1; For(r, rank, m) if (A[r][c] != 0) { pivot = r; break; } if (pivot == -1) { if (det) return 0; continue; } swap(A[pivot], A[rank]); ret = modf(ret * A[rank][c], mod), inv = modinv(A[rank][c], mod); vl &ax = det ? tmp : A[rank]; rep(c2, n) ax[c2] = A[rank][c2] * inv % mod; rep(r, m) if (r != rank && A[r][c]) { ll base = A[r][c]; rep(c2, n) A[r][c2] = modf(A[r][c2] - ax[c2] * base, mod); } ++rank; } return det ? ret : rank; } ll linear_equation(vl2 A, vl b, vl &res) { ll m = A.size(), n = A[0].size(); vl2 M(m, vl(n + 1)); rep(r, m) { rep(c, n) M[r][c] = A[r][c]; M[r][n] = b[r]; } ll rank = GaussJordan(M, true); For(r, rank, m) if (M[r][n]) return -1; res.assign(n, 0); rep(i, rank) res[i] = M[i][n]; return rank; } ll determinant(vl2 &A, ll mod) { return GaussJordan(A, mod, false, true); }; /* #5. shakutori method (syakutori, two pointers technique) // 1. strech right side while the condition is met. // 2. renew the answer // 3. increments left side // 4. Back to 1. (l <= r must be satisfied all the time.) ll l = 0, r = 0; while (l < n){ if (l == r) r++; while(r < n && cond) r++; l++; } prl(answer); #11. bfs ABC146D, ABC007C 1. first create a graph. 2. start searching from a node. 3. do some processes and push nodes connected with a given target node in BFS. 4. repeat a series of procedure until queue is empty. ll n; in1(n); queue<tp3> q; vb visited(n, false); auto bfs = [&](ll src, ll par){ visited[src] = true; for (auto& e: graph[src]){ if (e.to != par && !visited[e.to]){ q.push(mt(e.to, src, ...)); } } }; q.push(mt(0, -1, 0)); while(!q.empty()){ ll src, par, ...; tie(src, par, ...) = q.front(); q.pop(); bfs(src, par, ...); } Grundy number (ARC038C) void grundy(ll x, vl& gn){ // the example from the ari book // the player can take a[0], a[1], ..., a[k - 1] coins from 1 mountain set<ll> s; rep(i, k) if (a[i] <= x) s.insert(gn[x - a[i]]) while (s.count(gn[x])) gn[x]++; } */ /* x: 1001 1010 1100 1011 1101 1111 x & ~ x: 0001 0010 0100 0001 0001 0001 sum: 1010 1100 10000 1100 1100 10000 ####### Attention ####### S | (1 << i) -> S union {i} S & ~(1 << i) -> S - {i} # inclusion-exclusion principle |U[i = 1 to n] Ai| = sum[i = 1 to n] |Ai| - sum[i < j]|Ai ^ Aj| + ... + (-1)^(n - 1) |^[i = 1 to n]Ai| */ const ll MAX_N = 200005; const size_t MAX_BIT = 160 * 160 + 10; typedef bitset<MAX_BIT> bts; typedef vector<bts> vbt; typedef vector<vbt> vbt2; typedef vector<vbt2> vbt3; const bool multiple_queries = false; void solve() { /* *** 注意 *** ・マイナスの整数の除算が0 (マイナスのときはCeil関数になる)になって,マイナスの判定ができていない. ・MODの逆元を取るときは素数か否かに注意. ・Queue, stack, deque等で必ず`empty`なら飛ばすようにする. ・set, multisetで`RE`を起こすときは初期段階で解法に影響が出ないようなダミーをsetに入れておくとエラーを回避できる. ・掛け算のOverflow注意.(x * y > 10^18 -> x > 10^18 / y) のような形で判定するとよい. ・総和を取る公式 (1+2+...+n = n * (n + 1) / 2)の計算時等で最終的には10^18に収まる場合は`/2`の順序を早める. ・Bit演算をするときに`a ^ b != c`のような式は代入演算子になったりするので注意. (ABC150F) ・aborted (core dumped) のエラーが出ているときは変数の二重宣言やベクトルの区間外参照を確認. ・`tuple`のコンパイルエラーは`make_tuple(a, b, c, ...)`で回避. ・グラフの最短経路と木の最短経路は同じDFSでも更新方法に注意. (ABC148E) ・Running Errorの1つとして,関数の返り値のタイプが定義されているのに何も返していないことが考えられる. ・Running Errorとしてベクトルサイズが0であるにもかかわらずsortをしている場合がある. ・境界条件は必ず試す. ・Overflow不等式: (前提条件:a, b, c > 0) 1. a * b <= c -> a <= c / b 2. a * b < c -> a <= c / b && (c % b || a != c / b) 3. c <= a * b -> (c + b - 1) / b <= a 4. c < a * b -> (c + b - 1) / b <= a && (c % b || a != c / b) */ // generate_array(size, min, max); ll n; in1(n); vl as; read_vector(n, as); multiset<ll> ms; ms.insert(MOD); ms.insert(-1); ms.insert(as[0]); For(i, 1, n) { auto it = ms.lower_bound(as[i]); --it; if (it != ms.begin()) ms.erase(it); ms.insert(as[i]); } prl(ms.size() - 2); // ### DEBUG PART ### auto naive_solver = [&]() {}; #ifdef _LOCAL naive_solver(); #endif } void test(ll num = 0, bool verbose = false) { rep(i, max(1LL, num)) { ll t = clock(); if (verbose) prl4("\n#####", i + 1, "#####", "\n## Answer ##"); solve(); if (verbose) { prl(""); prl_time(t); } } } int main(void) { ios::sync_with_stdio(false); cin.tie(nullptr); #ifdef _LOCAL test(6, true); #else ll t = 0; if (multiple_queries) in1(t); test(t, false); #endif return 0; }
replace
2,695
2,696
2,695
2,696
TLE
p02973
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define INF 2e9 #define ALL(v) v.begin(), v.end() using namespace std; using ll = long long; using pi = pair<int, int>; constexpr ll mod = 1000000007; void pPRINTl(ostream &ost) { ost << endl; } template <class T> void pPRINTL(ostream &ost, T t) { ost << t << endl; } template <class T, class... U> void pPRINTl(ostream &ost, T t, U... u) { ost << t << " "; pPRINTl(ost, u...); } template <class... T> void PRINTl(T... t) { pPRINTl(cout, t...); } // #define PRINTl // void pPRINT(ostream &ost) {} template <class T> void pPRINT(ostream &ost, T t) { ost << t; } template <class T, class... U> void pPRINT(ostream &ost, T t, U... u) { ost << t << " "; pPRINT(ost, u...); } template <class... T> void PRINT(T... t) { pPRINT(cout, t...); } #define DEBUG PRINTl("DEBUG line:", __LINE__) // #define DEBUG int main() { ll n; cin >> n; ll a[n]; REP(i, n) cin >> a[i]; vector<int> l; l.push_back(a[0]); ll min = a[0]; FOR(i, 1, n) { if (min >= a[i]) { l.push_back(a[i]); min = a[i]; } REP(j, l.size()) { if (l[j] < a[i]) { l[j] = a[i]; if (j == l.size() - 1) { min = a[i]; } break; } } } PRINT(l.size()); return 0; }
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define INF 2e9 #define ALL(v) v.begin(), v.end() using namespace std; using ll = long long; using pi = pair<int, int>; constexpr ll mod = 1000000007; void pPRINTl(ostream &ost) { ost << endl; } template <class T> void pPRINTL(ostream &ost, T t) { ost << t << endl; } template <class T, class... U> void pPRINTl(ostream &ost, T t, U... u) { ost << t << " "; pPRINTl(ost, u...); } template <class... T> void PRINTl(T... t) { pPRINTl(cout, t...); } // #define PRINTl // void pPRINT(ostream &ost) {} template <class T> void pPRINT(ostream &ost, T t) { ost << t; } template <class T, class... U> void pPRINT(ostream &ost, T t, U... u) { ost << t << " "; pPRINT(ost, u...); } template <class... T> void PRINT(T... t) { pPRINT(cout, t...); } #define DEBUG PRINTl("DEBUG line:", __LINE__) // #define DEBUG int main() { ll n; cin >> n; ll a[n]; REP(i, n) cin >> a[i]; vector<int> l; l.push_back(a[0]); ll min = a[0]; FOR(i, 1, n) { if (min >= a[i]) { l.push_back(a[i]); min = a[i]; continue; } REP(j, l.size()) { if (l[j] < a[i]) { l[j] = a[i]; if (j == l.size() - 1) { min = a[i]; } break; } } } PRINT(l.size()); return 0; }
insert
43
43
43
44
TLE
p02973
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> namespace multiset { class multiset { private: std::vector<int> tree; int MSB; void add(int i, int x) { for (; i < tree.size(); i += i & -i) { tree[i] += x; } } int sum(int i) { int res = 0; for (; i > 0; i -= i & -i) { res += tree[i]; } return res; } int bisect(int w) { int i = 0; for (int k = MSB; k > 0; k /= 2) { if (i + k < tree.size() && tree[i + k] < w) { w -= tree[i + k]; i += k; } } return i + 1; } int get_MSB(int N) { int i = 1; while (i < N) { i *= 2; } return i / 2; } public: multiset(int N) : tree(N + 1), MSB(get_MSB(N)) {} void insert(int x) { add(x, 1); } void erase(int x) { add(x, -1); } int lower_bound(int x) { int s = sum(x); return (s == 0) ? 0 : bisect(s); } size_t size() { return sum(tree.size() - 1); } }; } // namespace multiset int main() { int N; std::cin >> N; std::vector<int> A(N); for (auto &&a : A) { std::cin >> a; } std::vector<int> B = A; std::sort(begin(B), end(B)); B.erase(std::unique(begin(B), end(B)), end(B)); auto f = [&](int val) -> int { return std::lower_bound(begin(A), end(A), val) - begin(A) + 1; }; multiset::multiset ms(B.size()); for (auto a : A) { auto i = ms.lower_bound(f(a) - 1); if (i != 0) { ms.erase(i); } ms.insert(f(a)); } std::cout << ms.size() << '\n'; }
#include <algorithm> #include <iostream> #include <vector> namespace multiset { class multiset { private: std::vector<int> tree; int MSB; void add(int i, int x) { for (; i < tree.size(); i += i & -i) { tree[i] += x; } } int sum(int i) { int res = 0; for (; i > 0; i -= i & -i) { res += tree[i]; } return res; } int bisect(int w) { int i = 0; for (int k = MSB; k > 0; k /= 2) { if (i + k < tree.size() && tree[i + k] < w) { w -= tree[i + k]; i += k; } } return i + 1; } int get_MSB(int N) { int i = 1; while (i < N) { i *= 2; } return i / 2; } public: multiset(int N) : tree(N + 1), MSB(get_MSB(N)) {} void insert(int x) { add(x, 1); } void erase(int x) { add(x, -1); } int lower_bound(int x) { int s = sum(x); return (s == 0) ? 0 : bisect(s); } size_t size() { return sum(tree.size() - 1); } }; } // namespace multiset int main() { int N; std::cin >> N; std::vector<int> A(N); for (auto &&a : A) { std::cin >> a; } std::vector<int> B = A; std::sort(begin(B), end(B)); B.erase(std::unique(begin(B), end(B)), end(B)); auto f = [&](int val) -> int { return std::lower_bound(begin(B), end(B), val) - begin(B) + 1; }; multiset::multiset ms(B.size()); for (auto a : A) { auto i = ms.lower_bound(f(a) - 1); if (i != 0) { ms.erase(i); } ms.insert(f(a)); } std::cout << ms.size() << '\n'; }
replace
73
74
73
74
0
p02973
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> rights(1, -1); for (int i = 0; i < n; i++) { int a; cin >> a; if (a <= rights[rights.size() - 1]) { rights.push_back(a); continue; } for (int j = 0; j < (int)rights.size(); j++) { if (rights[j] < a) { rights[j] = a; sort(rights.begin(), rights.end(), greater<int>()); break; } } } cout << rights.size() << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> rights(1, -1); for (int i = 0; i < n; i++) { int a; cin >> a; if (a <= rights[rights.size() - 1]) { rights.push_back(a); continue; } for (int j = 0; j < (int)rights.size(); j++) { if (rights[j] < a) { rights[j] = a; break; } } } cout << rights.size() << endl; }
delete
20
21
20
20
TLE
p02973
C++
Runtime Error
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { int n; cin >> n; vector<ll> v; int ans = 200000; for (int i = 0; i < n; i++) { ll a; cin >> a; auto j = upper_bound(v.begin(), v.end(), a, greater<int>()); if (j == v.end()) v.push_back(a); else v[j - v.begin() - 1] = a; } cout << v.size(); }
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { int n; cin >> n; vector<ll> v; int ans = 200000; for (int i = 0; i < n; i++) { ll a; cin >> a; auto j = upper_bound(v.begin(), v.end(), a, greater<int>()); if (j == v.end()) v.push_back(a); else *j = a; } cout << v.size(); }
replace
22
23
22
23
-6
munmap_chunk(): invalid pointer
p02973
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll INF = 1e9; int main() { ll N; cin >> N; vector<ll> A(N); multiset<int> T; int cnt = 1; for (int i = 0; i < N; i++) { cin >> A[i]; } T.insert(A[0]); T.insert(INF); for (int i = 1; i < N; i++) { if (*T.begin() >= A[i]) T.insert(A[i]); else { auto past = T.begin(); for (auto it = T.begin(); it != T.end(); it++) { // cout << i << " " << *it << endl; if (*it >= A[i]) { T.erase(past); T.insert(A[i]); break; } past = it; } } /*cout << i << " "; for(auto it1 = T.begin(); it1 != (T.end()++); it1++) cout << " " << (*it1); cout << endl;*/ } cout << T.size() - 1 << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll INF = 1e9; int main() { ll N; cin >> N; vector<ll> A(N); multiset<int> T; int cnt = 1; for (int i = 0; i < N; i++) { cin >> A[i]; } T.insert(A[0]); T.insert(INF); for (int i = 1; i < N; i++) { if (*T.begin() >= A[i]) T.insert(A[i]); else { auto past = T.begin(); auto it = T.lower_bound(A[i]); it--; T.erase(it); T.insert(A[i]); /*for(auto it = T.begin(); it != T.end(); it++){ //cout << i << " " << *it << endl; if(*it >= A[i]){ T.erase(past); T.insert(A[i]); break; } past = it; }*/ } /*cout << i << " "; for(auto it1 = T.begin(); it1 != (T.end()++); it1++) cout << " " << (*it1); cout << endl;*/ } cout << T.size() - 1 << endl; }
replace
21
30
21
34
TLE
p02973
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <math.h> #include <vector> using namespace std; #define mmum 1e9 using vint = vector<int>; using vvint = vector<vector<int>>; int main(int argc, char *argv[]) { int n; cin >> n; vint a; for (int i = 0; i < n; i++) { int t; cin >> t; t = mmum - t; auto it = upper_bound(a.begin(), a.end(), t); if (it != a.end()) { *it = t; sort(a.begin(), a.end()); } else a.push_back(t); } cout << a.size() << endl; }
#include <algorithm> #include <iostream> #include <math.h> #include <vector> using namespace std; #define mmum 1e9 using vint = vector<int>; using vvint = vector<vector<int>>; int main(int argc, char *argv[]) { int n; cin >> n; vint a; for (int i = 0; i < n; i++) { int t; cin >> t; t = mmum - t; auto it = upper_bound(a.begin(), a.end(), t); if (it != a.end()) { *it = t; } else a.push_back(t); } cout << a.size() << endl; }
delete
22
23
22
22
TLE
p02973
C++
Runtime Error
// ~/Remember,remember the 6th of March #include <bits/stdc++.h> typedef long long ll; typedef unsigned long long ull; const double PI = acos(-1.0); const double EPS = 1e-9; const ll MOD = 1e9 + 7; using namespace std; int main() { int n; cin >> n; vector<int> arr(n); for (int i = 0; i < n; i++) { cin >> arr[i]; arr[i] *= -1; } vector<int> lcs; for (int i = 0; i < n; i++) { int ind = upper_bound(lcs.begin(), lcs.end(), arr[i]) - lcs.begin(); if (ind == lcs.size()) lcs.push_back(arr[i]); else lcs[ind] = arr[arr[i]]; } cout << lcs.size() << endl; return 0; }
// ~/Remember,remember the 6th of March #include <bits/stdc++.h> typedef long long ll; typedef unsigned long long ull; const double PI = acos(-1.0); const double EPS = 1e-9; const ll MOD = 1e9 + 7; using namespace std; int main() { int n; cin >> n; vector<int> arr(n); for (int i = 0; i < n; i++) { cin >> arr[i]; arr[i] *= -1; } vector<int> lcs; for (int i = 0; i < n; i++) { int ind = upper_bound(lcs.begin(), lcs.end(), arr[i]) - lcs.begin(); if (ind == lcs.size()) lcs.push_back(arr[i]); else lcs[ind] = arr[i]; } cout << lcs.size() << endl; return 0; }
replace
23
24
23
24
0
p02973
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll N; ll A[100001]; deque<ll> v; int main() { cin >> N; for (int i = 0; i < N; i++) cin >> A[i]; v.push_back(A[0]); for (int i = 1; i < N; i++) { auto itr = lower_bound(v.begin(), v.end(), A[i]); if (itr == v.begin()) v.push_front(A[i]); *(itr - 1) = A[i]; } cout << v.size() << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll N; ll A[100001]; deque<ll> v; int main() { cin >> N; for (int i = 0; i < N; i++) cin >> A[i]; v.push_back(A[0]); for (int i = 1; i < N; i++) { auto itr = lower_bound(v.begin(), v.end(), A[i]); if (itr == v.begin()) v.push_front(A[i]); else *(itr - 1) = A[i]; } cout << v.size() << endl; return 0; }
replace
18
19
18
20
0
p02973
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vll = vector<ll>; using vvi = vector<vector<int>>; using vvl = vector<vector<ll>>; template <typename T> class tRMQ { vector<T> data; T unit; public: static const long long INF = 100000000000; int n; function<T(const T &, const T &)> f; tRMQ(int _, T u, function<T(T, T)> bi) { unit = u; f = bi; n = 1; while (n < _) { n <<= 1; } data.resize(n * 4); for (int i = 0; i < n * 4; i++) data[i] = unit; } void update(int index, T val) { int i = index + n - 1; data[i] = val; while (i > 0) { i = (i - 1) / 2; data[i] = f(data[i * 2 + 1], data[i * 2 + 2]); } } // [a, b) T query(int a, int b, int k, int l, int r) { if (a < 0 || r <= a || b <= l) return unit; if (a <= l && r <= b) return data[k]; else return f(query(a, b, k * 2 + 1, l, (l + r) / 2), query(a, b, k * 2 + 2, (r + l) / 2, r)); } T query(int a, int b) { return query(a, b, 0, 0, n); } }; tRMQ<ll> minrmq(int n) { return tRMQ<ll>(n, 10000000000000000LL, [](ll r, ll l) { return min(l, r); }); } tRMQ<ll> maxrmq(int n) { return tRMQ<ll>(n, -10000000000000000LL, [](ll r, ll l) { return max(l, r); }); } tRMQ<ll> sumrmq(int n) { return tRMQ<ll>(n, 0, [](ll l, ll r) { return l + r; }); } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; vector<ll> a(n); map<ll, int> mp; for (int i = 0; i < n; i++) { cin >> a[i]; mp[a[i]] = 0; } int c = 1; for (auto &v : mp) { v.second = c++; } auto r = maxrmq(n + 3); r.update(0, 0); ll ans = 0; for (int i = n - 1; i >= 0; i--) { ll b = r.query(0, mp[a[i]]) + 1; r.update(a[i], b); ans = max(ans, b); } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vll = vector<ll>; using vvi = vector<vector<int>>; using vvl = vector<vector<ll>>; template <typename T> class tRMQ { vector<T> data; T unit; public: static const long long INF = 100000000000; int n; function<T(const T &, const T &)> f; tRMQ(int _, T u, function<T(T, T)> bi) { unit = u; f = bi; n = 1; while (n < _) { n <<= 1; } data.resize(n * 4); for (int i = 0; i < n * 4; i++) data[i] = unit; } void update(int index, T val) { int i = index + n - 1; data[i] = val; while (i > 0) { i = (i - 1) / 2; data[i] = f(data[i * 2 + 1], data[i * 2 + 2]); } } // [a, b) T query(int a, int b, int k, int l, int r) { if (a < 0 || r <= a || b <= l) return unit; if (a <= l && r <= b) return data[k]; else return f(query(a, b, k * 2 + 1, l, (l + r) / 2), query(a, b, k * 2 + 2, (r + l) / 2, r)); } T query(int a, int b) { return query(a, b, 0, 0, n); } }; tRMQ<ll> minrmq(int n) { return tRMQ<ll>(n, 10000000000000000LL, [](ll r, ll l) { return min(l, r); }); } tRMQ<ll> maxrmq(int n) { return tRMQ<ll>(n, -10000000000000000LL, [](ll r, ll l) { return max(l, r); }); } tRMQ<ll> sumrmq(int n) { return tRMQ<ll>(n, 0, [](ll l, ll r) { return l + r; }); } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n; cin >> n; vector<ll> a(n); map<ll, int> mp; for (int i = 0; i < n; i++) { cin >> a[i]; mp[a[i]] = 0; } int c = 1; for (auto &v : mp) { v.second = c++; } auto r = maxrmq(n + 3); r.update(0, 0); ll ans = 0; for (int i = n - 1; i >= 0; i--) { ll b = r.query(0, mp[a[i]]) + 1; r.update(mp[a[i]] - 1, b); ans = max(ans, b); } cout << ans << endl; return 0; }
replace
87
88
87
88
0
p02973
C++
Runtime Error
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef pair<ll, ll> PL; const ll mod = 1000000007; const ll MOD = 1000000007; const ll INF = 1LL << 60; #define PI (acos(-1)) #define ALL(c) (c).begin(), (c).end() ll lcm(ll a, ll b) { return a / __gcd(a, b) * b; } bool is_prime(ll x) { if (x == 1) { return false; } for (ll i = 2; i * i <= x; i++) { if (x % i == 0) return false; } return true; } vector<ll> divisor(ll n) { vector<ll> ret; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { ret.push_back(i); if (i * i != n) ret.push_back(n / i); } } sort(begin(ret), end(ret)); return (ret); } long long modpow(long long a, long long n, long long mod) { long long res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } // a^{-1} mod を計算する long long modinv(long long a, long long mod) { return modpow(a, mod - 2, mod); } const ll MAX = 5100000; ll fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (ll i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } // 二項係数計算 ll COM(ll n, ll k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } struct UnionFind { vector<int> par; UnionFind(int n) : par(n, -1) {} void init(int n) { par.assign(n, -1); } int root(int x) { if (par[x] < 0) return x; else return par[x] = root(par[x]); } bool issame(int x, int y) { return root(x) == root(y); } bool merge(int x, int y) { x = root(x); y = root(y); if (x == y) return false; if (par[x] > par[y]) swap(x, y); // merge technique par[x] += par[y]; par[y] = x; return true; } int size(int x) { return -par[root(x)]; } }; struct BIT { int n; vector<int> bit; BIT() { init(); } BIT(int n) : n(n) { init(); } void init() { bit.clear(); bit.resize(n + 1, 0); } int sum(int i) { int s = 0; while (i > 0) { s += bit[i]; i -= i & -i; } return s; } int sum(int x, int y) { return sum(y) - sum(x - 1); } void add(int i, int x) { while (i <= n) { bit[i] += x; i += i & -i; } } int lower_bound(int w) { if (w <= 0) return 0; int x = 0, r = 1; while (r < n) r <<= 1; for (int k = r; k > 0; k >>= 1) { if (x + k <= n && bit[x + k] < w) { w -= bit[x + k]; x += k; } } return x + 1; } }; // 文字列t ->整数 atoi(t.c_str()); // 文字列t ->long long整数 stoll(t); ローカルではつかえない struct LazySegmentTree { // private: ll n; vector<ll> node, lazy; // public: LazySegmentTree(vector<ll> v) { int sz = (int)v.size(); n = 1; while (n < sz) n *= 2; node.resize(2 * n - 1); lazy.resize(2 * n - 1, 0); for (int i = 0; i < sz; i++) node[i + n - 1] = v[i]; for (int i = n - 2; i >= 0; i--) node[i] = node[i * 2 + 1] + node[i * 2 + 2]; } void eval(int k, int l, int r) { if (lazy[k] != 0) { node[k] += lazy[k]; if (r - l > 1) { lazy[2 * k + 1] += lazy[k] / 2; lazy[2 * k + 2] += lazy[k] / 2; } lazy[k] = 0; } } void add(int a, int b, ll x, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; eval(k, l, r); if (b <= l || r <= a) return; if (a <= l && r <= b) { lazy[k] += (r - l) * x; eval(k, l, r); } else { add(a, b, x, 2 * k + 1, l, (l + r) / 2); add(a, b, x, 2 * k + 2, (l + r) / 2, r); node[k] = node[2 * k + 1] + node[2 * k + 2]; } } ll getsum(int a, int b, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; eval(k, l, r); if (b <= l || r <= a) return 0; if (a <= l && r <= b) return node[k]; ll vl = getsum(a, b, 2 * k + 1, l, (l + r) / 2); ll vr = getsum(a, b, 2 * k + 2, (l + r) / 2, r); return vl + vr; } }; ll digit_sum(ll v) { ll ret = 0; while (v) { ret += (v % 10); v /= 10; } return ret; } template <typename T> struct Kruskal { struct edge { ll from, to; T cost; ll used; edge() {} edge(ll from, ll to, T cost) : from(from), to(to), cost(cost), used(0) {} bool operator<(const edge &e) const { return cost < e.cost; } }; ll n; vector<ll> p, r; vector<edge> edges; Kruskal() {} Kruskal(ll n) : n(n) {} void init(ll n) { r.assign(n, 1); p.resize(n); iota(p.begin(), p.end(), 0); } ll find(ll x) { return (x == p[x] ? x : p[x] = find(p[x])); } bool same(ll x, ll y) { return find(x) == find(y); } void unite(ll x, ll y) { x = find(x); y = find(y); if (x == y) return; if (r[x] < r[y]) swap(x, y); r[x] += r[y]; p[y] = x; } void add_edge(ll u, ll v, T c) { edges.emplace_back(u, v, c); } T build() { sort(edges.begin(), edges.end()); init(n); T res = 0; for (auto &e : edges) { if (!same(e.from, e.to)) { res += e.cost; unite(e.from, e.to); e.used = 1; } } return res; } }; int LIS(int a[], int n) { vector<int> A(n, 0x3f3f3f3f); for (int i = 0; i < n; i++) *lower_bound(A.begin(), A.end(), a[i]) = a[i]; return find(A.begin(), A.end(), 0x3f3f3f3f) - A.begin(); } // string maze[1010]; // ll maze[100][100]; // ll bfs(ll H, ll W, ll sx, ll sy, ll gx, ll gy) // { // int dx[4] = {1, 0, -1, 0}; // int dy[4] = {0, 1, 0, -1}; // vector<vector<ll>> dist(H, vector<ll>(W, -1)); // dist[sy][sx] = 0; // queue<PL> q; // q.push({sy, sx}); // while (!q.empty()) // { // ll x, y; // tie(y, x) = q.front(); // q.pop(); // if (y == gy && x == gx) // { // break; // } // for (int t = 0; t < 4; t++) // { // ll nx = x + dx[t], ny = y + dy[t]; // if (nx < 0 || ny < 0 || nx >= W || ny >= H || dist[ny][nx] != -1 // || maze[ny][nx] == '#') // { // continue; // } // dist[ny][nx] = dist[y][x] + 1; // q.push({ny, nx}); // } // } // return dist[gy][gx]; // } vector<vector<ll>> warshall_floyd(ll n, vector<vector<ll>> g, ll INF) { // init vector<vector<ll>> c(10,vector<ll>(10,0)); for (int k = 0; k < n; k++) { for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (g[i][k] == INF || g[k][j] == INF) continue; g[i][j] = min(g[i][j], g[i][k] + g[k][j]); } } } return g; } struct Dijkstra { ll n; vector<vector<pair<ll, ll>>> Edges; vector<ll> Dist; vector<ll> Prev; vector<ll> PathNum; Dijkstra(ll n) : n(n), Edges(n), Dist(n), Prev(n), PathNum(n) { Prev.assign(n, -1); }; void add_edge(ll a, ll b, ll c, bool directed = true) { if (directed) { Edges[a].emplace_back(make_pair(b, c)); } else { Edges[a].emplace_back(make_pair(b, c)); Edges[b].emplace_back(make_pair(a, c)); } } // O((E+V)logV) void build(int start) { priority_queue<P, vector<P>, greater<P>> queue; fill(Dist.begin(), Dist.end(), 1e+18); // 1e18 !?!? Dist[start] = 0; PathNum[start] = 1; queue.push(PL(0, start)); while (!queue.empty()) { PL p = queue.top(); queue.pop(); int v = p.second; if (Dist[v] < p.first) continue; for (int i = 0; i < Edges[v].size(); i++) { PL e = Edges[v][i]; if (Dist[e.first] > Dist[v] + e.second) { Dist[e.first] = Dist[v] + e.second; queue.push(P(Dist[e.first], e.first)); Prev[e.first] = v; PathNum[e.first] = PathNum[v]; } else if (Dist[e.first] == Dist[v] + e.second) { PathNum[e.first] += PathNum[v]; PathNum[e.first] %= MOD; } } } } ll dist(ll t) { return Dist[t]; } vector<ll> get_path(ll t) { vector<ll> path; for (; t != -1; t = Prev[t]) { path.push_back(t); } reverse(path.begin(), path.end()); return path; } ll get_path_num(ll t) { return PathNum[t]; } // int solve() // { // ll v, e, r; // cin >> v >> e >> r; // Dijkstra dij(v); // for (int i = 0; i < e; i++) // { // ll a, b, c; // cin >> a >> b >> c; // dij.add_edge(a, b, c); // } // dij.build(r); // for (int i = 0; i < v; i++) // { // if (dij.dist(i) == 1e18) // { // cout << "INF" << endl; // } // else // { // cout << dij.dist(i) << endl; // cout << dij.get_path(i) << endl; // cout << dij.get_path_num(i) << endl; // } // } // return 0; // } }; /*------------------------------*/ template <typename T> istream &operator>>(istream &is, vector<T> &vec) { for (auto &v : vec) is >> v; return is; } template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) { os << "["; for (auto v : vec) os << v << ","; os << "]"; return os; } template <typename T> ostream &operator<<(ostream &os, const deque<T> &vec) { os << "deq["; for (auto v : vec) os << v << ","; os << "]"; return os; } template <typename T> ostream &operator<<(ostream &os, const set<T> &vec) { os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; } template <typename T> ostream &operator<<(ostream &os, const unordered_set<T> &vec) { os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; } template <typename T> ostream &operator<<(ostream &os, const multiset<T> &vec) { os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; } template <typename T> ostream &operator<<(ostream &os, const unordered_multiset<T> &vec) { os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; } template <typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &pa) { os << "(" << pa.first << "," << pa.second << ")"; return os; } template <typename TK, typename TV> ostream &operator<<(ostream &os, const map<TK, TV> &mp) { os << "{"; for (auto v : mp) os << v.first << "=>" << v.second << ","; os << "}"; return os; } template <typename TK, typename TV> ostream &operator<<(ostream &os, const unordered_map<TK, TV> &mp) { os << "{"; for (auto v : mp) os << v.first << "=>" << v.second << ","; os << "}"; return os; }; #define dbg(x) \ cerr << #x << " = " << (x) << " (L" << __LINE__ << ") " << __FILE__ << endl; template <typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val) { fill((T *)array, (T *)(array + N), val); } ll a[101010]; ll solve() { ll n; cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } deque<ll> d; d.push_back(a[0]); for (int i = 1; i < n; i++) { if (d[0] >= a[i]) { d.push_front(a[i]); } else { auto it = lower_bound(d.begin(), d.end(), a[i]); d[(*it) - 1] = a[i]; } } cout << d.size() << endl; return 0; } int main() { // cout.precision(10); ios::sync_with_stdio(false); cin.tie(0); solve(); }
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef pair<ll, ll> PL; const ll mod = 1000000007; const ll MOD = 1000000007; const ll INF = 1LL << 60; #define PI (acos(-1)) #define ALL(c) (c).begin(), (c).end() ll lcm(ll a, ll b) { return a / __gcd(a, b) * b; } bool is_prime(ll x) { if (x == 1) { return false; } for (ll i = 2; i * i <= x; i++) { if (x % i == 0) return false; } return true; } vector<ll> divisor(ll n) { vector<ll> ret; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { ret.push_back(i); if (i * i != n) ret.push_back(n / i); } } sort(begin(ret), end(ret)); return (ret); } long long modpow(long long a, long long n, long long mod) { long long res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } // a^{-1} mod を計算する long long modinv(long long a, long long mod) { return modpow(a, mod - 2, mod); } const ll MAX = 5100000; ll fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (ll i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } // 二項係数計算 ll COM(ll n, ll k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } struct UnionFind { vector<int> par; UnionFind(int n) : par(n, -1) {} void init(int n) { par.assign(n, -1); } int root(int x) { if (par[x] < 0) return x; else return par[x] = root(par[x]); } bool issame(int x, int y) { return root(x) == root(y); } bool merge(int x, int y) { x = root(x); y = root(y); if (x == y) return false; if (par[x] > par[y]) swap(x, y); // merge technique par[x] += par[y]; par[y] = x; return true; } int size(int x) { return -par[root(x)]; } }; struct BIT { int n; vector<int> bit; BIT() { init(); } BIT(int n) : n(n) { init(); } void init() { bit.clear(); bit.resize(n + 1, 0); } int sum(int i) { int s = 0; while (i > 0) { s += bit[i]; i -= i & -i; } return s; } int sum(int x, int y) { return sum(y) - sum(x - 1); } void add(int i, int x) { while (i <= n) { bit[i] += x; i += i & -i; } } int lower_bound(int w) { if (w <= 0) return 0; int x = 0, r = 1; while (r < n) r <<= 1; for (int k = r; k > 0; k >>= 1) { if (x + k <= n && bit[x + k] < w) { w -= bit[x + k]; x += k; } } return x + 1; } }; // 文字列t ->整数 atoi(t.c_str()); // 文字列t ->long long整数 stoll(t); ローカルではつかえない struct LazySegmentTree { // private: ll n; vector<ll> node, lazy; // public: LazySegmentTree(vector<ll> v) { int sz = (int)v.size(); n = 1; while (n < sz) n *= 2; node.resize(2 * n - 1); lazy.resize(2 * n - 1, 0); for (int i = 0; i < sz; i++) node[i + n - 1] = v[i]; for (int i = n - 2; i >= 0; i--) node[i] = node[i * 2 + 1] + node[i * 2 + 2]; } void eval(int k, int l, int r) { if (lazy[k] != 0) { node[k] += lazy[k]; if (r - l > 1) { lazy[2 * k + 1] += lazy[k] / 2; lazy[2 * k + 2] += lazy[k] / 2; } lazy[k] = 0; } } void add(int a, int b, ll x, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; eval(k, l, r); if (b <= l || r <= a) return; if (a <= l && r <= b) { lazy[k] += (r - l) * x; eval(k, l, r); } else { add(a, b, x, 2 * k + 1, l, (l + r) / 2); add(a, b, x, 2 * k + 2, (l + r) / 2, r); node[k] = node[2 * k + 1] + node[2 * k + 2]; } } ll getsum(int a, int b, int k = 0, int l = 0, int r = -1) { if (r < 0) r = n; eval(k, l, r); if (b <= l || r <= a) return 0; if (a <= l && r <= b) return node[k]; ll vl = getsum(a, b, 2 * k + 1, l, (l + r) / 2); ll vr = getsum(a, b, 2 * k + 2, (l + r) / 2, r); return vl + vr; } }; ll digit_sum(ll v) { ll ret = 0; while (v) { ret += (v % 10); v /= 10; } return ret; } template <typename T> struct Kruskal { struct edge { ll from, to; T cost; ll used; edge() {} edge(ll from, ll to, T cost) : from(from), to(to), cost(cost), used(0) {} bool operator<(const edge &e) const { return cost < e.cost; } }; ll n; vector<ll> p, r; vector<edge> edges; Kruskal() {} Kruskal(ll n) : n(n) {} void init(ll n) { r.assign(n, 1); p.resize(n); iota(p.begin(), p.end(), 0); } ll find(ll x) { return (x == p[x] ? x : p[x] = find(p[x])); } bool same(ll x, ll y) { return find(x) == find(y); } void unite(ll x, ll y) { x = find(x); y = find(y); if (x == y) return; if (r[x] < r[y]) swap(x, y); r[x] += r[y]; p[y] = x; } void add_edge(ll u, ll v, T c) { edges.emplace_back(u, v, c); } T build() { sort(edges.begin(), edges.end()); init(n); T res = 0; for (auto &e : edges) { if (!same(e.from, e.to)) { res += e.cost; unite(e.from, e.to); e.used = 1; } } return res; } }; int LIS(int a[], int n) { vector<int> A(n, 0x3f3f3f3f); for (int i = 0; i < n; i++) *lower_bound(A.begin(), A.end(), a[i]) = a[i]; return find(A.begin(), A.end(), 0x3f3f3f3f) - A.begin(); } // string maze[1010]; // ll maze[100][100]; // ll bfs(ll H, ll W, ll sx, ll sy, ll gx, ll gy) // { // int dx[4] = {1, 0, -1, 0}; // int dy[4] = {0, 1, 0, -1}; // vector<vector<ll>> dist(H, vector<ll>(W, -1)); // dist[sy][sx] = 0; // queue<PL> q; // q.push({sy, sx}); // while (!q.empty()) // { // ll x, y; // tie(y, x) = q.front(); // q.pop(); // if (y == gy && x == gx) // { // break; // } // for (int t = 0; t < 4; t++) // { // ll nx = x + dx[t], ny = y + dy[t]; // if (nx < 0 || ny < 0 || nx >= W || ny >= H || dist[ny][nx] != -1 // || maze[ny][nx] == '#') // { // continue; // } // dist[ny][nx] = dist[y][x] + 1; // q.push({ny, nx}); // } // } // return dist[gy][gx]; // } vector<vector<ll>> warshall_floyd(ll n, vector<vector<ll>> g, ll INF) { // init vector<vector<ll>> c(10,vector<ll>(10,0)); for (int k = 0; k < n; k++) { for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (g[i][k] == INF || g[k][j] == INF) continue; g[i][j] = min(g[i][j], g[i][k] + g[k][j]); } } } return g; } struct Dijkstra { ll n; vector<vector<pair<ll, ll>>> Edges; vector<ll> Dist; vector<ll> Prev; vector<ll> PathNum; Dijkstra(ll n) : n(n), Edges(n), Dist(n), Prev(n), PathNum(n) { Prev.assign(n, -1); }; void add_edge(ll a, ll b, ll c, bool directed = true) { if (directed) { Edges[a].emplace_back(make_pair(b, c)); } else { Edges[a].emplace_back(make_pair(b, c)); Edges[b].emplace_back(make_pair(a, c)); } } // O((E+V)logV) void build(int start) { priority_queue<P, vector<P>, greater<P>> queue; fill(Dist.begin(), Dist.end(), 1e+18); // 1e18 !?!? Dist[start] = 0; PathNum[start] = 1; queue.push(PL(0, start)); while (!queue.empty()) { PL p = queue.top(); queue.pop(); int v = p.second; if (Dist[v] < p.first) continue; for (int i = 0; i < Edges[v].size(); i++) { PL e = Edges[v][i]; if (Dist[e.first] > Dist[v] + e.second) { Dist[e.first] = Dist[v] + e.second; queue.push(P(Dist[e.first], e.first)); Prev[e.first] = v; PathNum[e.first] = PathNum[v]; } else if (Dist[e.first] == Dist[v] + e.second) { PathNum[e.first] += PathNum[v]; PathNum[e.first] %= MOD; } } } } ll dist(ll t) { return Dist[t]; } vector<ll> get_path(ll t) { vector<ll> path; for (; t != -1; t = Prev[t]) { path.push_back(t); } reverse(path.begin(), path.end()); return path; } ll get_path_num(ll t) { return PathNum[t]; } // int solve() // { // ll v, e, r; // cin >> v >> e >> r; // Dijkstra dij(v); // for (int i = 0; i < e; i++) // { // ll a, b, c; // cin >> a >> b >> c; // dij.add_edge(a, b, c); // } // dij.build(r); // for (int i = 0; i < v; i++) // { // if (dij.dist(i) == 1e18) // { // cout << "INF" << endl; // } // else // { // cout << dij.dist(i) << endl; // cout << dij.get_path(i) << endl; // cout << dij.get_path_num(i) << endl; // } // } // return 0; // } }; /*------------------------------*/ template <typename T> istream &operator>>(istream &is, vector<T> &vec) { for (auto &v : vec) is >> v; return is; } template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) { os << "["; for (auto v : vec) os << v << ","; os << "]"; return os; } template <typename T> ostream &operator<<(ostream &os, const deque<T> &vec) { os << "deq["; for (auto v : vec) os << v << ","; os << "]"; return os; } template <typename T> ostream &operator<<(ostream &os, const set<T> &vec) { os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; } template <typename T> ostream &operator<<(ostream &os, const unordered_set<T> &vec) { os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; } template <typename T> ostream &operator<<(ostream &os, const multiset<T> &vec) { os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; } template <typename T> ostream &operator<<(ostream &os, const unordered_multiset<T> &vec) { os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; } template <typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &pa) { os << "(" << pa.first << "," << pa.second << ")"; return os; } template <typename TK, typename TV> ostream &operator<<(ostream &os, const map<TK, TV> &mp) { os << "{"; for (auto v : mp) os << v.first << "=>" << v.second << ","; os << "}"; return os; } template <typename TK, typename TV> ostream &operator<<(ostream &os, const unordered_map<TK, TV> &mp) { os << "{"; for (auto v : mp) os << v.first << "=>" << v.second << ","; os << "}"; return os; }; #define dbg(x) \ cerr << #x << " = " << (x) << " (L" << __LINE__ << ") " << __FILE__ << endl; template <typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val) { fill((T *)array, (T *)(array + N), val); } ll a[101010]; ll solve() { ll n; cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } deque<ll> d; d.push_back(a[0]); for (int i = 1; i < n; i++) { if (d[0] >= a[i]) { d.push_front(a[i]); } else { ll ind = lower_bound(d.begin(), d.end(), a[i]) - d.begin(); d[ind - 1] = a[i]; } } cout << d.size() << endl; return 0; } int main() { // cout.precision(10); ios::sync_with_stdio(false); cin.tie(0); solve(); }
replace
536
538
536
538
-11
p02973
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef unsigned long ul; typedef unsigned long long ull; typedef long long ll; typedef vector<ll> vint; typedef vector<vector<ll>> vvint; typedef vector<vector<vector<ll>>> vvvint; typedef vector<string> vstring; typedef vector<vector<string>> vvstring; typedef vector<char> vchar; typedef vector<vector<char>> vvchar; typedef vector<long double> vdouble; typedef vector<vector<long double>> vvdouble; typedef vector<vector<vector<long double>>> vvvdouble; typedef pair<ll, ll> pint; typedef vector<pint> vpint; typedef vector<bool> vbool; #define rep(i, n) for (ll i = 0; i < n; i++) #define repf(i, f, n) for (ll i = f; i < n; i++) #define repr(i, n) for (ll i = n - 1; i >= 0; i--) #define mp make_pair #define mt make_tuple #define pb push_back #define pf push_front #define fi first #define se second #define ALL(obj) (obj).begin(), (obj).end() // #define LLONG_MAX 9223372036854775806 #define vmax(vec) *max_element(vec.begin(), vec.end()) #define vmin(vec) *min_element(vec.begin(), vec.end()) #define vsort(vec) sort(vec.begin(), vec.end()) #define vsortgr(vec) sort(vec.begin(), vec.end(), greater<ll>()) // #define MOD 1000000007 #define MOD 998244353 template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } // // struct Node{ // vint children; // ll index; // ll prop; // }; // struct edge{ll to; ll cost;}; int dy[] = {0, 0, 1, -1}; int dx[] = { 1, -1, 0, 0, }; // ll X,Y,Z,K; // ll pmax = 30000000000; // vint A,B,C; // void comb(vector<vector <long long int> > &v){ // for(int i = 0;i <v.size(); i++){ // v[i][0]=1; // v[i][i]=1; // } // for(int k = 1;k <v.size();k++){ // for(int j = 1;j<k;j++){ // v[k][j]=((v[k-1][j-1]+v[k-1][j])%MOD); // } // } // } ll gcd(ll a, ll b) { if (a < b) { a ^= b; b ^= a; a ^= b; } return b ? gcd(b, a % b) : a; } ll lcm(int a, ll b) { return a * b / gcd(a, b); } // 繰り返し二乗法 ll power(ll a, ll b) { ll res = 1; while (b > 0) { if (b & 1) res = res * a % MOD; a = a * a % MOD; b >>= 1; } return res; } const int MAX = 510000; ll fact[MAX], fact_inv[MAX]; void init_fact(ll n) { fact[0] = 1; // 階乗の計算 rep(i, n) fact[i + 1] = fact[i] * (i + 1) % MOD; fact_inv[n] = power(fact[n], MOD - 2); // 逆元の計算 for (ll i = n - 1; i >= 0; i--) fact_inv[i] = fact_inv[i + 1] * (i + 1) % MOD; } ll comb(ll n, ll r) { return (fact[n] * fact_inv[r]) % MOD * fact_inv[n - r] % MOD; } ll perm(ll n, ll r) { return (fact[n] * fact_inv[n - r]) % MOD; } struct UnionFind { vector<ll> par; // par[i]:iの親の番号 (例) par[3] = 2 : 3の親が2 vector<ll> num; // vector<ll> dist; // rootまでの距離 UnionFind(ll N) : par(N), num(N) { // 最初は全てが根であるとして初期化 for (ll i = 0; i < N; i++) par[i] = i; for (ll i = 0; i < N; i++) num[i] = 1; // for(ll i = 0; i < N; i++) dist[i] = 0; } ll root(ll x) { // データxが属する木の根を再帰で得る:root(x) = {xの木の根} if (par[x] == x) return x; return par[x] = root(par[x]); } void unite(ll x, ll y) { // xとyの木を併合 ll rx = root(x); // xの根をrx ll ry = root(y); // yの根をry if (rx == ry) return; // xとyの根が同じ(=同じ木にある)時はそのまま par[rx] = ry; // xとyの根が同じでない(=同じ木にない)時:xの根rxをyの根ryにつける num[ry] = num[rx] + num[ry]; } bool same(ll x, ll y) { // 2つのデータx, yが属する木が同じならtrueを返す ll rx = root(x); ll ry = root(y); return rx == ry; } ll size(ll x) { return num[root(x)]; } }; vint divisor(ll n) { // nの約数 vint ret; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { ret.pb(i); if (i * i != n) ret.pb(n / i); } } vsort(ret); return ret; } ll my_pow(ll x, ll y) { ll rtn = 1; rep(i, y) rtn *= x; return rtn; } ll get_digit_in(ll n, ll i) { // i桁目の数字を得る。 for (ll j = 0; j < i - 1; j++) { n /= 10; } return n % 10; } ll get_digit(ll n) { ll rtn = 0; while (n > 0) { n /= 10; rtn++; } return rtn; } map<ll, ll> prime_factor(ll n) { map<ll, ll> rtn; for (ll i = 2; i * i <= n; i++) { while (n % i == 0) { rtn[i]++; n /= i; } } if (n != 1) rtn[n] = 1; return rtn; } // nPnの順列に対して処理を実行する void foreach_permutation(ll n, function<void(ll *)> f) { ll indexes[n]; for (ll i = 0; i < n; i++) indexes[i] = i; do { f(indexes); } while (std::next_permutation(indexes, indexes + n)); } void recursive_comb(ll *indexes, ll s, ll rest, function<void(ll *)> f) { if (rest == 0) { f(indexes); } else { if (s < 0) return; recursive_comb(indexes, s - 1, rest, f); indexes[rest - 1] = s; recursive_comb(indexes, s - 1, rest - 1, f); } } // nCkの組み合わせに対して処理を実行する void foreach_comb(ll n, ll k, function<void(ll *)> f) { ll indexes[k]; recursive_comb(indexes, n - 1, k, f); } // nPkの順列に対して処理を実行する void foreach_permutation(ll n, ll k, function<void(ll *)> f) { foreach_comb(n, k, [&](ll *c_indexes) { foreach_permutation(k, [&](ll *p_indexes) { ll indexes[k]; for (ll i = 0; i < k; i++) { indexes[i] = c_indexes[p_indexes[i]]; } f(indexes); }); }); } ll arr[55556]; vint primes; // エラトステネスの篩 void Eratosthenes() { ll N = 55556; for (ll i = 0; i < N; i++) { arr[i] = 1; } for (ll i = 2; i < sqrt(N); i++) { if (arr[i]) { for (ll j = 0; i * (j + 2) < N; j++) { arr[i * (j + 2)] = 0; } } } for (ll i = 2; i < N; i++) { if (arr[i] && i % 5 == 1) { primes.pb(i); // cout << i << endl; } } } bool f(ll x, ll n, ll k) { return (n - x) * (n - x + 1) - x < k; } int main() { cout << fixed << setprecision(12); ll N; cin >> N; vint A(N); rep(i, N) cin >> A[i]; deque<ll> b; rep(i, N) { bool f = false; auto it = lower_bound(ALL(b), A[i]); if (it == b.begin()) { b.push_front(A[i]); } else { *(it - 1) = A[i]; sort(it - 1, b.end()); } } cout << b.size() << endl; } //
#include <bits/stdc++.h> using namespace std; typedef unsigned long ul; typedef unsigned long long ull; typedef long long ll; typedef vector<ll> vint; typedef vector<vector<ll>> vvint; typedef vector<vector<vector<ll>>> vvvint; typedef vector<string> vstring; typedef vector<vector<string>> vvstring; typedef vector<char> vchar; typedef vector<vector<char>> vvchar; typedef vector<long double> vdouble; typedef vector<vector<long double>> vvdouble; typedef vector<vector<vector<long double>>> vvvdouble; typedef pair<ll, ll> pint; typedef vector<pint> vpint; typedef vector<bool> vbool; #define rep(i, n) for (ll i = 0; i < n; i++) #define repf(i, f, n) for (ll i = f; i < n; i++) #define repr(i, n) for (ll i = n - 1; i >= 0; i--) #define mp make_pair #define mt make_tuple #define pb push_back #define pf push_front #define fi first #define se second #define ALL(obj) (obj).begin(), (obj).end() // #define LLONG_MAX 9223372036854775806 #define vmax(vec) *max_element(vec.begin(), vec.end()) #define vmin(vec) *min_element(vec.begin(), vec.end()) #define vsort(vec) sort(vec.begin(), vec.end()) #define vsortgr(vec) sort(vec.begin(), vec.end(), greater<ll>()) // #define MOD 1000000007 #define MOD 998244353 template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } // // struct Node{ // vint children; // ll index; // ll prop; // }; // struct edge{ll to; ll cost;}; int dy[] = {0, 0, 1, -1}; int dx[] = { 1, -1, 0, 0, }; // ll X,Y,Z,K; // ll pmax = 30000000000; // vint A,B,C; // void comb(vector<vector <long long int> > &v){ // for(int i = 0;i <v.size(); i++){ // v[i][0]=1; // v[i][i]=1; // } // for(int k = 1;k <v.size();k++){ // for(int j = 1;j<k;j++){ // v[k][j]=((v[k-1][j-1]+v[k-1][j])%MOD); // } // } // } ll gcd(ll a, ll b) { if (a < b) { a ^= b; b ^= a; a ^= b; } return b ? gcd(b, a % b) : a; } ll lcm(int a, ll b) { return a * b / gcd(a, b); } // 繰り返し二乗法 ll power(ll a, ll b) { ll res = 1; while (b > 0) { if (b & 1) res = res * a % MOD; a = a * a % MOD; b >>= 1; } return res; } const int MAX = 510000; ll fact[MAX], fact_inv[MAX]; void init_fact(ll n) { fact[0] = 1; // 階乗の計算 rep(i, n) fact[i + 1] = fact[i] * (i + 1) % MOD; fact_inv[n] = power(fact[n], MOD - 2); // 逆元の計算 for (ll i = n - 1; i >= 0; i--) fact_inv[i] = fact_inv[i + 1] * (i + 1) % MOD; } ll comb(ll n, ll r) { return (fact[n] * fact_inv[r]) % MOD * fact_inv[n - r] % MOD; } ll perm(ll n, ll r) { return (fact[n] * fact_inv[n - r]) % MOD; } struct UnionFind { vector<ll> par; // par[i]:iの親の番号 (例) par[3] = 2 : 3の親が2 vector<ll> num; // vector<ll> dist; // rootまでの距離 UnionFind(ll N) : par(N), num(N) { // 最初は全てが根であるとして初期化 for (ll i = 0; i < N; i++) par[i] = i; for (ll i = 0; i < N; i++) num[i] = 1; // for(ll i = 0; i < N; i++) dist[i] = 0; } ll root(ll x) { // データxが属する木の根を再帰で得る:root(x) = {xの木の根} if (par[x] == x) return x; return par[x] = root(par[x]); } void unite(ll x, ll y) { // xとyの木を併合 ll rx = root(x); // xの根をrx ll ry = root(y); // yの根をry if (rx == ry) return; // xとyの根が同じ(=同じ木にある)時はそのまま par[rx] = ry; // xとyの根が同じでない(=同じ木にない)時:xの根rxをyの根ryにつける num[ry] = num[rx] + num[ry]; } bool same(ll x, ll y) { // 2つのデータx, yが属する木が同じならtrueを返す ll rx = root(x); ll ry = root(y); return rx == ry; } ll size(ll x) { return num[root(x)]; } }; vint divisor(ll n) { // nの約数 vint ret; for (ll i = 1; i * i <= n; i++) { if (n % i == 0) { ret.pb(i); if (i * i != n) ret.pb(n / i); } } vsort(ret); return ret; } ll my_pow(ll x, ll y) { ll rtn = 1; rep(i, y) rtn *= x; return rtn; } ll get_digit_in(ll n, ll i) { // i桁目の数字を得る。 for (ll j = 0; j < i - 1; j++) { n /= 10; } return n % 10; } ll get_digit(ll n) { ll rtn = 0; while (n > 0) { n /= 10; rtn++; } return rtn; } map<ll, ll> prime_factor(ll n) { map<ll, ll> rtn; for (ll i = 2; i * i <= n; i++) { while (n % i == 0) { rtn[i]++; n /= i; } } if (n != 1) rtn[n] = 1; return rtn; } // nPnの順列に対して処理を実行する void foreach_permutation(ll n, function<void(ll *)> f) { ll indexes[n]; for (ll i = 0; i < n; i++) indexes[i] = i; do { f(indexes); } while (std::next_permutation(indexes, indexes + n)); } void recursive_comb(ll *indexes, ll s, ll rest, function<void(ll *)> f) { if (rest == 0) { f(indexes); } else { if (s < 0) return; recursive_comb(indexes, s - 1, rest, f); indexes[rest - 1] = s; recursive_comb(indexes, s - 1, rest - 1, f); } } // nCkの組み合わせに対して処理を実行する void foreach_comb(ll n, ll k, function<void(ll *)> f) { ll indexes[k]; recursive_comb(indexes, n - 1, k, f); } // nPkの順列に対して処理を実行する void foreach_permutation(ll n, ll k, function<void(ll *)> f) { foreach_comb(n, k, [&](ll *c_indexes) { foreach_permutation(k, [&](ll *p_indexes) { ll indexes[k]; for (ll i = 0; i < k; i++) { indexes[i] = c_indexes[p_indexes[i]]; } f(indexes); }); }); } ll arr[55556]; vint primes; // エラトステネスの篩 void Eratosthenes() { ll N = 55556; for (ll i = 0; i < N; i++) { arr[i] = 1; } for (ll i = 2; i < sqrt(N); i++) { if (arr[i]) { for (ll j = 0; i * (j + 2) < N; j++) { arr[i * (j + 2)] = 0; } } } for (ll i = 2; i < N; i++) { if (arr[i] && i % 5 == 1) { primes.pb(i); // cout << i << endl; } } } bool f(ll x, ll n, ll k) { return (n - x) * (n - x + 1) - x < k; } int main() { cout << fixed << setprecision(12); ll N; cin >> N; vint A(N); rep(i, N) cin >> A[i]; deque<ll> b; rep(i, N) { bool f = false; auto it = lower_bound(ALL(b), A[i]); if (it == b.begin()) { b.push_front(A[i]); } else { *(it - 1) = A[i]; // sort(it-1, b.end()); } } cout << b.size() << endl; } //
replace
299
300
299
300
TLE
p02973
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define fs first #define sc second #define pb push_back #define mp make_pair #define eb emplace_back #define ALL(A) A.begin(), A.end() #define RALL(A) A.rbegin(), A.rend() typedef long long LL; typedef pair<int, int> P; const LL mod = 1000000007; const LL LINF = 1LL << 60; const int INF = 1 << 30; int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; int main() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } int ans = 0; multiset<int> st; for (int i = 0; i < n; i++) { auto p = upper_bound(ALL(st), -a[i]); if (p == st.end()) { ans++; } else { st.erase(p); } st.insert(-a[i]); } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #define fs first #define sc second #define pb push_back #define mp make_pair #define eb emplace_back #define ALL(A) A.begin(), A.end() #define RALL(A) A.rbegin(), A.rend() typedef long long LL; typedef pair<int, int> P; const LL mod = 1000000007; const LL LINF = 1LL << 60; const int INF = 1 << 30; int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; int main() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } int ans = 0; multiset<int> st; for (int i = 0; i < n; i++) { auto p = st.upper_bound(-a[i]); if (p == st.end()) { ans++; } else { st.erase(p); } st.insert(-a[i]); } cout << ans << endl; return 0; }
replace
27
28
27
28
TLE
p02973
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll MOD = 1000000007; const int dx[4] = {+1, 0, -1, 0}; const int dy[4] = {0, -1, 0, +1}; int main() { cin.tie(0); ios_base::sync_with_stdio(false); int n; cin >> n; vector<ll> a(n); vector<ll> b; for (int i = 0; i < n; i++) { cin >> a[i]; } b.push_back(-a[0]); for (int i = 1; i < n; i++) { auto iter = upper_bound(b.begin(), b.end(), -a[i]); // cout << *iter << endl; if (iter == b.end()) { b.push_back(-a[i]); continue; } *(--iter) = -a[i]; } /* for(ll bi: b){ cout << bi << endl; } */ cout << b.size() << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll MOD = 1000000007; const int dx[4] = {+1, 0, -1, 0}; const int dy[4] = {0, -1, 0, +1}; int main() { cin.tie(0); ios_base::sync_with_stdio(false); int n; cin >> n; vector<ll> a(n); vector<ll> b; for (int i = 0; i < n; i++) { cin >> a[i]; } b.push_back(-a[0]); for (int i = 1; i < n; i++) { auto iter = upper_bound(b.begin(), b.end(), -a[i]); // cout << *iter << endl; if (iter == b.end()) { b.push_back(-a[i]); continue; } *(iter) = -a[i]; } /* for(ll bi: b){ cout << bi << endl; } */ cout << b.size() << endl; }
replace
29
30
29
30
-11
p02973
C++
Time Limit Exceeded
#include <bits/stdc++.h> #pragma GCC optimize("unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define watch(x) cout << (#x) << " is " << (x) << endl #define debug cout << "hi" << endl using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<long long, long long> pll; ll gcd(ll a, ll b) { return (!b ? a : gcd(b, a % b)); } ll lcm(ll a, ll b) { return ((a * b) / gcd(a, b)); } bool cmp(int a, int b) { return a > b; } const ll mod = 1e9 + 7; const int INF32 = 1 << 30; const ll INF64 = 1LL << 60; const ld pi = 3.141592653589793; long long modpow(long long n, long long k, long long mod) { if (k == 0) return 1; long long r = modpow(n * n % mod, k >> 1, mod); if (k & 1) r = r * n % mod; return r; } void solve() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) cin >> a[i]; multiset<int> s; int ans = 1; s.insert(a[0]); for (int i = 1; i < n; i++) { auto it = lower_bound(s.begin(), s.end(), a[i]); if (it == s.begin()) s.insert(a[i]); else { it = prev(it); s.erase(it); s.insert(a[i]); } } cout << s.size(); } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); solve(); return 0; }
#include <bits/stdc++.h> #pragma GCC optimize("unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define watch(x) cout << (#x) << " is " << (x) << endl #define debug cout << "hi" << endl using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pii; typedef pair<long long, long long> pll; ll gcd(ll a, ll b) { return (!b ? a : gcd(b, a % b)); } ll lcm(ll a, ll b) { return ((a * b) / gcd(a, b)); } bool cmp(int a, int b) { return a > b; } const ll mod = 1e9 + 7; const int INF32 = 1 << 30; const ll INF64 = 1LL << 60; const ld pi = 3.141592653589793; long long modpow(long long n, long long k, long long mod) { if (k == 0) return 1; long long r = modpow(n * n % mod, k >> 1, mod); if (k & 1) r = r * n % mod; return r; } void solve() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) cin >> a[i]; multiset<int> s; int ans = 1; s.insert(a[0]); for (int i = 1; i < n; i++) { auto it = s.lower_bound(a[i]); if (it == s.begin()) s.insert(a[i]); else { it = prev(it); s.erase(it); s.insert(a[i]); } } cout << s.size(); } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); solve(); return 0; }
replace
40
41
40
41
TLE
p02973
C++
Time Limit Exceeded
// q055.cpp // Tue Aug 25 22:09:54 2020 #include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> #define INTINF 2147483647 #define LLINF 9223372036854775807 #define MOD 1000000007 #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; typedef pair<int, int> P; int main() { int n; cin >> n; int a[n]; rep(i, n) cin >> a[i]; multiset<int> ms; rep(i, n) { auto itr = lower_bound(ms.begin(), ms.end(), a[i]); if (itr != ms.begin()) { itr--; ms.erase(itr); } ms.insert(a[i]); } cout << ms.size() << endl; // printf("%.4f\n",ans); }
// q055.cpp // Tue Aug 25 22:09:54 2020 #include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> #define INTINF 2147483647 #define LLINF 9223372036854775807 #define MOD 1000000007 #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; typedef pair<int, int> P; int main() { int n; cin >> n; int a[n]; rep(i, n) cin >> a[i]; multiset<int> ms; rep(i, n) { auto itr = ms.lower_bound(a[i]); if (itr != ms.begin()) { itr--; ms.erase(itr); } ms.insert(a[i]); } cout << ms.size() << endl; // printf("%.4f\n",ans); }
replace
30
31
30
31
TLE
p02973
C++
Time Limit Exceeded
// abc134.cpp // Sat Oct 12 12:39:21 2019 #include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> #define INTINF 2147483647 #define LLINF 9223372036854775807 using namespace std; using ll = long long; typedef pair<int, int> P; int main() { int n; cin >> n; int a[n]; vector<int> heads; for (int i = 0; i < n; i++) { int a; cin >> a; if (heads.size() == 0) { heads.push_back(a); } else { if (a <= heads[0]) { heads.push_back(a); sort(heads.begin(), heads.end()); } else { auto iter = lower_bound(heads.begin(), heads.end(), a); heads[iter - heads.begin() - 1] = a; } } } cout << heads.size() << endl; // printf("%.4f\n",ans); }
// abc134.cpp // Sat Oct 12 12:39:21 2019 #include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> #define INTINF 2147483647 #define LLINF 9223372036854775807 using namespace std; using ll = long long; typedef pair<int, int> P; int main() { int n; cin >> n; int a[n]; vector<int> heads; for (int i = 0; i < n; i++) { int a; cin >> a; if (heads.size() == 0) { heads.push_back(a); } else { if (a <= heads[0]) { heads.insert(heads.begin(), a); } else { auto iter = lower_bound(heads.begin(), heads.end(), a); heads[iter - heads.begin() - 1] = a; } } } cout << heads.size() << endl; // printf("%.4f\n",ans); }
replace
31
33
31
32
TLE
p02973
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n) { multiset<int> LIS; int temp; cin >> temp; LIS.insert(temp); for (int i = 1; i < n; i++) { cin >> temp; if (temp <= *LIS.begin()) { LIS.insert(temp); } else { auto p = lower_bound(LIS.begin(), LIS.end(), temp); if (p != LIS.begin()) p--; LIS.erase(p); LIS.insert(temp); } } cout << LIS.size() << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n) { multiset<int> LIS; int temp; cin >> temp; LIS.insert(temp); for (int i = 1; i < n; i++) { cin >> temp; if (temp <= *LIS.begin()) { LIS.insert(temp); } else { auto p = LIS.lower_bound(temp); if (p != LIS.begin()) p--; LIS.erase(p); LIS.insert(temp); } } cout << LIS.size() << endl; } return 0; }
replace
15
16
15
16
TLE
p02974
C++
Runtime Error
/*{{{*/ #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <limits.h> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define REP(I, N) for (int I = 0; I < (N); ++I) #define REPP(I, A, B) for (int I = (A); I < (B); ++I) #define FOR(I, A, B) for (int I = (A); I <= (B); ++I) #define FORS(I, S) for (int I = 0; S[I]; ++I) #define RS(X) scanf("%s", (X)) #define SORT_UNIQUE(c) \ (sort(c.begin(), c.end()), \ c.resize(distance(c.begin(), unique(c.begin(), c.end())))) #define GET_POS(c, x) (lower_bound(c.begin(), c.end(), x) - c.begin()) #define CASET \ int ___T; \ scanf("%d", &___T); \ for (int cs = 1; cs <= ___T; cs++) #define MP make_pair #define PB push_back #define MS0(X) memset((X), 0, sizeof((X))) #define MS1(X) memset((X), -1, sizeof((X))) #define LEN(X) strlen(X) #define F first #define S second using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef long double LD; typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<LL> VL; typedef vector<PII> VPII; typedef pair<LL, LL> PLL; typedef vector<PLL> VPLL; template <class T> void _R(T &x) { cin >> x; } void _R(int &x) { scanf("%d", &x); } void _R(LL &x) { scanf("%lld", &x); } void _R(double &x) { scanf("%lf", &x); } void _R(char &x) { scanf(" %c", &x); } void _R(char *x) { scanf("%s", x); } void R() {} template <class T, class... U> void R(T &head, U &...tail) { _R(head); R(tail...); } template <class T> void _W(const T &x) { cout << x; } void _W(const int &x) { printf("%d", x); } void _W(const LL &x) { printf("%lld", x); } void _W(const double &x) { printf("%.16f", x); } void _W(const char &x) { putchar(x); } void _W(const char *x) { printf("%s", x); } template <class T, class U> void _W(const pair<T, U> &x) { _W(x.F); putchar(' '); _W(x.S); } template <class T> void _W(const vector<T> &x) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' '); } void W() {} template <class T, class... U> void W(const T &head, const U &...tail) { _W(head); putchar(sizeof...(tail) ? ' ' : '\n'); W(tail...); } #ifdef HOME #define DEBUG(...) \ { \ printf("# "); \ printf(__VA_ARGS__); \ puts(""); \ } #else #define DEBUG(...) #endif int MOD = 1e9 + 7; void ADD(LL &x, LL v) { x = (x + v) % MOD; if (x < 0) x += MOD; } /*}}}*/ const int SIZE = 1e6 + 10; int N, K; LL dp[2][26][6001]; int main() { R(N, K); { int v = 0; FOR(i, 1, N) { v += abs(N + 1 - i - i); } if (K > v) { W(0); return 0; } } int now = 0, nxt = 1; dp[now][0][0] = 1; for (int i = N; i > 0; i--) { MS0(dp[nxt]); REP(j, 26) REP(k, 6001) { if (!dp[now][j][k]) continue; ADD(dp[nxt][j][k], dp[now][j][k] * (1 + j * 2)); if (j) ADD(dp[nxt][j - 1][k - 2 * i], dp[now][j][k] * j * j); ADD(dp[nxt][j + 1][k + 2 * i], dp[now][j][k]); } swap(now, nxt); } W(dp[now][0][K]); return 0; }
/*{{{*/ #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <limits.h> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define REP(I, N) for (int I = 0; I < (N); ++I) #define REPP(I, A, B) for (int I = (A); I < (B); ++I) #define FOR(I, A, B) for (int I = (A); I <= (B); ++I) #define FORS(I, S) for (int I = 0; S[I]; ++I) #define RS(X) scanf("%s", (X)) #define SORT_UNIQUE(c) \ (sort(c.begin(), c.end()), \ c.resize(distance(c.begin(), unique(c.begin(), c.end())))) #define GET_POS(c, x) (lower_bound(c.begin(), c.end(), x) - c.begin()) #define CASET \ int ___T; \ scanf("%d", &___T); \ for (int cs = 1; cs <= ___T; cs++) #define MP make_pair #define PB push_back #define MS0(X) memset((X), 0, sizeof((X))) #define MS1(X) memset((X), -1, sizeof((X))) #define LEN(X) strlen(X) #define F first #define S second using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef long double LD; typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<LL> VL; typedef vector<PII> VPII; typedef pair<LL, LL> PLL; typedef vector<PLL> VPLL; template <class T> void _R(T &x) { cin >> x; } void _R(int &x) { scanf("%d", &x); } void _R(LL &x) { scanf("%lld", &x); } void _R(double &x) { scanf("%lf", &x); } void _R(char &x) { scanf(" %c", &x); } void _R(char *x) { scanf("%s", x); } void R() {} template <class T, class... U> void R(T &head, U &...tail) { _R(head); R(tail...); } template <class T> void _W(const T &x) { cout << x; } void _W(const int &x) { printf("%d", x); } void _W(const LL &x) { printf("%lld", x); } void _W(const double &x) { printf("%.16f", x); } void _W(const char &x) { putchar(x); } void _W(const char *x) { printf("%s", x); } template <class T, class U> void _W(const pair<T, U> &x) { _W(x.F); putchar(' '); _W(x.S); } template <class T> void _W(const vector<T> &x) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' '); } void W() {} template <class T, class... U> void W(const T &head, const U &...tail) { _W(head); putchar(sizeof...(tail) ? ' ' : '\n'); W(tail...); } #ifdef HOME #define DEBUG(...) \ { \ printf("# "); \ printf(__VA_ARGS__); \ puts(""); \ } #else #define DEBUG(...) #endif int MOD = 1e9 + 7; void ADD(LL &x, LL v) { x = (x + v) % MOD; if (x < 0) x += MOD; } /*}}}*/ const int SIZE = 1e6 + 10; int N, K; LL dp[2][26][6001]; int main() { R(N, K); { int v = 0; FOR(i, 1, N) { v += abs(N + 1 - i - i); } if (K > v) { W(0); return 0; } } int now = 0, nxt = 1; dp[now][0][0] = 1; for (int i = N; i > 0; i--) { MS0(dp[nxt]); REP(j, 26) REP(k, 6001) { if (!dp[now][j][k]) continue; ADD(dp[nxt][j][k], dp[now][j][k] * (1 + j * 2)); if (j) ADD(dp[nxt][j - 1][k - 2 * i], dp[now][j][k] * j * j); if (j < 25) ADD(dp[nxt][j + 1][k + 2 * i], dp[now][j][k]); } swap(now, nxt); } W(dp[now][0][K]); return 0; }
replace
121
122
121
123
0
p02974
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <uint_fast64_t Modulus> class modint { using u64 = uint_fast64_t; public: u64 a; constexpr modint(const u64 x = 0) noexcept : a(((x % Modulus) + Modulus) % Modulus) {} constexpr u64 &value() noexcept { return a; } constexpr const u64 &value() const noexcept { return a; } constexpr modint &operator+=(const modint &rhs) noexcept { a += rhs.a; if (a >= Modulus) a -= Modulus; return *this; } constexpr modint operator+(const modint &rhs) const noexcept { return modint(*this) += rhs; } constexpr modint &operator++() noexcept { return ++a, *this; } constexpr modint operator++(int) noexcept { modint t = *this; return ++a, t; } constexpr modint &operator-=(const modint &rhs) noexcept { if (a < rhs.a) a += Modulus; a -= rhs.a; return *this; } constexpr modint operator-(const modint &rhs) const noexcept { return modint(*this) -= rhs; } constexpr modint &operator--() noexcept { return --a, *this; } constexpr modint operator--(int) noexcept { modint t = *this; return --a, t; } constexpr modint &operator*=(const modint &rhs) noexcept { a = a * rhs.a % Modulus; return *this; } constexpr modint operator*(const modint &rhs) const noexcept { return modint(*this) *= rhs; } constexpr modint &operator/=(modint rhs) noexcept { u64 exp = Modulus - 2; while (exp) { if (exp & 1) *this *= rhs; rhs *= rhs; exp >>= 1; } return *this; } constexpr modint operator/(const modint &rhs) const noexcept { return modint(*this) /= rhs; } constexpr modint operator-() const noexcept { return modint(Modulus - a); } constexpr bool operator==(const modint &rhs) const noexcept { return a == rhs.a; } constexpr bool operator!=(const modint &rhs) const noexcept { return a != rhs.a; } constexpr bool operator!() const noexcept { return !a; } friend constexpr modint pow(modint rhs, long long exp) noexcept { modint res{1}; while (exp) { if (exp & 1) res *= rhs; rhs *= rhs; exp >>= 1; } return res; } template <class T> friend constexpr modint operator+(T x, modint y) noexcept { return modint(x) + y; } template <class T> friend constexpr modint operator-(T x, modint y) noexcept { return modint(x) - y; } template <class T> friend constexpr modint operator*(T x, modint y) noexcept { return modint(x) * y; } template <class T> friend constexpr modint operator/(T x, modint y) noexcept { return modint(x) / y; } friend ostream &operator<<(ostream &s, const modint &rhs) noexcept { return s << rhs.a; } friend istream &operator>>(istream &s, modint &rhs) noexcept { u64 a; rhs = modint{(s >> a, a)}; return s; } }; using mint = modint<MOD>; int main() { cin.tie(0); ios::sync_with_stdio(false); int N, K; cin >> N >> K; mint dp[N + 1][N + 1][K + 1]; for (int i = 0; i < N + 1; ++i) for (int j = 0; j < N + 1; ++j) for (int k = 0; k < K + 1; ++k) dp[i][j][k] = 0; dp[0][0][0] = 1; for (int i = 0; i < N; ++i) { for (int j = 0; j < N + 1; ++j) { for (int k = 0; j + k < K + 1; ++k) { dp[i + 1][j][j + k] += dp[i][j][k] + dp[i][j][k] * j; if (1 < j) dp[i + 1][j - 2][j + k] += dp[i][j][k] * j * j / 4; if (j < K - 1) dp[i + 1][j + 2][j + k] += dp[i][j][k]; } } } cout << dp[N][0][K] << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <uint_fast64_t Modulus> class modint { using u64 = uint_fast64_t; public: u64 a; constexpr modint(const u64 x = 0) noexcept : a(((x % Modulus) + Modulus) % Modulus) {} constexpr u64 &value() noexcept { return a; } constexpr const u64 &value() const noexcept { return a; } constexpr modint &operator+=(const modint &rhs) noexcept { a += rhs.a; if (a >= Modulus) a -= Modulus; return *this; } constexpr modint operator+(const modint &rhs) const noexcept { return modint(*this) += rhs; } constexpr modint &operator++() noexcept { return ++a, *this; } constexpr modint operator++(int) noexcept { modint t = *this; return ++a, t; } constexpr modint &operator-=(const modint &rhs) noexcept { if (a < rhs.a) a += Modulus; a -= rhs.a; return *this; } constexpr modint operator-(const modint &rhs) const noexcept { return modint(*this) -= rhs; } constexpr modint &operator--() noexcept { return --a, *this; } constexpr modint operator--(int) noexcept { modint t = *this; return --a, t; } constexpr modint &operator*=(const modint &rhs) noexcept { a = a * rhs.a % Modulus; return *this; } constexpr modint operator*(const modint &rhs) const noexcept { return modint(*this) *= rhs; } constexpr modint &operator/=(modint rhs) noexcept { u64 exp = Modulus - 2; while (exp) { if (exp & 1) *this *= rhs; rhs *= rhs; exp >>= 1; } return *this; } constexpr modint operator/(const modint &rhs) const noexcept { return modint(*this) /= rhs; } constexpr modint operator-() const noexcept { return modint(Modulus - a); } constexpr bool operator==(const modint &rhs) const noexcept { return a == rhs.a; } constexpr bool operator!=(const modint &rhs) const noexcept { return a != rhs.a; } constexpr bool operator!() const noexcept { return !a; } friend constexpr modint pow(modint rhs, long long exp) noexcept { modint res{1}; while (exp) { if (exp & 1) res *= rhs; rhs *= rhs; exp >>= 1; } return res; } template <class T> friend constexpr modint operator+(T x, modint y) noexcept { return modint(x) + y; } template <class T> friend constexpr modint operator-(T x, modint y) noexcept { return modint(x) - y; } template <class T> friend constexpr modint operator*(T x, modint y) noexcept { return modint(x) * y; } template <class T> friend constexpr modint operator/(T x, modint y) noexcept { return modint(x) / y; } friend ostream &operator<<(ostream &s, const modint &rhs) noexcept { return s << rhs.a; } friend istream &operator>>(istream &s, modint &rhs) noexcept { u64 a; rhs = modint{(s >> a, a)}; return s; } }; using mint = modint<MOD>; int main() { cin.tie(0); ios::sync_with_stdio(false); int N, K; cin >> N >> K; mint dp[N + 1][N + 1][K + 1]; for (int i = 0; i < N + 1; ++i) for (int j = 0; j < N + 1; ++j) for (int k = 0; k < K + 1; ++k) dp[i][j][k] = 0; dp[0][0][0] = 1; for (int i = 0; i < N; ++i) { for (int j = 0; j < N + 1; ++j) { for (int k = 0; j + k < K + 1; ++k) { dp[i + 1][j][j + k] += dp[i][j][k] + dp[i][j][k] * j; if (1 < j) dp[i + 1][j - 2][j + k] += dp[i][j][k] * j * j / 4; if (j < N - 1) dp[i + 1][j + 2][j + k] += dp[i][j][k]; } } } cout << dp[N][0][K] << endl; }
replace
136
137
136
137
0
p02974
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { cin.tie(0); ios::sync_with_stdio(false); const ll MOD = 1e9 + 7; ll N, K; cin >> N >> K; vector<vector<vector<ll>>> dp(N + 1, vector<vector<ll>>(N + 1, vector<ll>(K + 1))); dp[0][0][0] = 1; for (int i = 1; i <= N; ++i) { for (int j = 0; j <= i; ++j) { for (int k = 2 * j; k <= K; ++k) { ll &v = dp[i][j][k]; (v += (2 * j + 1) * dp[i - 1][j][k - 2 * j]) %= MOD; (v += (j + 1) * (j + 1) * dp[i - 1][j + 1][k - 2 * j]) %= MOD; if (0 <= j - 1) (v += dp[i - 1][j - 1][k - 2 * j]) %= MOD; } } } cout << dp[N][0][K] << endl; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { cin.tie(0); ios::sync_with_stdio(false); const ll MOD = 1e9 + 7; ll N, K; cin >> N >> K; vector<vector<vector<ll>>> dp(N + 1, vector<vector<ll>>(N + 2, vector<ll>(K + 1))); dp[0][0][0] = 1; for (int i = 1; i <= N; ++i) { for (int j = 0; j <= i; ++j) { for (int k = 2 * j; k <= K; ++k) { ll &v = dp[i][j][k]; (v += (2 * j + 1) * dp[i - 1][j][k - 2 * j]) %= MOD; (v += (j + 1) * (j + 1) * dp[i - 1][j + 1][k - 2 * j]) %= MOD; if (0 <= j - 1) (v += dp[i - 1][j - 1][k - 2 * j]) %= MOD; } } } cout << dp[N][0][K] << endl; return 0; }
replace
16
17
16
17
0
p02974
C++
Runtime Error
#include <iostream> using namespace std; const int mod = (int)1e9 + 7; inline void addmod(int &a, int b) { a += b; a %= mod; } int main() { const int mid = 1300; static int pdp[2501][51] = {}, dp[2501][51] = {}; int n, k; cin >> n >> k; if (k % 2 != 0) { cout << 0 << endl; cerr << "bad" << endl; return 0; } k /= 2; dp[mid][0] = 1; int mxSum = n * (n - 1) / 2; int lSum = mid - mxSum, rSum = mid + mxSum; for (int step = 0; step < n; ++step) { for (int sum = lSum; sum <= rSum; ++sum) { for (int p = 0; p <= step; ++p) { pdp[sum][p] = dp[sum][p]; dp[sum][p] = 0; } } for (int sum = lSum; sum <= rSum; ++sum) { for (int p = 0; p <= step; ++p) { if (!pdp[sum][p]) { continue; } int64_t val = pdp[sum][p]; // place is L, item is L addmod(dp[sum][p], val * (p + 1) % mod); // place is L, item is S addmod(dp[sum - step][p + 1], val); // place is S, item is L if (p) addmod(dp[sum + step][p - 1], val * p * p % mod); // place is S, item is S if (p) addmod(dp[sum][p], val * p % mod); } } } cout << dp[k + mid][0] << endl; return 0; }
#include <iostream> using namespace std; const int mod = (int)1e9 + 7; inline void addmod(int &a, int b) { a += b; a %= mod; } int main() { const int mid = 1300; static int pdp[2601][51] = {}, dp[2601][51] = {}; int n, k; cin >> n >> k; if (k % 2 != 0) { cout << 0 << endl; cerr << "bad" << endl; return 0; } k /= 2; dp[mid][0] = 1; int mxSum = n * (n - 1) / 2; int lSum = mid - mxSum, rSum = mid + mxSum; for (int step = 0; step < n; ++step) { for (int sum = lSum; sum <= rSum; ++sum) { for (int p = 0; p <= step; ++p) { pdp[sum][p] = dp[sum][p]; dp[sum][p] = 0; } } for (int sum = lSum; sum <= rSum; ++sum) { for (int p = 0; p <= step; ++p) { if (!pdp[sum][p]) { continue; } int64_t val = pdp[sum][p]; // place is L, item is L addmod(dp[sum][p], val * (p + 1) % mod); // place is L, item is S addmod(dp[sum - step][p + 1], val); // place is S, item is L if (p) addmod(dp[sum + step][p - 1], val * p * p % mod); // place is S, item is S if (p) addmod(dp[sum][p], val * p % mod); } } } cout << dp[k + mid][0] << endl; return 0; }
replace
13
14
13
14
0
p02974
C++
Runtime Error
#include <algorithm> #include <iostream> using namespace std; typedef long long ll; ll dp[50][50][50 * 50 + 1]; // dp[i][j][k] := // i番目まで見て、jこずつ添え字と数字を保留してる(互いに同じ個数となるようにしか保留ができない)とき、 // 確定してる奇妙さがkのときの場合の数 int N, K; const ll MOD = 1000000007; int main() { cin >> N >> K; dp[0][0][0] = 1; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { for (int k = 0; k <= N * N; k++) { dp[i][j][k] %= MOD; // 今見てる数字と添え字同士がそのままマッチングされるとき if (k + 2 * j <= N * N) dp[i + 1][j][k + 2 * j] += dp[i][j][k]; // 今見てる数字と添え字どちらも保留とする。つまり、0~i(0-idx)番目までにマッチングさせないとき if (k + 2 * (j + 1) <= N * N && j <= N - 2) dp[i + 1][j + 1][k + 2 * (j + 1)] += dp[i][j][k]; // 今見てる数字と添え字で、数字は保留された添え字とマッチングし、添え字はそのまま保留するとき // 今見てる数字と添え字で、添え字は保留された数字とマッチングし、数字はそのまま保留するとき // この二つは数字と添え字の保留数はかならず同じになる性質上、同じ式でまとめることができる。 // お互い、保留された数字(or添え字)とマッチングする際に、j通りある相手のうちどれを選んでもいい。 if (k + 2 * j <= N * N) dp[i + 1][j][k + 2 * j] += dp[i][j][k] * 2 * j; // 今見てる数字と添え字で、数字は保留された添え字とマッチング、添え字は保留された数字とマッチングするとき // 保留されてる数字と添え字は一つずつ減る。また、上のパターンと同様に、お互い保留されたものとはj通りの選び方があるので、 // j*j倍される。 if (k + 2 * (j - 1) <= N * N && j - 1 >= 0) dp[i + 1][j - 1][k + 2 * (j - 1)] += dp[i][j][k] * j * j; } } } cout << dp[N][0][K] % MOD << endl; return 0; }
#include <algorithm> #include <iostream> using namespace std; typedef long long ll; ll dp[51][51][50 * 50 + 1]; // dp[i][j][k] := // i番目まで見て、jこずつ添え字と数字を保留してる(互いに同じ個数となるようにしか保留ができない)とき、 // 確定してる奇妙さがkのときの場合の数 int N, K; const ll MOD = 1000000007; int main() { cin >> N >> K; dp[0][0][0] = 1; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { for (int k = 0; k <= N * N; k++) { dp[i][j][k] %= MOD; // 今見てる数字と添え字同士がそのままマッチングされるとき if (k + 2 * j <= N * N) dp[i + 1][j][k + 2 * j] += dp[i][j][k]; // 今見てる数字と添え字どちらも保留とする。つまり、0~i(0-idx)番目までにマッチングさせないとき if (k + 2 * (j + 1) <= N * N && j <= N - 2) dp[i + 1][j + 1][k + 2 * (j + 1)] += dp[i][j][k]; // 今見てる数字と添え字で、数字は保留された添え字とマッチングし、添え字はそのまま保留するとき // 今見てる数字と添え字で、添え字は保留された数字とマッチングし、数字はそのまま保留するとき // この二つは数字と添え字の保留数はかならず同じになる性質上、同じ式でまとめることができる。 // お互い、保留された数字(or添え字)とマッチングする際に、j通りある相手のうちどれを選んでもいい。 if (k + 2 * j <= N * N) dp[i + 1][j][k + 2 * j] += dp[i][j][k] * 2 * j; // 今見てる数字と添え字で、数字は保留された添え字とマッチング、添え字は保留された数字とマッチングするとき // 保留されてる数字と添え字は一つずつ減る。また、上のパターンと同様に、お互い保留されたものとはj通りの選び方があるので、 // j*j倍される。 if (k + 2 * (j - 1) <= N * N && j - 1 >= 0) dp[i + 1][j - 1][k + 2 * (j - 1)] += dp[i][j][k] * j * j; } } } cout << dp[N][0][K] % MOD << endl; return 0; }
replace
6
7
6
7
0
p02974
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int n, kk; long long mod = 1e9 + 7; long long d[51][51][2800]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n >> kk; d[0][0][0] = 1; for (int i = 0; i < n; i++) { for (int j = 0; j <= n; j++) { for (int k = 0; k <= kk + 1; k++) { d[i + 1][j][k + j * 2] += d[i][j][k]; d[i + 1][j][k + j * 2] %= mod; if (j - 1 >= 0) { d[i + 1][j - 1][k + (j - 1) * 2] += (d[i][j][k] * j * j); d[i + 1][j - 1][k + (j - 1) * 2] %= mod; } d[i + 1][j][k + j * 2] += d[i][j][k] * (2 * j); d[i + 1][j][k + j * 2] %= mod; d[i + 1][j + 1][k + (j + 1) * 2] += d[i][j][k]; d[i + 1][j + 1][k + (j + 1) * 2] %= mod; } } } cout << d[n][0][kk] % mod << '\n'; }
#include <bits/stdc++.h> using namespace std; int n, kk; long long mod = 1e9 + 7; long long d[52][52][5000]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n >> kk; d[0][0][0] = 1; for (int i = 0; i < n; i++) { for (int j = 0; j <= n; j++) { for (int k = 0; k <= kk + 1; k++) { d[i + 1][j][k + j * 2] += d[i][j][k]; d[i + 1][j][k + j * 2] %= mod; if (j - 1 >= 0) { d[i + 1][j - 1][k + (j - 1) * 2] += (d[i][j][k] * j * j); d[i + 1][j - 1][k + (j - 1) * 2] %= mod; } d[i + 1][j][k + j * 2] += d[i][j][k] * (2 * j); d[i + 1][j][k + j * 2] %= mod; d[i + 1][j + 1][k + (j + 1) * 2] += d[i][j][k]; d[i + 1][j + 1][k + (j + 1) * 2] %= mod; } } } cout << d[n][0][kk] % mod << '\n'; }
replace
5
6
5
6
0
p02974
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long // #define double long double #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FORR(i, a, b) for (int i = (a); i > (b); --i) #define REP(i, n) for (int i = 0; i < (n); ++i) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOREACH(x, a) for (auto &(x) : (a)) #define VECCIN(x) \ for (auto &youso_ : (x)) \ cin >> youso_ #define bitcnt(x) __builtin_popcount(x) #define lbit(x) __builtin_ffsll(x) #define rbit(x) __builtin_clzll(x) #define SZ(x) ((long long)(x).size()) #define fi first #define se second #define All(a) (a).begin(), (a).end() #define rAll(a) (a).rbegin(), (a).rend() #define cinfast() cin.tie(0), ios::sync_with_stdio(false) #define PERM(c) \ sort(All(c)); \ for (bool cp = true; cp; cp = next_permutation(All(c))) #define MKORDER(n) \ vector<int> od(n); \ iota(All(od), 0LL); template <typename T = long long> inline T IN() { T x; cin >> x; return (x); } inline void CIN() {} template <class Head, class... Tail> inline void CIN(Head &&head, Tail &&...tail) { cin >> head; CIN(move(tail)...); } #define CCIN(...) \ char __VA_ARGS__; \ CIN(__VA_ARGS__) #define DCIN(...) \ double __VA_ARGS__; \ CIN(__VA_ARGS__) #define LCIN(...) \ long long __VA_ARGS__; \ CIN(__VA_ARGS__) #define SCIN(...) \ string __VA_ARGS__; \ CIN(__VA_ARGS__) #define Yes(a) cout << (a ? "Yes" : "No") << "\n" #define YES(a) cout << (a ? "YES" : "NO") << "\n" #define Printv(v) \ { \ FOREACH(x, v) { cout << x << " "; } \ cout << "\n"; \ } template <typename T = string> inline void eputs(T s) { cout << s << "\n"; exit(0); } template <typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val) { std::fill((T *)array, (T *)(array + N), val); } template <typename T> using PQG = priority_queue<T, vector<T>, greater<T>>; template <typename T> using PQ = priority_queue<T>; typedef long long ll; typedef vector<ll> VL; typedef vector<VL> VVL; typedef pair<ll, ll> PL; typedef vector<PL> VPL; typedef vector<bool> VB; typedef vector<double> VD; typedef vector<string> VS; const int INF = 1e9; const int MOD = 1e9 + 7; // const int MOD = 998244353; const ll LINF = 1e18; const double PI = atan(1.0) * 4.0; const ll dw[] = {1, 1, 0, -1, -1, -1, 0, 1}; const ll dh[] = {0, 1, 1, 1, 0, -1, -1, -1}; #define PI 3.141592653589793238 // 1000000007 で割ったあまりを扱う構造体 template <int MOD> struct Fp { long long val; constexpr Fp(long long v = 0) noexcept : val(v % MOD) { if (val < 0) v += MOD; } constexpr int getmod() { return MOD; } constexpr Fp operator-() const noexcept { return val ? MOD - val : 0; } constexpr Fp operator+(const Fp &r) const noexcept { return Fp(*this) += r; } constexpr Fp operator-(const Fp &r) const noexcept { return Fp(*this) -= r; } constexpr Fp operator*(const Fp &r) const noexcept { return Fp(*this) *= r; } constexpr Fp operator/(const Fp &r) const noexcept { return Fp(*this) /= r; } constexpr Fp &operator+=(const Fp &r) noexcept { val += r.val; if (val >= MOD) val -= MOD; return *this; } constexpr Fp &operator-=(const Fp &r) noexcept { val -= r.val; if (val < 0) val += MOD; return *this; } constexpr Fp &operator*=(const Fp &r) noexcept { val = val * r.val % MOD; return *this; } constexpr Fp &operator/=(const Fp &r) noexcept { long long a = r.val, b = MOD, u = 1, v = 0; while (b) { long long t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } val = val * u % MOD; if (val < 0) val += MOD; return *this; } constexpr bool operator==(const Fp &r) const noexcept { return this->val == r.val; } constexpr bool operator!=(const Fp &r) const noexcept { return this->val != r.val; } friend constexpr ostream &operator<<(ostream &os, const Fp<MOD> &x) noexcept { return os << x.val; } friend constexpr istream &operator>>(istream &is, Fp<MOD> &x) noexcept { return is >> x.val; } friend constexpr Fp<MOD> modpow(const Fp<MOD> &a, long long n) noexcept { if (n == 0) return 1; auto t = modpow(a, n / 2); t = t * t; if (n & 1) t = t * a; return t; } }; using mint = Fp<MOD>; mint dp[2][51][2505]; signed main() { cinfast(); LCIN(N, K); ll now = 0, next = 1; dp[now][0][0] = 1; REP(i, N) { Fill(dp[next], 0); REP(j, N + 1) FOR(k, 2 * j, K + 1) { // 両方保留 if (j) dp[next][j][k] += dp[now][j - 1][k - 2 * j]; // 保留箱に入れるかつ保留ボールを入れる dp[next][j][k] += (mint)(j + 1) * (j + 1) * dp[now][j + 1][k - 2 * j]; // 保留箱に入れるまたは保留ボールを入れる dp[next][j][k] += (mint)(2 * j + 1) * dp[now][j][k - 2 * j]; } swap(now, next); } cout << dp[now][0][K] << "\n"; }
#include <bits/stdc++.h> using namespace std; #define int long long // #define double long double #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FORR(i, a, b) for (int i = (a); i > (b); --i) #define REP(i, n) for (int i = 0; i < (n); ++i) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOREACH(x, a) for (auto &(x) : (a)) #define VECCIN(x) \ for (auto &youso_ : (x)) \ cin >> youso_ #define bitcnt(x) __builtin_popcount(x) #define lbit(x) __builtin_ffsll(x) #define rbit(x) __builtin_clzll(x) #define SZ(x) ((long long)(x).size()) #define fi first #define se second #define All(a) (a).begin(), (a).end() #define rAll(a) (a).rbegin(), (a).rend() #define cinfast() cin.tie(0), ios::sync_with_stdio(false) #define PERM(c) \ sort(All(c)); \ for (bool cp = true; cp; cp = next_permutation(All(c))) #define MKORDER(n) \ vector<int> od(n); \ iota(All(od), 0LL); template <typename T = long long> inline T IN() { T x; cin >> x; return (x); } inline void CIN() {} template <class Head, class... Tail> inline void CIN(Head &&head, Tail &&...tail) { cin >> head; CIN(move(tail)...); } #define CCIN(...) \ char __VA_ARGS__; \ CIN(__VA_ARGS__) #define DCIN(...) \ double __VA_ARGS__; \ CIN(__VA_ARGS__) #define LCIN(...) \ long long __VA_ARGS__; \ CIN(__VA_ARGS__) #define SCIN(...) \ string __VA_ARGS__; \ CIN(__VA_ARGS__) #define Yes(a) cout << (a ? "Yes" : "No") << "\n" #define YES(a) cout << (a ? "YES" : "NO") << "\n" #define Printv(v) \ { \ FOREACH(x, v) { cout << x << " "; } \ cout << "\n"; \ } template <typename T = string> inline void eputs(T s) { cout << s << "\n"; exit(0); } template <typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val) { std::fill((T *)array, (T *)(array + N), val); } template <typename T> using PQG = priority_queue<T, vector<T>, greater<T>>; template <typename T> using PQ = priority_queue<T>; typedef long long ll; typedef vector<ll> VL; typedef vector<VL> VVL; typedef pair<ll, ll> PL; typedef vector<PL> VPL; typedef vector<bool> VB; typedef vector<double> VD; typedef vector<string> VS; const int INF = 1e9; const int MOD = 1e9 + 7; // const int MOD = 998244353; const ll LINF = 1e18; const double PI = atan(1.0) * 4.0; const ll dw[] = {1, 1, 0, -1, -1, -1, 0, 1}; const ll dh[] = {0, 1, 1, 1, 0, -1, -1, -1}; #define PI 3.141592653589793238 // 1000000007 で割ったあまりを扱う構造体 template <int MOD> struct Fp { long long val; constexpr Fp(long long v = 0) noexcept : val(v % MOD) { if (val < 0) v += MOD; } constexpr int getmod() { return MOD; } constexpr Fp operator-() const noexcept { return val ? MOD - val : 0; } constexpr Fp operator+(const Fp &r) const noexcept { return Fp(*this) += r; } constexpr Fp operator-(const Fp &r) const noexcept { return Fp(*this) -= r; } constexpr Fp operator*(const Fp &r) const noexcept { return Fp(*this) *= r; } constexpr Fp operator/(const Fp &r) const noexcept { return Fp(*this) /= r; } constexpr Fp &operator+=(const Fp &r) noexcept { val += r.val; if (val >= MOD) val -= MOD; return *this; } constexpr Fp &operator-=(const Fp &r) noexcept { val -= r.val; if (val < 0) val += MOD; return *this; } constexpr Fp &operator*=(const Fp &r) noexcept { val = val * r.val % MOD; return *this; } constexpr Fp &operator/=(const Fp &r) noexcept { long long a = r.val, b = MOD, u = 1, v = 0; while (b) { long long t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } val = val * u % MOD; if (val < 0) val += MOD; return *this; } constexpr bool operator==(const Fp &r) const noexcept { return this->val == r.val; } constexpr bool operator!=(const Fp &r) const noexcept { return this->val != r.val; } friend constexpr ostream &operator<<(ostream &os, const Fp<MOD> &x) noexcept { return os << x.val; } friend constexpr istream &operator>>(istream &is, Fp<MOD> &x) noexcept { return is >> x.val; } friend constexpr Fp<MOD> modpow(const Fp<MOD> &a, long long n) noexcept { if (n == 0) return 1; auto t = modpow(a, n / 2); t = t * t; if (n & 1) t = t * a; return t; } }; using mint = Fp<MOD>; mint dp[2][55][2555]; signed main() { cinfast(); LCIN(N, K); ll now = 0, next = 1; dp[now][0][0] = 1; REP(i, N) { Fill(dp[next], 0); REP(j, N + 1) FOR(k, 2 * j, K + 1) { // 両方保留 if (j) dp[next][j][k] += dp[now][j - 1][k - 2 * j]; // 保留箱に入れるかつ保留ボールを入れる dp[next][j][k] += (mint)(j + 1) * (j + 1) * dp[now][j + 1][k - 2 * j]; // 保留箱に入れるまたは保留ボールを入れる dp[next][j][k] += (mint)(2 * j + 1) * dp[now][j][k - 2 * j]; } swap(now, next); } cout << dp[now][0][K] << "\n"; }
replace
158
159
158
159
0
p02974
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define REP(i, n) FOR(i, 0, n) const int MOD = 1000000007; int main() { // freopen("input.txt", "r", stdin); vector<int> sz{1, 2, 3, 5, 7, 10, 13, 17, 21, 26, 31, 37, 43, 50, 57, 65, 73, 82, 91, 101, 111, 122, 133, 145, 157, 170, 183, 197, 211, 226, 241, 257, 273, 290, 307, 325, 343, 362, 381, 401, 421, 442, 463, 485, 507, 530, 553, 577, 601, 626}; vector<long long> ans{ 1, 1, 1, 1, 2, 3, 1, 3, 7, 9, 4, 1, 4, 12, 24, 35, 24, 20, 1, 5, 18, 46, 93, 137, 148, 136, 100, 36, 1, 6, 25, 76, 187, 366, 591, 744, 884, 832, 716, 360, 252, 1, 7, 33, 115, 327, 765, 1523, 2553, 3696, 4852, 5708, 5892, 5452, 4212, 2844, 1764, 576, 1, 8, 42, 164, 524, 1400, 3226, 6436, 11323, 17640, 25472, 33280, 40520, 44240, 45512, 40608, 35496, 25632, 18108, 8064, 5184, 1, 9, 52, 224, 790, 2350, 6072, 13768, 27821, 50461, 83420, 127840, 182256, 242272, 301648, 350864, 382576, 389232, 373536, 332640, 273060, 208548, 136512, 81792, 46656, 14400, 1, 10, 63, 296, 1138, 3708, 10538, 26480, 59673, 121626, 226787, 390144, 628744, 949472, 1355952, 1826464, 2341600, 2833632, 3282464, 3584160, 3765600, 3719664, 3531924, 3093336, 2642364, 2010240, 1508544, 963072, 621504, 259200, 158400, 1, 11, 75, 381, 1582, 5582, 17222, 47194, 116457, 261163, 537459, 1022981, 1817652, 3040352, 4810720, 7230928, 10360160, 14178912, 18577792, 23327872, 28132048, 32571504, 36310464, 38903904, 40028724, 39552156, 37457388, 33941412, 29314944, 24179904, 18835776, 13777344, 9452736, 5716800, 3211200, 1742400, 518400, 1, 12, 88, 480, 2137, 8096, 26860, 79376, 211811, 515308, 1153268, 2391936, 4633331, 8438664, 14557048, 23874176, 37407760, 56117824, 80906752, 112162240, 150052400, 193572736, 241706624, 291576384, 341323776, 386160048, 424359540, 450394992, 464545584, 461528208, 446428476, 413557632, 373573440, 321120000, 268449408, 210332160, 162330624, 112550400, 77788800, 46540800, 28497600, 11404800, 6739200, 1, 13, 102, 594, 2819, 11391, 40344, 127508, 364587, 952559, 2293742, 5126898, 10710633, 21042989, 39117852, 69175664, 116857024, 189256368, 294745440, 442503456, 641759376, 900689616, 225195321, 617201401, 74227554, 586823330, 140227131, 711888699, 274217080, 795069832, 242715461, 585116357, 796764497, 861974465, 769155485, 525176285, 146566301, 650715556, 73773796, 455145195, 828946802, 226153586, 685663993, 216281593, 828705600, 536385600, 309484800, 166924800, 87609600, 25401600, 1, 14, 117, 724, 3645, 15626, 58741, 197280, 600215, 1671266, 4295107, 10259436, 22922995, 48184950, 95816051, 181136304, 327071752, 566117888, 942525072, 513281017, 349163810, 532145419, 154557773, 309226767, 88509354, 563257605, 789064441, 766807654, 474675580, 795689314, 599134613, 627066840, 658988947, 307608398, 337632800, 295701193, 44870369, 150212311, 705302359, 336038622, 452522163, 797367958, 62674553, 57993322, 777736994, 845298906, 452367755, 90655804, 810196653, 976943895, 564798323, 582118351, 994783972, 869862386, 697759993, 660441600, 381024000, 1, 15, 133, 871, 4633, 20979, 83313, 295803, 952299, 2809009, 7656027, 19414457, 46086247, 102967901, 217634463, 437195525, 838372452, 540635289, 722168530, 638311860, 640827391, 196046908, 898688562, 478199884, 793020369, 808862771, 562236075, 94791602, 385333320, 237794527, 197694759, 398043392, 504456766, 579736664, 78137089, 793367253, 961295251, 280517488, 179779783, 947563092, 901772777, 859566930, 199212409, 920781370, 362900807, 735004334, 297264154, 482748036, 653703312, 140400674, 623159781, 320434095, 373194802, 13313867, 205909676, 360223815, 570584277, 68075848, 372652149, 961247580, 23084534, 261139053, 151302323, 715359965, 625702393, 1, 16, 150, 1036, 5802, 27648, 115538, 431844, 1464468, 4554040, 13096378, 35069940, 87969166, 207781760, 464351910, 986188668, 998611836, 879505923, 237509223, 15110629, 621334822, 88677622, 257578542, 963016850, 235638961, 442107823, 429101453, 483004748, 329733855, 718448185, 266304376, 413950543, 256286771, 626720357, 318467482, 59069608, 81901162, 352730851, 104241055, 503595237, 956355036, 534522134, 457799859, 108929893, 887297322, 424614770, 265024591, 876853471, 515703045, 692038809, 210906163, 20070317, 468291405, 145357835, 797577421, 232358134, 747771239, 343859985, 833879609, 78548665, 289896769, 449285934, 313197004, 379603290, 397630660, 609910102, 442642726, 627950853, 722186028, 705163253, 998661511, 771071664, 636940611, 1, 17, 168, 1220, 7172, 35852, 157132, 616084, 2192506, 7159090, 21631676, 60902460, 160707468, 399489140, 939796228, 101060910, 481320121, 151453550, 952463061, 931694473, 957528293, 554162053, 990142499, 644946993, 651797781, 791594351, 556120466, 271969917, 107619398, 710253075, 280526462, 615698879, 99748930, 775178221, 257586036, 645364809, 806795120, 340635512, 801741075, 790520661, 68328385, 331513794, 351728404, 931812262, 91105169, 176869824, 445724501, 370449983, 359815736, 918724628, 869062973, 659791249, 657727222, 395793733, 32692523, 78858425, 151369211, 628504487, 842750087, 152091477, 889718876, 908002421, 944598446, 656459208, 712920845, 47550280, 92244967, 110652620, 951703750, 217822851, 901098263, 655149074, 861896271, 859184013, 992613245, 768042116, 807916959, 335381553, 909568095, 153171069, 827990317, 681893483, 1, 18, 187, 1424, 8764, 45832, 210072, 861400, 3206786, 10957868, 34666130, 102239488, 282743580, 736889224, 817936097, 262532028, 534038590, 412279142, 965109380, 86702267, 846482566, 945052509, 644517943, 548776024, 679330947, 152291502, 882910517, 188127435, 636778925, 902059202, 132531208, 193904122, 893705022, 246193070, 652079051, 958060250, 148697872, 504141990, 371410212, 807466717, 514477363, 565424570, 560794838, 11419155, 215137208, 665710713, 791504234, 359367396, 224050172, 509091270, 125989128, 782600310, 957126038, 667219607, 386301613, 605448653, 296557741, 618019404, 194294675, 222923480, 765962783, 743934970, 24324611, 512643153, 214242880, 286900578, 228877964, 91240846, 430467141, 533029377, 904804693, 373207899, 916503101, 83598539, 560288494, 363356684, 68282446, 152683809, 284461190, 124425011, 167972327, 428909487, 373215034, 420008537, 513304383, 874743039, 487193257, 97337408, 532639641, 184378261, 955976093, 1, 19, 207, 1649, 10600, 57852, 276620, 1183172, 4595034, 16384606, 54107670, 166643130, 481442164, 311240781, 381378831, 288429444, 380463632, 370477330, 171662912, 688513797, 626045604, 789881798, 844990830, 70546834, 230422087, 267733218, 970080423, 75064762, 104073936, 888990608, 393490487, 819401315, 362017415, 197941501, 97730360, 491049732, 790022455, 142301163, 381999002, 81566974, 255547256, 500580164, 503785886, 874661360, 953064009, 357278689, 416715628, 656421867, 311332859, 849655408, 575613107, 850236831, 533549113, 255339339, 611845477, 501164398, 135987981, 672393680, 678611757, 552403430, 470027818, 333312311, 203812034, 929380798, 133842121, 497262544, 839881753, 29703780, 133717366, 249364505, 959337844, 632980495, 72879056, 356819838, 662140760, 182352973, 260787823, 329159184, 423643610, 488600943, 164109163, 8143787, 184454683, 684285006, 693158498, 382122550, 488552031, 777204359, 564238497, 598675373, 603916585, 720234840, 93182262, 238936257, 486420235, 352604922, 958291193, 880928218, 736558676, 163545641, 189347824, 1, 20, 228, 1896, 12703, 72200, 359348, 1599616, 6465450, 23997032, 82508708, 264654080, 796563486, 260832418, 76986106, 528774007, 854313906, 307546108, 722735109, 61004626, 805619536, 18191861, 511411798, 993782454, 401030744, 633897378, 70862649, 96855526, 314416445, 92910833, 135520920, 492052755, 24334887, 643976444, 574388511, 317610455, 122930943, 637889505, 255461238, 950861369, 48876234, 149504663, 198682481, 942670278, 866921314, 563621302, 960474580, 980132644, 624295523, 399490883, 351714973, 945626033, 827908349, 157456205, 481861323, 472454109, 343580291, 683697065, 95059407, 841332348, 464714941, 596887160, 38681949, 757883329, 590303711, 64921694, 730086270, 15240461, 714742087, 32874447, 175996750, 277466516, 788882909, 11880203, 95097385, 778398376, 531252352, 479554466, 557013590, 609738833, 798714176, 859324339, 721484640, 268442938, 861267595, 806087188, 31691029, 950412807, 580575404, 849451646, 691790951, 264837637, 967322620, 365040170, 622467624, 456436788, 658680316, 60575186, 387550026, 215002020, 31349904, 449373833, 559514745, 640364153, 807042078, 450172023, 562637973, 109112418, 545193132, 195217263, 976304283, 1, 21, 250, 2166, 15097, 89189, 461164, 2132144, 8950214, 34503182, 123236828, 410729140, 284813823, 790835929, 594736274, 153822108, 374418504, 157537842, 147846917, 133568389, 483576696, 508616649, 656867821, 84463125, 640047601, 955370715, 182167616, 49108700, 229345632, 795610484, 502493987, 857101031, 142485158, 996679960, 742503997, 723858587, 317526153, 365342533, 250775491, 442738912, 408346120, 881242865, 135363327, 231979623, 347291745, 824934645, 995772018, 164592917, 354883487, 450805745, 963969802, 171006181, 92161176, 169883419, 961669090, 26844445, 393784092, 571606470, 464707158, 34144520, 652396373, 745405475, 202923498, 135935314, 703695236, 776259115, 48310283, 874186699, 219390686, 510394758, 751965065, 418424556, 8781061, 736058807, 674014147, 674780706, 590530540, 4352977, 803825827, 167292329, 541083402, 260679638, 665083995, 939990721, 816665296, 886017767, 669822229, 694816125, 643235536, 937314556, 115942268, 261159535, 687177905, 12245758, 694615643, 977706180, 217949106, 118952653, 898868241, 856650616, 42954342, 330321980, 535121720, 982503521, 719423135, 714354007, 18745970, 333448882, 302037622, 935654015, 778423936, 317991952, 284756555, 504736970, 155871365, 118263505, 797065125, 640838446, 258037348, 34344762, 502389803, 911086550, 1, 22, 273, 2460, 17807, 109158, 585339, 2805752, 12209406, 48792492, 180680070, 624410736, 25734764, 199973794, 977710523, 571365953, 412869707, 328237414, 214863466, 633048751, 257394955, 317735309, 673309005, 193600985, 704135816, 514918834, 650479735, 33606857, 490034801, 698396427, 67986999, 220797055, 218864611, 931163713, 940790978, 675674698, 85542051, 543018292, 61247584, 910803604, 831296179, 923943160, 89478028, 104500393, 161998091, 254912705, 539249258, 547749719, 357852173, 690014841, 206926249, 893887199, 747112232, 382059625, 148865046, 301618706, 260333115, 442306036, 247371284, 782005651, 233300621, 920894203, 317455792, 678639547, 427050277, 482884001, 854060466, 980543322, 860769666, 701293636, 771136168, 670745480, 486701027, 168461356, 848787800, 289825171, 498776317, 33320170, 430165721, 821516580, 115533370, 398776967, 333310602, 563097053, 553134182, 219816464, 216637272, 206027601, 933677337, 925510467, 267639197, 43693887, 486722546, 270929495, 877730912, 261947307, 375318068, 692508932, 989184491, 226696206, 288508969, 739837562, 849035543, 782296408, 273955665, 801085382, 431898190, 935043965, 202752072, 867866169, 151133676, 67940990, 78118516, 742654574, 165553271, 254022475, 668960857, 929973305, 656759571, 877339826, 925206924, 133648890, 623964326, 796176354, 256442424, 844384225, 955053908, 35821657, 33969824, 328610099, 171474448, 265634834, 954990510, 1, 23, 297, 2779, 20859, 132473, 735535, 3649437, 16435370, 67971642, 260491974, 931772466, 129241853, 915880695, 773220207, 21124907, 663657824, 89235883, 562087424, 395633225, 79602143, 818737728, 503346111, 923762587, 810187543, 71950684, 872552891, 722894374, 788701216, 792043650, 839896539, 577542972, 345484502, 350106805, 159630680, 594479078, 806985602, 451202244, 562057157, 345406448, 404888318, 371479292, 122121086, 196184273, 855722413, 625056343, 209132008, 580725504, 234791519, 683270249, 879431955, 820639155, 890517789, 877206124, 780147370, 943542736, 532169988, 134361777, 389279830, 486085405, 212150153, 60309713, 36144061, 220641769, 167907687, 433032241, 672669299, 4840381, 543970499, 860603358, 920463673, 899153827, 269139419, 99866794, 833550296, 732963165, 649634036, 220976898, 948879986, 81746947, 249278044, 943429751, 227240067, 617290217, 857759442, 317672542, 702411387, 392102340, 598392406, 771484657, 20769431, 772211314, 777981688, 103043307, 336611982, 922346108, 46010568, 620920750, 740298345, 143296430, 127113300, 229361025, 452883985, 298773134, 583669967, 430943791, 878469881, 498554889, 377075156, 399618101, 518539100, 610655946, 762624102, 339746521, 193491143, 582788075, 58498274, 139175929, 439487543, 659039143, 969039085, 205473123, 149794944, 735361805, 144310487, 952281582, 885994682, 290034640, 449859219, 870975475, 717604104, 930837761, 466542500, 510501275, 368063612, 61813298, 959329905, 938922014, 660077190, 12025968, 335011033, 657136343, 351072920, 964781583, 196462283, 1, 24, 322, 3124, 24280, 159528, 915834, 4696644, 21857553, 93405656, 369882084, 367190881, 745178532, 541448535, 237690972, 408537702, 191376116, 678513161, 493570976, 397907192, 9101765, 658714208, 122356973, 514532531, 911169029, 6916896, 782796, 910119724, 942560918, 62371227, 773940129, 523667340, 669757203, 42568262, 891666384, 467022993, 486796667, 727294526, 413613585, 787453753, 599953158, 417187968, 359849625, 117069116, 879478181, 12380000, 910899870, 838986319, 102687453, 103327364, 376800830, 429223538, 780159138, 706916356, 587575355, 971169352, 36010810, 483798044, 344462034, 787276711, 359714668, 737585540, 514856433, 506547585, 7966248, 935961, 931790046, 725219981, 437246235, 737823353, 539625329, 101294921, 998345360, 158678756, 14552916, 434899855, 58679632, 771567929, 908041362, 370603042, 958461645, 473954165, 329932246, 645017860, 950250115, 632956030, 39737256, 308287817, 593859369, 848980890, 73354610, 67983312, 794665532, 744501399, 571146358, 79777328, 768540650, 301591668, 87146707, 749547055, 542914952, 113807115, 981646049, 443442346, 689844336, 226785366, 664441023, 644644459, 65534356, 186334852, 433121661, 818953887, 687026114, 344822747, 464015963, 110899493, 294091084, 65199948, 37449794, 719226153, 501099656, 413337315, 725255533, 799293560, 259962068, 954615054, 373654234, 764439094, 914044890, 22085466, 539035590, 698634111, 313016212, 98993468, 941478268, 955683335, 902077766, 420565422, 767959775, 128648986, 355285226, 534029655, 104714136, 932643222, 778200211, 56428536, 225880543, 792355687, 449940761, 181471652, 529937629, 325235521, 6575392, 94094707, 441392085, 37264955, 911557047, 1, 25, 348, 3496, 28098, 190746, 1130768, 5985744, 28747851, 126764795, 517958180, 975500521, 75313899, 914923483, 611051644, 458281681, 932346365, 712529240, 185024083, 463834094, 950836649, 286357381, 871292163, 434939852, 58330077, 629835295, 27932676, 66354549, 10923173, 590226200, 526183672, 176005584, 809584977, 222348292, 260397896, 396327746, 178971085, 774808076, 78650222, 507195902, 144802453, 299847298, 581537053, 724817078, 350425193, 503589319, 654904119, 595937600, 992781673, 82554146, 868891604, 769490422, 119334199, 287573489, 85347169, 118147346, 949694675, 540939467, 927324362, 545027201, 610310429, 769058023, 21423, 262519735, 786795808, 240407039, 428554518, 447092428, 788617633, 367724192, 374279457, 343082569, 856162651, 150954733, 962857235, 700751807, 895999415, 533537747, 537990547, 268357366, 869434038, 633081543, 603452058, 947934680, 987367826, 743179254, 710352935, 835787228, 706586787, 845202323, 238777269, 405136472, 480736674, 155194042, 871452828, 677921910, 616952227, 984554304, 602482844, 894952109, 161534829, 782737895, 850072208, 670793244, 828100052, 222399146, 284700626, 231919567, 306545173, 673216888, 772842480, 314744315, 347738200, 25002680, 730048408, 649455506, 745857274, 196252843, 529935260, 419302767, 276709210, 732855171, 343508231, 624945362, 861002432, 484757974, 367927715, 209929226, 661865936, 531107025, 413469524, 479519565, 741904536, 610072165, 606639245, 934344602, 716197790, 587584177, 185414563, 306822687, 841034662, 971868532, 919896238, 158358640, 773475266, 936203252, 665923149, 911486615, 197651366, 774528535, 82937079, 883806524, 130206852, 774201811, 995994000, 245370199, 842572718, 793423605, 740588350, 687616120, 657690139, 857790226, 37323118, 88399209, 523321086, 117621631, 71036645, 222192424, 788926021, 202125596, 1, 26, 375, 3896, 32342, 226580, 1385350, 7560544, 37426495, 170077814, 716127109, 814596482, 388283574, 187079164, 480126707, 290089727, 38629756, 54115650, 64891257, 901599546, 718222041, 911275669, 323565019, 817912019, 805459451, 803612364, 201797073, 732830955, 80380678, 23464457, 701195891, 272214917, 913862649, 132026200, 669751010, 759341231, 973676755, 794065196, 967438659, 308299894, 10712690, 949669597, 781686555, 88559004, 727530543, 318751597, 278470531, 434911202, 804701133, 324324750, 981099143, 232682614, 987104568, 776649739, 786487389, 442468777, 569068005, 663709268, 881510700, 203686642, 57967683, 568729400, 236001193, 623959074, 703861418, 908672716, 70204475, 867825588, 827103298, 241630317, 362696969, 415618616, 805038660, 598704556, 10082872, 643477587, 415164213, 703084166, 477367476, 20036406, 629980785, 802614294, 952521645, 17601466, 311433959, 830294700, 548394039, 535645146, 521413012, 929141249, 283365227, 727229980, 443388093, 410708269, 286618040, 319768543, 938841603, 93475597, 394693465, 931196821, 495806189, 902879580, 707905623, 303901454, 576396872, 484544924, 486011674, 564305854, 311518869, 856442237, 372745088, 366968335, 813470622, 720542245, 551543931, 596748971, 778551123, 354920979, 984250497, 691689872, 327423759, 52302396, 920309409, 457393341, 162758194, 401889329, 760192486, 361045291, 58998809, 845800809, 8575285, 649668894, 501939170, 542308042, 574502757, 192463535, 690505425, 204738512, 689813836, 483570629, 525148782, 216925832, 952334594, 68584858, 946061868, 229986068, 113082103, 705545851, 563504064, 430610853, 209937938, 608555345, 578039088, 750439353, 944169681, 417934823, 74422181, 960090808, 568355902, 435674968, 894299009, 15861008, 618713868, 509911155, 168869978, 339481775, 369451744, 600513141, 71634326, 781507214, 857107917, 106564183, 736233715, 362800524, 615467708, 519437498, 342065337, 206666492, 505918934, 308299385, 20927738, 106279730, 457391057, 1, 27, 403, 4325, 37042, 267514, 1685106, 9470830, 48268511, 225792189, 978561725, 958557158, 38052071, 919433401, 254995547, 546697380, 704487939, 32839999, 508901654, 551556389, 663564198, 695178769, 814009554, 547143595, 371559020, 945387943, 670094820, 616330760, 976064124, 607380120, 8699769, 998280938, 580008436, 958036252, 912203574, 544195790, 396609897, 954428754, 708902921, 801338681, 431017191, 381717232, 344144422, 131861617, 874277396, 830300192, 596462835, 318671397, 244894238, 904557382, 834593756, 283869037, 697514761, 969250693, 509524190, 913260759, 384371901, 692021356, 509945770, 32685910, 505430483, 907189201, 193340383, 693205397, 603006308, 305262013, 925218957, 968092842, 27052064, 47727228, 477199307, 293774777, 98292616, 663047137, 995897620, 288543890, 998081856, 524487172, 892499155, 556044593, 972323813, 578208602, 933674462, 509188659, 985492681, 986901126, 628028841, 519717277, 311965185, 897395442, 829761538, 9680527, 161715155, 343759581, 402616197, 861303980, 911400557, 358697993, 515548395, 553147014, 892738525, 205604013, 762111690, 442223169, 7841804, 517369986, 84729818, 152655938, 700957258, 898706126, 75157861, 271201265, 543855670, 440588279, 204308612, 236683234, 208667572, 404506592, 809547310, 853106482, 518815458, 16491026, 491832633, 360120645, 923872102, 602086347, 641452842, 18221609, 229080666, 428455406, 569262655, 856993308, 230900297, 490066099, 367669571, 96292417, 52365382, 469261002, 374633464, 900617667, 182287939, 49700390, 796588976, 949085023, 222503562, 658471212, 94278399, 66098044, 72459139, 603916441, 257635815, 234793049, 951525459, 549173423, 938321308, 13662267, 288258509, 65326301, 11071916, 364716823, 929353581, 839483911, 199241395, 29486252, 482468148, 829994735, 370892643, 687560607, 531658704, 568187724, 486108828, 475403750, 227529481, 124500798, 228110006, 56292488, 958873404, 963718586, 481659835, 183136868, 593123751, 622015148, 469053734, 211587807, 928091671, 481375722, 612130911, 134707706, 334981252, 784422204, 712253942, 698883770, 390222722, 25478322, 28778175, 349558455, 616616543, 1, 28, 432, 4784, 42229, 314064, 2036108, 11772944, 61710789, 296841956, 322742117, 501368237, 486564198, 208215103, 787564548, 236938424, 301578523, 866593178, 461034739, 153403692, 741061604, 268366308, 41671958, 999969805, 820629183, 540097933, 348143198, 290585123, 709901036, 830657214, 397773343, 205345230, 80836479, 744283025, 767371096, 13280133, 166091858, 688213267, 405245759, 999129285, 957885801, 125598090, 229197648, 232621259, 771781842, 15692966, 623498734, 209019752, 451480479, 405116698, 905232949, 522429827, 160392239, 911337480, 463779522, 870625842, 997849245, 364479050, 834828, 300785526, 10186705, 265101999, 566806573, 614983712, 685595755, 48653250, 344390997, 673637797, 896886255, 108856368, 31386606, 486989879, 489263782, 517653845, 976993581, 117774221, 829510874, 294191687, 233225993, 831800739, 448583977, 657291524, 649603801, 456575978, 536862581, 855051723, 994222346, 302476269, 502749737, 322446053, 790323255, 357338908, 887312147, 181428924, 536100952, 55330164, 160205355, 190454705, 365581727, 201998030, 826748536, 400273437, 624522779, 849319472, 800147953, 80982274, 447705256, 168185200, 97822479, 309878269, 678607548, 912097410, 927785144, 334246635, 662138658, 715198385, 260363473, 461374975, 89468114, 651175074, 575096135, 130470890, 71518840, 879845193, 486812125, 128678982, 647847215, 49005945, 59417027, 550597313, 85275582, 589669875, 488581288, 579391253, 238935007, 307933774, 801626662, 991248834, 831660242, 2289249, 939337934, 170802252, 112167473, 712496239, 45742853, 482400666, 341362938, 957391891, 147812751, 376451585, 832724562, 418101830, 38563919, 274362964, 819817184, 400041713, 313141267, 806456583, 999307614, 670677205, 585839782, 845991536, 831623045, 109161241, 554327240, 822718306, 173814042, 363700239, 22366070, 479904205, 190929878, 554951008, 774006606, 279182950, 109357938, 401823952, 575672540, 860574847, 593910748, 547825741, 217594637, 989467389, 184852185, 331539318, 325720467, 383229710, 654245987, 146654996, 209385163, 560462909, 965812836, 65583448, 508391947, 709539829, 955465325, 214525022, 394005813, 531700924, 773028650, 417539579, 326670161, 406612199, 165245, 699092510, 550837077, 14964582, 527720684, 440459594, 268905155, 297293091, 881879628, 1, 29, 462, 5274, 47935, 366779, 2445008, 14530396, 78259797, 386723841, 770080067, 561338901, 331351593, 839635833, 167817400, 497149119, 881282118, 352201610, 471630724, 181160121, 88806794, 987377178, 289689361, 946592969, 656979867, 594487341, 196240769, 948508749, 810784209, 709855728, 576276359, 518417791, 87667236, 667014934, 181628700, 79050911, 337053925, 373883684, 560120551, 458872893, 815731972, 827954345, 771964062, 380463298, 190074568, 335845313, 308369049, 297128477, 730684746, 742600059, 263592454, 96421517, 206168581, 306386280, 238588046, 136275025, 509837233, 285349782, 467079296, 44733505, 132275281, 829959933, 391862643, 62600608, 253168338, 426879146, 365435454, 91732486, 471304236, 543190875, 798110387, 894371900, 696428631, 750022470, 726550236, 936549828, 542410178, 939184541, 791578453, 983635297, 823881369, 150676558, 585328209, 653882077, 963087655, 950795211, 936066317, 71868369, 440124326, 965151462, 175368387, 40663323, 699428294, 108367130, 332044307, 970432796, 572024201, 885659377, 539317691, 132218646, 139253073, 467726930, 45351751, 297376822, 508633325, 703469419, 746467332, 503668629, 112630766, 930570931, 962347630, 576196343, 698904389, 167199167, 333129737, 608922442, 222067115, 688206452, 802821275, 954540394, 911151138, 906746447, 902608727, 890863920, 307268385, 54404696, 104370759, 495676754, 441341576, 829087999, 88911607, 975336543, 381836343, 298727399, 758323163, 709721214, 146811076, 322114121, 909574264, 955852236, 803216000, 511491931, 157225317, 671670053, 367885171, 612666342, 842261160, 508147005, 345029386, 809990068, 981225972, 241279545, 458275632, 172983843, 48836190, 961296645, 538132589, 271432367, 877708377, 386417805, 815731556, 463571419, 404450924, 113136747, 549319603, 219464194, 220054123, 907114544, 328856175, 265047793, 589592614, 328159953, 809008569, 510434161, 420313068, 107873733, 868895119, 895337042, 156863206, 48004547, 666506430, 727609186, 85858741, 59205240, 78940637, 545962715, 139572749, 421355881, 858507471, 952603331, 401020118, 942925111, 296295597, 997986384, 115737481, 677010850, 282276283, 274892540, 163700485, 118592549, 846472792, 136765224, 236032397, 179431589, 539549211, 214067143, 923131121, 999465547, 232088789, 610013691, 896204760, 478686995, 218989077, 91096939, 221616643, 243944261, 454787573, 542927414, 355318220, 147354818, 482630, 675619041, 634351197, 478341164, 574509037, 738721209, 1, 30, 493, 5796, 54193, 426242, 2919073, 17814512, 98499977, 499582398, 346636279, 286311246, 338970899, 482987014, 740494022, 522312682, 389124982, 438269373, 295660905, 384589942, 269003911, 190728878, 21841107, 394443500, 159301748, 885681179, 869073529, 396029106, 969827087, 16747334, 474716791, 259235367, 753984455, 365768194, 423375006, 957390875, 407261764, 592999097, 928039310, 529328158, 133251022, 533719572, 434981329, 779487889, 212784950, 467080112, 287628298, 91658981, 576061624, 322787361, 682746649, 234833733, 676878118, 220869554, 982232103, 879428014, 742840902, 65876039, 230084790, 68776407, 988541480, 113769367, 288661011, 898604342, 790158821, 811679832, 416532461, 643426286, 357304561, 904850873, 143689492, 643378934, 217587561, 816799579, 741653213, 950522177, 519192837, 195766899, 875531753, 913462122, 931740864, 147485151, 73473743, 881407231, 943949423, 19375017, 95185407, 658198820, 654223830, 78841384, 487272636, 810454297, 156111172, 108214345, 594083015, 721613382, 413639222, 199581479, 219296986, 983776208, 50034813, 434669652, 336761553, 553659069, 443256837, 867959007, 649693919, 829394710, 511124003, 801382432, 809258820, 440312724, 549557631, 57091967, 619973166, 38255131, 989252595, 296849831, 126449228, 992478958, 948085171, 398912012, 308493194, 585304989, 581850817, 704472537, 457658359, 706849064, 974235300, 322942033, 801441410, 806760539, 930211369, 674605925, 140615032, 804334982, 654022727, 747554604, 304695097, 670935186, 973200118, 899755340, 43016718, 33443894, 486649937, 183173093, 28680647, 612676891, 17478829, 208078434, 467131016, 651933212, 464433186, 3993644, 959280435, 310671435, 524438940, 540166082, 143663989, 984026973, 596317769, 299039541, 925611762, 115137245, 238184581, 798462400, 902062936, 499673997, 696053154, 121959061, 376644235, 378356623, 996412950, 115590297, 517087995, 817795384, 731733847, 61225249, 930096903, 292653780, 149516053, 503527083, 233497811, 781589564, 87992011, 514696635, 495015483, 151617728, 478098704, 773499685, 621536652, 787266199, 440325002, 249898342, 747360642, 671517137, 216648293, 686506084, 544204132, 949750238, 249236969, 319054830, 756596931, 233403453, 594672369, 158463779, 809106181, 249481644, 610711719, 262167344, 179138909, 270160113, 278492510, 490828032, 946977816, 803242084, 541036271, 624688984, 204404014, 881539240, 779609382, 561095932, 524976628, 888316278, 139701497, 712146362, 413036824, 810411985, 241441787, 247390036, 695355554, 122993697, 227371919, 399947791, 833892197, 899399938, 781528108, 656359733, 551706967, 845829828, 900357325, 1, 31, 525, 6351, 61037, 493071, 3466221, 21705119, 123102861, 640304911, 83941000, 859775332, 485271727, 929183599, 393442380, 976105677, 287805815, 238271867, 74391877, 765979021, 335546599, 709265303, 808915958, 907593582, 463983041, 147572225, 888153362, 391439968, 221443415, 801779213, 245226914, 866175931, 810047153, 267980729, 805674759, 955321032, 906824500, 367243333, 486256638, 145115859, 530769671, 290945081, 932311137, 51068986, 807551107, 185085629, 261181005, 959829857, 118218336, 295880881, 506261294, 848742193, 936582961, 153400705, 578662225, 341741810, 161659811, 816049772, 839223846, 559301757, 400427189, 216771109, 207016492, 505237766, 795055758, 945605740, 555992642, 907845643, 982951177, 401043526, 597396374, 84431994, 362552441, 746539639, 303946121, 357484364, 893505269, 526515449, 560103044, 121894895, 445706213, 592793631, 713670463, 810676671, 143889731, 392244416, 73126772, 488568958, 542583029, 752584772, 7383345, 155007498, 994039957, 804821801, 379264833, 525210782, 239847467, 126254398, 219331239, 753237922, 434345445, 635807399, 872366121, 133933893, 590603804, 32230684, 70841222, 840236255, 909722819, 689521789, 529248821, 178846494, 980363222, 548654005, 434479841, 697553680, 35011089, 544881135, 260563063, 695816358, 44173506, 726085055, 671716390, 781464159, 450226987, 146813053, 877951734, 991641337, 221699230, 419417817, 794832550, 810418558, 969705412, 219055178, 274301546, 503413612, 695160244, 74090275, 26176299, 695070748, 341801549, 897892431, 470380437, 3467372, 448525308, 439337134, 724845391, 9187155, 585558376, 372261444, 277930003, 34819054, 431482585, 279947765, 492267585, 818516372, 484582901, 390623889, 856573701, 179325546, 611189228, 688765384, 847931848, 534263758, 557397045, 116495491, 85868985, 610969731, 478650084, 585159686, 14772190, 776211983, 474268574, 460744792, 134988124, 912707317, 105964987, 809266690, 785401545, 161419686, 653370610, 499797235, 534961655, 323936668, 802659551, 370287438, 326963010, 342959476, 313044094, 148582386, 976795271, 120954501, 724957759, 860215558, 270001726, 640931921, 833230238, 701256342, 242231076, 286286219, 13632467, 253663042, 129411109, 603714672, 564008356, 523901279, 216864213, 524434304, 182659511, 983267072, 644616701, 707181007, 618980658, 405751838, 571460922, 136629759, 744395053, 539608518, 963053644, 97893406, 866038338, 265757870, 944699732, 964525924, 892464175, 168006507, 562926324, 742708490, 132927348, 526909479, 79557205, 129052432, 157042523, 659309142, 834183171, 802572815, 517259737, 256356803, 353227137, 87135975, 224995979, 596580540, 402931204, 515099940, 793833445, 691900231, 589149123, 114327507, 887760880, 389703467, 830251700, 783657579, 433484966, 412892473, 432995349, 911076886, 112628181, 1, 32, 558, 6940, 68502, 567920, 4095058, 26291268, 152836946, 814626856, 19929138, 508014078, 3627542, 383619686, 178749032, 257695016, 714018516, 472708243, 782289684, 785010736, 673452130, 967313791, 416615851, 594708501, 823838568, 374885539, 520875465, 462873691, 866641568, 110422771, 371334024, 597629306, 954905318, 192386746, 711820060, 202869372, 886359460, 670157944, 884126969, 502946720, 582271977, 402610790, 343533084, 511648372, 517557636, 170605372, 597697292, 829559995, 983984749, 601678152, 265076525, 200313780, 586898347, 936910249, 473920775, 97417050, 844866738, 973357211, 106398807, 531568235, 220592830, 72245680, 709223174, 966562898, 364453034, 204299565, 516186616, 388239153, 70201813, 72763421, 794896998, 14537122, 759848271, 370782607, 723372604, 610938893, 161728308, 212501210, 376508968, 271352258, 323852567, 552136716, 801650724, 615740271, 208656790, 224034222, 747809272, 617340476, 153891047, 285642015, 901118362, 123777425, 16228193, 623027527, 937436377, 60747289, 714381298, 882770713, 15381170, 999192137, 197256049, 480638655, 953137460, 883599778, 148656904, 722191509, 39402136, 582147050, 757441169, 260428827, 253172482, 508174417, 834955862, 157349819, 261175551, 247577251, 264652493, 595186522, 812752039, 875384578, 747313263, 224431706, 462673707, 39074204, 237357876, 896371707, 361524710, 10299862, 761952483, 924315000, 304463541, 831385606, 228637562, 845205390, 599099308, 177524018, 209006125, 256908838, 355221513, 792061054, 713446694, 397486564, 756107839, 527866716, 337624854, 575430320, 456754471, 959728018, 921786900, 102983773, 936936381, 473475121, 131588049, 189268154, 863126769, 700571091, 871530822, 832046604, 609629520, 45186676, 853387560, 464311797, 368430192, 151536782, 691919878, 176735598, 972465597, 804610607, 50289062, 722819065, 20410813, 11987321, 648373171, 889715409, 778512390, 280809979, 767453391, 155472064, 275305459, 296611231, 377220752, 229158487, 259857310, 987705391, 873889855, 448418244, 657467052, 301028637, 400332864, 304525446, 853531448, 201469133, 757430782, 288842043, 292821474, 389580374, 148645279, 450672899, 404696472, 399758661, 549392647, 972607841, 459482261, 344863732, 405989209, 14412475, 913865943, 988039851, 302203080, 293916756, 28383491, 502818531, 791480646, 619991127, 151573496, 311251301, 362738947, 457688580, 884177111, 390413172, 889218635, 530910268, 818241216, 542232757, 765042883, 885001834, 10229128, 574524301, 836418812, 984923781, 235783687, 868003012, 379478756, 832878398, 751487743, 496700139, 587857943, 624473538, 510088706, 778144708, 214176553, 953029206, 646822434, 252787767, 281229254, 401166205, 434753895, 343430684, 941989547, 465870277, 861407908, 387687010, 216509894, 375279811, 453878600, 982073623, 677731113, 95924240, 198468867, 861679672, 204003039, 472066136, 228890861, 880462406, 133638984, 924365283, 274136081, 742318625, 898640542, 85174164, 775817726, 982947180, 716729952, 1, 33, 592, 7564, 76624, 651480, 4814916, 31671996, 188578368, 29248753, 200002145, 508415428, 442411092, 823607844, 339155380, 84465338, 814093820, 347929398, 722645092, 146033429, 312847170, 460125097, 915837300, 530134554, 683613860, 22911398, 950166343, 297700883, 874171812, 779302544, 705201416, 91735442, 764568060, 448540109, 794383951, 50664826, 501387621, 764478731, 392332791, 697065547, 136584719, 904822171, 811342153, 498086442, 66346910, 903864157, 648069920, 294527566, 68277872, 192952288, 465503414, 89641650, 342876181, 975687654, 849073744, 732768838, 299144725, 960087859, 432060633, 521050995, 669642411, 783220798, 964761936, 888496451, 578822675, 774117896, 595815330, 556187991, 328078421, 497539038, 461150544, 593197759, 454579240, 228665398, 675695769, 189021504, 506127036, 683711210, 767254008, 372876392, 950363733, 781425867, 518441353, 618578159, 210702480, 146366158, 211092828, 25645664, 252569415, 768287264, 315751220, 46304131, 875313001, 63062094, 41563387, 521548621, 882111752, 325592507, 674715724, 754661696, 386558110, 154963091, 238088464, 48050421, 639662963, 70331570, 315682289, 290604457, 553625701, 114470501, 286499320, 302628334, 934963054, 90280656, 946037777, 701374947, 21339121, 663053978, 944685826, 452543047, 117230904, 560747251, 199227363, 16627409, 318622953, 147892287, 924956445, 813803967, 785002825, 524657750, 94619872, 228326183, 399365341, 370689535, 675442405, 908504726, 873312142, 624281896, 910865167, 214431914, 356568789, 649815619, 48684312, 203060656, 723151845, 388405201, 798060040, 729614446, 977682164, 533436928, 146813819, 149571082, 895803037, 777214043, 552248021, 204656845, 982800841, 733286978, 63964308, 481147156, 389291330, 76639625, 311176854, 441157810, 671041225, 83215916, 462900391, 792922861, 933493638, 911064426, 640299582, 658369868, 816565473, 95242536, 385493380, 848295064, 737403618, 437312030, 117969370, 718173112, 995019578, 309321859, 756181744, 40101942, 426476878, 702396178, 795715493, 835764511, 743326504, 209546865, 430615231, 826070511, 334341237, 118979238, 371120144, 839568659, 676120384, 72519, 845333099, 357629799, 910834209, 593346831, 104377605, 380654497, 634970517, 115890735, 793059350, 887063630, 651636452, 507749972, 783577804, 143656503, 242083869, 911105370, 970085702, 524972130, 465698950, 325374351, 536364599, 196104291, 139239152, 633851401, 256158579, 919175466, 894613648, 315818683, 5141779, 876022828, 934709255, 681050535, 191918360, 662583345, 207316521, 848780031, 272975543, 702356884, 769886013, 961041057, 6500208, 70262300, 494310602, 739703998, 384177576, 343193798, 693062586, 969762392, 66952659, 685150241, 630304511, 413041585, 515441116, 191001103, 912006289, 473846745, 605301455, 795067847, 856671001, 508821454, 735406667, 258084054, 117733205, 780290039, 23367661, 593944851, 692132515, 4650353, 187487602, 151055135, 898863554, 673507355, 215091232, 603704193, 594167428, 682519378, 496434131, 965159536, 430378180, 248402836, 470772870, 307340881, 347656961, 749714755, 122062081, 558277910, 169666679, 941915597, 277380477, 270070849, 652088255, 549544085, 1, 34, 627, 8224, 85440, 744480, 5635892, 37957128, 231322416, 291965329, 678229698, 199102832, 733159273, 432255582, 825398987, 945721657, 530531857, 605903605, 198451639, 405128341, 881104650, 95712824, 87475937, 88052462, 854657880, 671362129, 345256719, 279913923, 405600244, 791623773, 184158289, 548244621, 559931899, 811302745, 822463013, 829884052, 612803610, 114370483, 717655175, 250670751, 158660853, 996989593, 922821653, 403693850, 640224917, 726696528, 558324649, 504260316, 457498775, 235424755, 214797729, 595578763, 703649058, 668639597, 273743575, 830864733, 8621856, 152359528, 351252345, 54682531, 631863641, 533130514, 548187372, 212107229, 690348600, 269650465, 644636821, 588449397, 716956418, 569059993, 571818753, 620732748, 238441683, 628780105, 73251606, 77232245, 265685085, 860541096, 181038883, 995121568, 787161997, 984175916, 994855981, 70309595, 279951259, 412871815, 881913054, 268261177, 575207129, 196951994, 610045829, 705950877, 200402175, 179100085, 912730914, 795237101, 264189519, 756871237, 840795855, 477498958, 568161700, 101820158, 478938140, 546807900, 824972458, 320572966, 375535061, 712736750, 146215080, 296045377, 892271196, 198915619, 973312163, 292266224, 766955048, 774760742, 724672108, 189810671, 590576941, 955913056, 705860403, 956268133, 120026477, 977289531, 897970234, 594373646, 802624855, 16139526, 294245189, 661099173, 505327457, 687552139, 570417673, 288750674, 928298666, 124243321, 103493234, 782666425, 810561902, 479140046, 567654010, 66398299, 87173858, 171094018, 401077961, 201022453, 649177770, 751032860, 458665510, 583069945, 3741921, 644139368, 777863779, 427938859, 574083500, 968708036, 5259009, 14753514, 566158894, 428971413, 29779639, 601893398, 934948155, 463945886, 442386091, 787098075, 294593703, 467511028, 998601384, 749411810, 495421040, 283658473, 287441865, 687819162, 964614928, 353638623, 648210867, 238886215, 893364457, 158958124, 29345292, 800368429, 595552294, 572640574, 913495958, 705720935, 850127566, 83220185, 799386246, 848828465, 335228800, 498492912, 819731260, 972790229, 191002130, 289923062, 997108332, 479589354, 13686350, 377632380, 915241611, 38445376, 115515812, 312111610, 862313776, 36444206, 491509332, 899038496, 494299749, 577210085, 925017398, 377889538, 129014425, 544007299, 134491550, 77644047, 150186363, 549177782, 243194000, 889811949, 476414356, 302027816, 934223010, 116351600, 936035078, 728736728, 99057293, 233685532, 715949090, 484999785, 527817757, 40017975, 403976200, 963752121, 230480821, 165554215, 501580240, 480519751, 374582722, 588438105, 13652788, 835399525, 909982574, 63720437, 165170490, 768431894, 385829327, 268804006, 950180874, 398363435, 512876602, 149304949, 858796870, 305796565, 80654592, 209088881, 365995652, 741417209, 580938286, 849913699, 209592153, 430983500, 292682916, 89781822, 346251985, 899920810, 490814818, 319818650, 865676138, 199552930, 49606030, 396988194, 289382805, 394082926, 680976370, 125444750, 312554820, 11884810, 730982055, 36906819, 144996838, 532313029, 339360681, 509568859, 763509787, 79118993, 930179491, 756170211, 627420026, 161269793, 542072728, 498021200, 392693531, 523036960, 919765468, 367278574, 755839168, 466305341, 613534367, 534169086, 166110829, 107021592, 280650539, 268761091, 590645300, 269909358, 234042842, 1, 35, 663, 8921, 94988, 847688, 6568888, 45268120, 282195928, 611807809, 518705216, 990050297, 271051698, 122408000, 405189613, 94926808, 864141322, 53735275, 24011733, 736554738, 929218491, 904644261, 780020466, 504939462, 734736582, 905177688, 612557341, 964587741, 714487014, 841745335, 939266470, 221175663, 553510265, 427922711, 816845808, 551876447, 104782423, 432788437, 75343637, 98990584, 780296494, 401590023, 184896774, 39759619, 46187357, 134251301, 342702573, 517720, 358976055, 583636644, 962541900, 167548822, 161325057, 550357824, 277594189, 165080443, 231182951, 735855208, 908711807, 571176463, 42569340, 237272417, 790920442, 624258522, 720842250, 768667158, 451444080, 122083868, 366641147, 308868590, 806102171, 616667978, 212552319, 508058403, 321794596, 570313528, 460066496, 737582233, 710064955, 691296552, 63281621, 675218599, 955697061, 110510427, 512018248, 153536802, 745040214, 175960352, 594730127, 864516601, 686994354, 671193730, 758082482, 651219990, 268055455, 209604272, 794711886, 922988292, 233697499, 855180879, 757331520, 952855529, 712373324, 501054908, 610479660, 988305583, 359797155, 981016202, 392046260, 222705767, 339379031, 255395660, 760704862, 824907580, 377018926, 100950434, 568292199, 345612839, 702169410, 76425882, 316244660, 633878521, 345805531, 43908232, 498746978, 171201976, 618174067, 828038701, 451921110, 452033897, 911744318, 64098066, 83924105, 595571257, 147937863, 948006101, 514496555, 77289879, 282007238, 421799065, 804334778, 765393189, 193008022, 263503242, 355816072, 278012511, 227861525, 902054870, 618486736, 979710805, 971590402, 61042704, 664850817, 113175896, 488535341, 617582794, 612947413, 45804546, 259073867, 263038734, 265569066, 162645795, 60875191, 359494871, 979749311, 139358127, 29529290, 309151363, 279422923, 345089768, 87598058, 700337527, 479652910, 994907927, 933976635, 324751070, 167729179, 810904540, 230096199, 33195878, 559883815, 674302503, 158162721, 997344757, 974400760, 476723636, 933671908, 372458552, 487353300, 603836216, 903251923, 461631785, 620155186, 664707969, 139328434, 135802315, 547850780, 544085832, 243757336, 714792500, 277247444, 736724545, 7257213, 104433298, 33077964, 133546300, 658470668, 407613385, 15549086, 409602732, 220607605, 154437658, 434924060, 212726357, 432662346, 953726155, 55947205, 221865215, 896738564, 702917595, 219549259, 784888336, 998968443, 737927890, 111474776, 479544893, 204531672, 722344756, 339644359, 296335713, 172390948, 145219000, 740849986, 175518952, 876047366, 775536223, 909308844, 333180421, 96764559, 528034987, 396799645, 413114766, 622993858, 563074288, 710510893, 900874806, 315196225, 993816000, 623166550, 642968249, 328645521, 844280596, 556521945, 272458659, 580772239, 284457451, 186994948, 909094031, 935768265, 319893231, 114481887, 109302906, 586737223, 466388545, 717893242, 342269015, 164207650, 394855609, 330099455, 836592042, 939058426, 541984626, 852636994, 524042858, 358495217, 921118657, 464191254, 284341637, 363378706, 679058686, 917272314, 562488937, 105215359, 614330571, 404183151, 365378837, 280141835, 594380252, 79371576, 739360814, 210010442, 10232401, 449147207, 97531383, 696215921, 900156881, 51327507, 224992261, 946786023, 685932368, 729503576, 741723150, 479111191, 872812474, 454570174, 217639787, 553029674, 745481673, 194164134, 241094015, 672191097, 520725696, 177728245, 485102929, 511421076, 349030122, 157631252, 431267952, 813510823, 604978728, 799539100, 871169236, 265066919, 191499414, 52282294, 1, 36, 700, 9656, 105307, 961912, 7625652, 53738944, 342470612, 999200441, 797070294, 375863958, 9523173, 166271514, 481765400, 879554808, 535680694, 467340394, 413500052, 692064693, 580959888, 369347871, 169821810, 621921924, 137911737, 940784828, 741570244, 905517670, 551817302, 657369119, 721648393, 536831850, 500879720, 726253305, 296162041, 891225164, 880747817, 182180719, 544050763, 654393489, 357200480, 356889637, 635049309, 374948412, 486169649, 407475615, 51228607, 535369936, 325305756, 74215114, 944988254, 919680639, 647644667, 526651696, 763479161, 278201627, 103508412, 387580497, 561661113, 38190290, 310583115, 569811056, 351262691, 985051203, 403138813, 643132429, 289980808, 570569544, 550559442, 934893929, 352045239, 810200946, 61218795, 42358563, 89293505, 506603831, 400595820, 117891860, 469015294, 166372283, 320554017, 155147268, 955469333, 896730515, 826039051, 931193995, 36098122, 893366407, 522834450, 917130400, 759016216, 23584371, 48884561, 844352920, 604253909, 886656394, 548946691, 688504947, 972899398, 721435398, 409845929, 399680456, 284950632, 796741351, 217452678, 611033399, 592790059, 219084711, 504058472, 277505825, 120276345, 694287126, 35416589, 305976723, 447309020, 969824889, 565684997, 62139306, 857693940, 901163636, 262850397, 927594387, 721909425, 958991660, 471789360, 260033992, 544270783, 877013007, 153311613, 85679796, 660447085, 213261352, 954007371, 8266647, 75417194, 28241545, 733410215, 579803150, 41901427, 876245480, 900022334, 813145019, 668096269, 73987267, 175135030, 724217744, 139403302, 77167168, 775504145, 397863476, 816272710, 221129133, 242347768, 885383757, 728565085, 947647994, 605379205, 598139075, 269419404, 178994132, 603450690, 652850980, 19254430, 182635911, 57268581, 239936865, 878358438, 515315850, 141611162, 665647032, 700517198, 807335907, 965806030, 897617342, 773532343, 924389029, 419741954, 420757062, 581633294, 179995348, 34733596, 923518220, 731757774, 573741822, 531242380, 813544540, 336821038, 442738016, 551572674, 470067223, 638102335, 989538200, 956007535, 613954394, 401563904, 103519975, 569290006, 144046622, 689996849, 638589501, 358099514, 725282594, 691632053, 702244532, 284031792, 473014945, 465414316, 116886234, 142777936, 342518645, 138051544, 347505254, 57716395, 939744642, 114873890, 359397343, 671360195, 724489266, 683013222, 345781236, 550104449, 877003874, 63443231, 224660360, 658626409, 133687251, 933261032, 273131705, 48202694, 144323990, 559827621, 779609382, 930553156, 35267489, 493151974, 645090534, 517431516, 368634145, 540405134, 215255527, 144656993, 549192120, 659960465, 217236722, 742258783, 538378955, 211409043, 760044403, 389330065, 692548510, 583181570, 627949137, 829194932, 234693932, 651493437, 707321269, 828284674, 652751037, 873736576, 267300299, 729754896, 429920674, 875733754, 60888792, 225478637, 39002446, 407176220, 761384762, 131879783, 661443680, 51638267, 568172852, 186052558, 637968267, 556455031, 313451921, 238551452, 644714578, 449541818, 640800540, 923965193, 38909678, 41940756, 338485997, 888949941, 526610135, 48150535, 778944981, 480892059, 874500608, 900322190, 973783674, 468787609, 618167632, 913754856, 327797543, 845404908, 752246622, 831422464, 484541178, 501948673, 647306990, 882577308, 771072569, 171273117, 620085552, 385025714, 126556571, 472404266, 664907284, 284895728, 860747643, 285481155, 480968189, 426457284, 579997870, 253315436, 264967992, 325506073, 407074927, 289125366, 710111895, 168902913, 39893459, 264014099, 335462311, 284068808, 624620216, 265346008, 330183605, 301153063, 136165951, 223572391, 416076696, 791322793, 440956632, 812128221, 56870528, 529001955, 157225171, 153110824, 659760559, 934444871, 1, 37, 738, 10430, 116437, 1088001, 8818820, 63517016, 413577336, 466132154, 602224077, 950429493, 571044537, 948550192, 759622519, 360792951, 40404471, 549575252, 331339348, 353289303, 642561133, 959520386, 811439523, 113998222, 306747368, 686402540, 608623079, 625536502, 102898449, 513583096, 310389938, 861964034, 144673299, 459932354, 368865341, 656127608, 909171212, 807159815, 446679967, 582385365, 827063804, 980667706, 264330272, 600794253, 740948802, 906942889, 945728377, 18846332, 985664112, 7701519, 115050801, 870345183, 606442987, 443069595, 817056595, 621418778, 690512206, 255049968, 161633922, 402904753, 372549674, 317848199, 779510849, 454579621, 366999138, 955388684, 940196190, 710141532, 289889641, 400266971, 473006189, 518001144, 203532149, 277752196, 73653399, 957077834, 580796815, 797359407, 33679102, 974181950, 229170666, 221016673, 753153481, 718492334, 480056326, 134801483, 829292600, 87160542, 624566954, 157188714, 912350324, 248797376, 864861712, 311625650, 564724833, 638897879, 211767349, 670618766, 182357348, 406247054, 335828971, 235855014, 766599169, 873180801, 943988159, 797515463, 949064434, 37355164, 366387587, 992037332, 39085136, 457008562, 710738441, 147115812, 245127944, 221285308, 44913339, 750687382, 166494925, 487773254, 2533400, 294773545, 964749926, 838352064, 354747747, 983055334, 906311260, 773970452, 136280712, 732037766, 304757958, 868694356, 9717274, 686595153, 845171773, 715645486, 457517675, 868876321, 257821804, 398717354, 952878758, 459394839, 735151005, 982831573, 597714383, 483469574, 396276440, 147004054, 275175512, 449695021, 280047682, 322443740, 657859781, 236891682, 338855034, 771308208, 208042945, 611383416, 470020781, 959351211, 871193372, 314812327, 417008584, 157794928, 30304137, 772193806, 92880268, 735754383, 725090032, 678769251, 695572650, 713627047, 220917673, 996272940, 711499227, 615337951, 732510553, 265860373, 10346269, 946167168, 327969286, 691646116, 588894836, 556718107, 891256057, 29035235, 193826291, 413628097, 951441661, 812044940, 432676044, 866499015, 139084375, 351784477, 900166473, 781089061, 914118385, 818686834, 857340116, 329139077, 237478891, 284468211, 215304591, 458481845, 227432873, 865995208, 554027168, 463893384, 221077016, 374577314, 119759917, 360383422, 704486222, 404678036, 137104816, 809074680, 755219457, 826569646, 867839827, 768754773, 89100960, 257194726, 724398193, 973188469, 858913715, 18463743, 680309520, 450458743, 140048366, 764912130, 371007014, 456635116, 735728421, 778688084, 152973997, 434969799, 574794869, 212648988, 728361716, 542931287, 302379989, 751579729, 92390154, 220181191, 407743441, 315151252, 520426045, 407908622, 679231575, 395003916, 794034847, 347654216, 68808817, 829211530, 81601558, 162714123, 30761100, 394951130, 268715057, 283612447, 241955302, 623210420, 275963878, 159211117, 252162685, 595441437, 529655660, 437222092, 841111836, 179960886, 135660761, 917237477, 768051317, 444580903, 506791801, 487181239, 875489229, 680194597, 205928376, 680445786, 683783933, 969592088, 132367844, 396994570, 832926454, 630581401, 505495558, 385734337, 641541057, 95095471, 989574773, 911275608, 518514268, 282262989, 419271827, 469001628, 420271862, 947083037, 407529572, 59976989, 434008630, 863717239, 945875935, 75676474, 215313835, 250745830, 87811894, 264747800, 37018493, 98597371, 710706515, 142785594, 391940962, 336466122, 341268838, 21508490, 413865364, 232101532, 92701632, 8053527, 412757119, 757312194, 403681966, 949009531, 880975038, 37050684, 272465075, 678404684, 193438246, 672480427, 700064004, 142628578, 802581416, 279140871, 973655892, 800905741, 598005728, 935768930, 668573394, 207197197, 649003003, 270174246, 76144766, 315632510, 875459369, 359185050, 528086919, 473525359, 758981160, 249109513, 189948776, 344668617, 795917722, 549344159, 348920520, 486734532, 302843834, 285724416, 810790165, 350603652, 574459989, 873908008, 1, 38, 777, 11244, 128419, 1226846, 10161959, 74764168, 497121432, 26344483, 38234873, 423642505, 376339808, 863392989, 917340710, 353019266, 355701734, 828153534, 204362640, 374924405, 607928554, 963790885, 940721850, 687219775, 764705852, 876861874, 763291630, 981930457, 551085656, 980270580, 505906881, 983294521, 135354674, 135665519, 630173290, 212355830, 143623144, 227056594, 817242891, 163435465, 418550307, 731605596, 289566443, 285968813, 433396374, 290335437, 260134359, 257166798, 296375223, 99595679, 459082068, 507135523, 972388714, 133158519, 975205558, 982374421, 644050428, 996778111, 162109063, 746906113, 514292299, 926426755, 356009260, 196659267, 409916170, 325494529, 655002543, 558511285, 36446396, 471095084, 174722764, 671116976, 160891233, 868903396, 304037581, 23612943, 337881011, 234387037, 370561646, 356075504, 698718914, 535181667, 514726084, 815242029, 608023573, 448544035, 835833664, 991058290, 399256230, 20531824, 669361826, 539724566, 760387110, 830813942, 547045707, 178050500, 929198630, 6813905, 110412371, 858816899, 809729618, 833864785, 232951975, 485491061, 613385270, 553071180, 627954610, 952757220, 692906182, 748961577, 662247263, 52513186, 149763764, 145530822, 33882391, 453364543, 997405166, 992558694, 759602854, 84367345, 100239977, 854081961, 858205595, 486024240, 91555639, 177882871, 949083392, 519037398, 556513157, 228484413, 492836072, 589348909, 196163508, 266626335, 11245627, 157404436, 270481031, 638406640, 490889097, 527976504, 370488458, 823400678, 322868722, 206357234, 647142926, 768625346, 265191551, 148038615, 363341916, 267722164, 893118504, 738977503, 565582757, 762106365, 849369394, 766495732, 13155357, 515888816, 523640060, 647203814, 437352666, 546684558, 961386555, 7614498, 893885274, 936701598, 428062192, 113231261, 402917050, 409965843, 165984892, 799921270, 659405770, 509144023, 774701607, 842603658, 487390464, 251731862, 581859608, 922860080, 258383681, 201597752, 292594441, 460903867, 638298912, 848020590, 765105850, 965506327, 844776867, 575276415, 85481014, 653985938, 197424999, 197600210, 989591463, 112466859, 918937916, 878289962, 30252094, 561367106, 701604983, 794157139, 205106586, 358551581, 218730442, 820317821, 718077344, 742273426, 343977802, 723940137, 91227055, 889419899, 835334285, 445942872, 874169472, 806494972, 841559090, 34902341, 936247116, 742348345, 932764662, 776531786, 136341990, 609226011, 962126351, 692609037, 492230872, 512261831, 61424189, 202712100, 557188069, 23267751, 10862209, 780311892, 698216821, 610626474, 445698906, 548927052, 791636623, 278469086, 802570473, 843652647, 214889050, 950325814, 545811188, 732525066, 799299048, 547938769, 119233118, 836166054, 515368215, 821018309, 703809789, 385697728, 474302192, 326687407, 701322950, 753939342, 860741461, 608860184, 481069405, 497217661, 107822505, 538149776, 65872865, 267685484, 630211463, 833714775, 127007356, 988488267, 704390393, 326686679, 330510067, 968474337, 860095258, 865223840, 3530159, 602833824, 943838253, 510792598, 862215682, 804647558, 57277705, 379631476, 611335785, 827032941, 500396827, 166974973, 950996383, 97277257, 336237474, 527425945, 836169765, 13569792, 45600126, 103702022, 589110361, 158793934, 917834123, 750227633, 450511448, 228174293, 380815071, 984828008, 35225572, 19924799, 316530723, 169463852, 11894443, 83625994, 27918722, 725825514, 510537357, 901592447, 560692763, 386943274, 409576331, 409681305, 19743037, 901841314, 504205848, 287987501, 95070522, 999713439, 52172335, 458657276, 716446234, 960325619, 967217606, 29400294, 323715881, 571473809, 542099425, 838958945, 826022366, 215456133, 111542899, 27057122, 264098733, 414451664, 367598279, 660361161, 317432327, 788309656, 482969647, 453723335, 307123116, 46250346, 156036134, 550671015, 501877998, 918162544, 672414507, 744250791, 519150731, 449335541, 717241257, 798831268, 772517138, 286300330, 910111510, 66350225, 850058429, 996528049, 454249733, 463645138, 33673728, 195487971, 700828817, 25012182, 447505308, 968790402, 312778627, 684898658, 698549052, 965513947, 825161447, 410399245, 428579579, 669192144, 82412074, 1, 39, 817, 12099, 141295, 1379381, 11669611, 87657665, 594899060, 695536795, 226472285, 640458905, 794561570, 378189352, 472728269, 218438573, 56516519, 255055733, 845027144, 588332091, 652544873, 575593478, 251899261, 421780632, 446749115, 397384403, 967249876, 562965804, 307548860, 910064219, 267557957, 532097834, 694036707, 378870548, 124206593, 109699395, 5415029, 722948552, 875697847, 694452268, 7553293, 132421363, 106964105, 391245927, 870340375, 243365738, 69805673, 199865008, 75486973, 171179760, 109991897, 220793643, 513746719, 106419838, 540171765, 580499245, 759007158, 982900537, 645687882, 590392656, 601803737, 221575615, 697448067, 153409333, 368742411, 593478736, 779784392, 983542304, 533669091, 167997680, 729893362, 841704349, 760614624, 47743042, 998724205, 972938209, 77600320, 536850090, 695359058, 769331095, 966134679, 528777379, 695035445, 387545073, 911151592, 242062595, 521446824, 889535341, 920252167, 112865832, 806555197, 118151259, 625842139, 701618487, 790273468, 694977537, 572862214, 473466414, 246109368, 48621359, 353657541, 554932622, 499105369, 867797665, 487345603, 842033962, 519557065, 245850790, 335288378, 782811146, 892240358, 338051309, 826545456, 41171254, 334148733, 152569170, 144665017, 941279118, 897754414, 89241104, 416864510, 41530804, 299074740, 73588196, 959211062, 109470038, 500259918, 366443802, 403320596, 183957534, 992196343, 652194487, 652679636, 980112362, 896443763, 694053263, 85474084, 793481845, 36502549, 113761902, 13660255, 295744749, 768030597, 559676644, 267907464, 329732897, 34721556, 481917917, 470669881, 496023609, 35319413, 426881953, 436183525, 539581676, 797395436, 949513087, 636400441, 684066319, 283217124, 456809507, 742722246, 708837224, 1825110, 845476655, 721485134, 509524702, 571748192, 313097600, 164720049, 83489702, 463694600, 122519767, 438333196, 350973050, 742760174, 292313656, 699166885, 733491013, 480543050, 245749577, 741817620, 207993307, 244579067, 622422144, 604751887, 899189402, 151409381, 217727618, 880477312, 214663719, 394263729, 196688383, 548030201, 726215545, 464673145, 261250632, 625458514, 838784252, 982491280, 700533618, 585918514, 160625577, 639912412, 329107337, 639996475, 820595096, 822718095, 278815123, 496262265, 918547360, 8027724, 726754416, 823448457, 260321413, 863184482, 650858805, 276099402, 685460415, 954079520, 733965175, 676833996, 368637623, 143549481, 304621819, 472579474, 749596748, 116386311, 410243381, 633945382, 411647917, 177570608, 616578162, 767744928, 61290651, 523112125, 276619822, 15151789, 253528389, 167816966, 891846580, 541892511, 341041750, 391023167, 293092921, 243156326, 622723871, 473135257, 726189187, 379573236, 555335821, 257038714, 482079083, 723871307, 606515981, 65251208, 632383753, 147352575, 594192641, 924833549, 483314326, 808069004, 770319259, 427864560, 25642674, 464671587, 569308215, 637300329, 923466624, 23057035, 86870702, 983746124, 846059215, 574808201, 554549209, 446310553, 959681948, 778636627, 211592095, 516682914, 291911580, 587928798, 427680003, 894209596, 866648165, 679666232, 460484096, 854394115, 982195268, 822495481, 835383529, 431162040, 830468499, 195346596, 57036658, 866149457, 860543178, 818146210, 279107618, 892401239, 225036974, 868558986, 685134666, 744469605, 156127522, 187537334, 788919638, 909025900, 672187019, 217419201, 384265406, 616374282, 378322214, 141913342, 501653295, 461070473, 25985020, 589549638, 109433868, 888240019, 931367280, 762349235, 234613827, 765084315, 611038359, 758764450, 286873014, 382512476, 382119459, 20294058, 943700532, 211933192, 58390954, 180966724, 929698288, 805610393, 509211182, 866583662, 775212548, 88368846, 726939816, 185342247, 229877142, 705155204, 200856219, 36832958, 610458570, 660966337, 749737121, 592806565, 894272325, 480779946, 649154472, 88597955, 74084666, 744113332, 528684751, 282107891, 100372245, 756922141, 58776739, 981772435, 924634098, 951039927, 397719622, 577729727, 762973087, 736969640, 674672356, 297937804, 986319572, 149411109, 496025335, 118765897, 173573997, 13186371, 696131467, 139811703, 497652080, 238358226, 252091863, 126575962, 416549513, 112043953, 769546766, 210139961, 218718185, 975953506, 930028805, 845629302, 57030776, 852433935, 836915594, 400219298, 622051773, 829969111, 114603161, 10751254, 909008878, 579282117, 214070865, 563200757, 1, 40, 858, 12996, 155108, 1546584, 13357338, 102391268, 708914679, 491589996, 307979410, 602522471, 317222127, 290284759, 54099411, 989042041, 349750818, 106531062, 706143382, 63807262, 819412921, 144007031, 937903432, 671633208, 144280187, 535961584, 391683158, 665684992, 173615217, 173957993, 353557533, 689224661, 70346145, 249590014, 418977958, 826283746, 394602103, 916349862, 513826761, 491750575, 183159109, 757685121, 418341803, 274891227, 642914114, 790796259, 588464975, 740365449, 551222753, 10565934, 35820801, 515689568, 211177017, 828019707, 68961130, 155306993, 295844962, 698696703, 264483577, 967049520, 615265667, 559761896, 719262960, 509462378, 575657367, 591920899, 676732702, 723371825, 327050158, 311506131, 94078284, 608080285, 992236405, 137506625, 399044419, 458634324, 553334522, 801149022, 685520978, 446537546, 993927587, 293142441, 349812890, 364132070, 129851348, 857298051, 877404263, 877505804, 63808796, 43779853, 597054006, 757518688, 847719064, 814336009, 295491019, 566317327, 427355879, 99632937, 271930495, 211594531, 907085661, 370381473, 40651392, 893659649, 363630034, 486697292, 957988008, 762036357, 927839193, 855832860, 336383816, 307639758, 266751066, 682795763, 757933830, 702637096, 416587519, 241670221, 803239702, 991067388, 753770489, 69318095, 379601638, 829408102, 918333643, 833524181, 647446668, 999853061, 600717076, 736359930, 166694847, 912637361, 883248816, 334184966, 360770954, 907814459, 571070899, 760625736, 543003305, 12232839, 27415041, 235755079, 155935992, 895456358, 299525687, 387663753, 430722193, 845849975, 389897647, 157165043, 232374231, 709459451, 819494807, 873294798, 982307907, 723241456, 529916420, 190269000, 832006535, 157577121, 119818595, 751958343, 818604698, 923214476, 455357809, 664208514, 204222119, 358021985, 507909159, 532713722, 447934290, 550255949, 9030523, 204809569, 704696131, 798537153, 779574805, 146334295, 422444856, 763243391, 968318292, 409596303, 730176788, 661449533, 145680243, 291092743, 406566554, 840725280, 859336604, 385485264, 540592314, 491573347, 430591599, 799102625, 349645352, 953856191, 685505744, 968883032, 548153198, 991972402, 298640488, 335784052, 560792641, 200482497, 534424478, 835919822, 256133832, 789502694, 815463653, 367192054, 711296060, 505894941, 749371649, 586599852, 478956964, 771301542, 936596369, 641013477, 895880622, 275251735, 709512313, 675062513, 900057226, 864601515, 604121575, 213439255, 718556713, 352300658, 293209273, 62461535, 212741657, 925233457, 601757735, 357273411, 900952265, 337965737, 654516053, 138964736, 683012438, 388413281, 151113816, 328964247, 191920444, 84786019, 179152386, 346561188, 643354711, 718267295, 169193229, 252223726, 887596939, 657097686, 142103925, 40078284, 150004901, 459569297, 459199105, 789641065, 6481222, 858687076, 375816137, 147145108, 520309635, 748217920, 667457550, 716254093, 186260954, 725808394, 626037945, 743543562, 764478177, 601933842, 797462265, 777370200, 654651513, 156072819, 707272486, 178868661, 27986290, 925976600, 457000898, 540704905, 843382395, 769084631, 760118502, 476552208, 749317409, 710185045, 964800796, 516878606, 266237510, 913933501, 813693982, 336046538, 762072594, 997287607, 756174558, 615699332, 325935068, 478725181, 294206110, 71125626, 862744505, 369229533, 687983312, 908265361, 496504119, 960935105, 69879109, 315010091, 778995602, 757128123, 249975621, 699329744, 984761141, 255696873, 966070938, 214893935, 551564463, 316442626, 532269369, 314110968, 128028415, 969165598, 561496103, 817486578, 282697706, 480617072, 509205119, 834540584, 277705122, 660874354, 778117470, 366056531, 831243822, 903068403, 672944646, 441340373, 340680954, 617276976, 849516577, 560088434, 230800586, 10428026, 372559113, 922230949, 889642650, 244184042, 533938488, 841639506, 817920213, 336934324, 44823033, 565545678, 701086145, 241957483, 114182239, 850726147, 526783422, 115816117, 835376982, 659266467, 815849396, 168028335, 255187925, 748491938, 622185783, 663040863, 743392515, 163408177, 383060357, 31556416, 794030948, 934245344, 258437764, 379321408, 40236316, 660469577, 655665845, 690942361, 375378322, 568352979, 602028119, 317437606, 657543398, 100015852, 252684947, 481051042, 964341166, 522946308, 280791483, 467949044, 475945690, 972019230, 462068105, 580258224, 819125286, 65219413, 675919204, 938373431, 246074242, 416112669, 990084376, 992206586, 174382581, 694468435, 670357482, 52707698, 430228891, 194064984, 374269653, 873105421, 89789806, 360326019, 422866288, 247972613, 990139142, 766813630, 25619403, 929658745, 91230876, 1, 41, 900, 13936, 169902, 1729478, 15241768, 119176344, 841399673, 434809990, 446105964, 492649140, 758977149, 206041682, 323715565, 660084286, 595902939, 912996958, 734408694, 639760787, 253066665, 208103163, 518638879, 141246298, 316067064, 932295902, 638352197, 835906694, 518593201, 772224592, 710767801, 155069328, 87760296, 888628863, 85616127, 159719113, 852745152, 116208329, 603162784, 598162586, 214665773, 928212607, 364268988, 422947444, 91651894, 294508512, 306449339, 29129368, 721764444, 23720919, 155935808, 134434641, 906918132, 581645037, 673925534, 656820458, 712140580, 940311261, 639783029, 193680127, 625191701, 485391283, 454129733, 912047676, 531795443, 151893083, 16212124, 506754047, 491882623, 143293012, 25311790, 265858487, 730580376, 281408346, 313354998, 904477185, 246774679, 76212745, 790588368, 952519623, 156839403, 194467618, 872887052, 91963369, 534129628, 238356180, 632320800, 58443419, 722943306, 618550091, 33518175, 519583410, 960079192, 538023159, 305123951, 486152058, 294482726, 518323725, 455607677, 182021187, 748135143, 512410493, 35362801, 719659644, 317014598, 528329960, 583008290, 443175574, 659178079, 174647583, 349497845, 577399146, 818913619, 271472027, 656817275, 494680790, 969710982, 229444476, 267631925, 175671131, 35511369, 58752774, 135202754, 944159958, 464206230, 475819996, 314325811, 754861491, 276808552, 810159244, 91192489, 626570800, 590621471, 514780234, 305537247, 801654104, 149383516, 787215362, 114530579, 859617326, 613074050, 468568467, 919259772, 617744284, 340905322, 985953212, 372028816, 217079653, 938494776, 284906842, 769978385, 515786223, 285120775, 375534381, 675385916, 665832700, 133450834, 3874364, 408375526, 770616302, 276273159, 413928636, 723794836, 198571707, 678091222, 296508406, 529916658, 588863591, 413257244, 498474249, 915935032, 120501359, 836927142, 230121084, 774509032, 870826787, 489996192, 917057075, 196187219, 383821852, 922336284, 22274995, 748507616, 607632780, 183109949, 339998525, 507933598, 698781318, 498085612, 803731847, 473820207, 901546035, 302928184, 865394080, 114078163, 2199878, 779942965, 594445523, 91527221, 272107811, 718335802, 365412741, 52329171, 414520032, 494974650, 300177708, 811610962, 146810674, 337728819, 506402762, 403329973, 694340600, 766854981, 757139989, 188368338, 788752320, 918847437, 928046733, 527551285, 479184799, 517252899, 712149490, 791491255, 238449676, 667119615, 757940899, 445679476, 734062646, 326185889, 40504124, 623294475, 807102585, 697275776, 960233124, 90479243, 277423126, 459856976, 523164613, 283246190, 353589088, 214300387, 783487356, 692462518, 267488040, 851918218, 799153667, 810257248, 109085516, 633189413, 670646041, 913414538, 526057886, 701571781, 823895555, 366072317, 141394361, 832809290, 464577360, 305577012, 512815120, 121404516, 195457318, 321946163, 309097012, 239601477, 94799504, 314416433, 43085740, 639634392, 892727867, 559091131, 668748148, 422889784, 711508368, 676630033, 634668710, 364293294, 844937242, 751071408, 322260215, 891789141, 187899827, 511558264, 521391391, 670781806, 509672700, 51147255, 62331255, 681097643, 668432081, 698715101, 46454740, 726474418, 934462337, 72103891, 408373632, 957100449, 670661469, 786800623, 834620545, 287400489, 490496888, 497846381, 189806313, 912940390, 809020495, 703284720, 835793884, 605744360, 923348658, 214377202, 697918809, 343995053, 445012242, 544883273, 475774494, 73159748, 664916820, 945806189, 388033609, 184443581, 891139166, 132967061, 662232592, 630310273, 296941879, 926467100, 732662520, 755030683, 373067237, 200501225, 132039597, 621016442, 864116597, 199168443, 229224627, 19895297, 392227721, 512572983, 888183257, 954225811, 362992884, 408318299, 664465052, 828120392, 703374891, 61248349, 16358204, 241119413, 30565637, 838212406, 921697699, 543334430, 89858526, 273185879, 355471309, 304528048, 507574008, 476038937, 789196651, 57644735, 932966132, 292240565, 284284800, 198355642, 844613937, 375170024, 881957600, 108981244, 644631978, 730251746, 563646094, 15703371, 891969119, 462467018, 842418885, 184776107, 20489508, 525173823, 93913531, 199936707, 49296883, 500271791, 9386940, 42793104, 102301079, 299925062, 242848544, 157270543, 567750735, 512260765, 540910896, 473863432, 123756576, 867793612, 940752336, 189701376, 338838501, 163690216, 120916067, 790468763, 680974009, 939542025, 299064055, 752326705, 668302564, 775312490, 929999123, 713601128, 593704708, 595301628, 539445680, 220384571, 492539730, 572951883, 264745653, 946510661, 751486844, 372815432, 445849920, 481560920, 887629330, 46438187, 433046906, 550746520, 68280122, 549536967, 98170304, 942092421, 657076175, 85959544, 736296914, 244774210, 196059783, 968298850, 183375217, 810099519, 413635020, 636120983, 396309504, 740465895, 371532101, 1, 42, 943, 14920, 185722, 1929132, 17340642, 138243024, 994832181, 548192008, 829424358, 702470585, 488681655, 275370643, 835638795, 810867407, 286977068, 950047225, 83539435, 44629372, 288790619, 507410843, 264046736, 483012816, 672138691, 875194556, 651203850, 66911617, 918075656, 674825734, 94581776, 415282344, 303997379, 819537616, 622429217, 698967413, 751254549, 420414807, 687830513, 601402264, 434289505, 724948167, 754889253, 808542135, 995391960, 178813332, 724416372, 177739106, 814105099, 753597104, 45856871, 272275296, 786414287, 511285559, 160720229, 317562390, 790336119, 868224061, 359611251, 78736463, 773457035, 927802445, 421722380, 116775238, 364696053, 502866895, 626441652, 490807991, 713262576, 797949369, 598695934, 260170588, 82830001, 494545919, 272206045, 443643728, 598266021, 33015507, 884148700, 307476402, 959867411, 216334812, 800291904, 985570368, 488188448, 107147695, 538136243, 662412600, 979298525, 134498654, 226734918, 727004323, 749341953, 119616289, 344235011, 179701806, 771727176, 867138213, 462181714, 886155872, 120844409, 637609736, 732957723, 950929297, 917858187, 787591285, 658307576, 752393246, 363474545, 410621001, 994736846, 177814531, 780475306, 862888709, 592093607, 579502147, 557845688, 288775481, 603183203, 577960148, 788283409, 673824051, 683888139, 877184660, 633236685, 114600324, 443874806, 243845462, 737247494, 816215602, 301818289, 678209727, 613605938, 858234475, 818583083, 638002191, 955539556, 166659792, 402119583, 136117938, 121601666, 755992562, 47984728, 295575049, 499852111, 307179145, 332974068, 315732357, 716712867, 640162541, 867854182, 934376752, 313718034, 59903781, 946384843, 119557570, 525136020, 151571916, 798992199, 641098837, 260839275, 993458171, 824535499, 355644177, 761912070, 816737774, 16159145, 269418274, 606453921, 360745230, 8968332, 697762673, 987763777, 660889863, 735951723, 644168107, 694447061, 112348183, 530007620, 3042837, 764274326, 848173528, 194620935, 635775962, 259196720, 713828904, 940082694, 457694335, 838811079, 742877821, 825043434, 999682813, 323541591, 50872352, 337477908, 513975090, 485543671, 991738379, 437900643, 771900426, 686428428, 563411325, 914169111, 935692665, 43568184, 490175371, 749564693, 101137943, 245839802, 603981104, 626386341, 386920859, 413292672, 913439917, 70347116, 434898910, 144090153, 824132212, 891175519, 132402569, 347193520, 969072546, 16729602, 608672301, 618817500, 911982521, 688615529, 732174336, 500282116, 497352932, 456415575, 878875953, 316115544, 915703538, 598465482, 596140294, 730305232, 164832432, 897815573, 166896959, 324516472, 764718824, 566396641, 914517008, 874306816, 779763109, 852306547, 611269114, 292511571, 915381300, 758955270, 257373679, 74625589, 121789415, 230596845, 205840454, 916544901, 23902587, 416402779, 293269031, 510816400, 975368660, 955188220, 72244504, 561311434, 137072009, 127537010, 860723336, 883260674, 394382836, 913512596, 497775666, 206616201, 483790701, 11643758, 543373789, 107216374, 536706614, 345207484, 197739695, 416959310, 802020491, 883579389, 155472766, 707726533, 878636875, 137339984, 387604391, 170286771, 862464509, 93116703, 698306089, 277231574, 157624181, 518482505, 545923209, 301838767, 429107456, 65466197, 400869145, 603396151, 201146053, 29560436, 908247428, 740900666, 645622178, 468181946, 182006817, 585006092, 39427009, 901513909, 575103140, 643739693, 969005418, 413112711, 121940507, 949419798, 274176335, 533655948, 73448571, 447893873, 303200166, 406062958, 327948494, 399154885, 680966803, 676784794, 346165530, 118434942, 634041854, 219847494, 927409557, 731595298, 204066166, 484721091, 397391612, 62697528, 613046235, 363210072, 588627148, 359818291, 176675393, 710790103, 31891420, 193284227, 13322649, 80677012, 364175866, 156203486, 303397217, 540753075, 969185318, 762928705, 479974322, 873609278, 714679223, 243389411, 893917661, 730412727, 540295939, 380888528, 199480073, 111615382, 501213077, 699982545, 83674978, 340471893, 589623231, 135448371, 354059110, 416125008, 490338358, 869847423, 644581498, 153365962, 261322947, 680966984, 400282844, 542955010, 604680600, 412088220, 680278649, 139286485, 860834305, 469429775, 280658323, 253030904, 2560916, 10309871, 297479762, 823144855, 871982081, 47058346, 963847165, 382927224, 356584190, 324565827, 306141977, 910279795, 453817674, 601981427, 979339306, 222338413, 904561649, 382529080, 408856660, 854658577, 411827225, 670817056, 827144476, 223389693, 471934610, 930635535, 587441381, 722797748, 95690794, 663628478, 287716698, 646651719, 701670514, 288321331, 90367689, 303151955, 540716833, 449495113, 614473847, 768187147, 779428778, 859329178, 317839203, 24311574, 208713726, 534909824, 569617669, 779723332, 951823587, 262620278, 508684571, 644816282, 124674019, 369884532, 146396384, 993989514, 828097325, 353947367, 356630001, 483119775, 36683277, 829372562, 480348153, 416969202, 237164413, 917166508, 673670902, 955993972, 550159722, 115253791, 571208381, 883450110, 234414978, 338605160, 465632072, 975880238, 1, 43, 987, 15949, 202614, 2146662, 19672862, 159841410, 171958174, 857707214, 674952199, 863564473, 694487987, 218927913, 150857334, 64522123, 242512102, 726888439, 233627107, 811786714, 114239005, 343074532, 372330107, 720689358, 467711835, 904517093, 48140523, 445520536, 151023837, 477389409, 167654505, 524330326, 826025786, 750662832, 873751815, 63739722, 191556854, 667326112, 50500515, 441625511, 782830742, 400734038, 564497630, 921910383, 845548941, 368028935, 749018447, 103585045, 796556849, 628596101, 868979841, 539520158, 627354569, 90231323, 417433082, 56768496, 355579497, 422451590, 886349503, 72956900, 803725461, 415871073, 683643384, 621063238, 193330057, 325926450, 277754812, 24871409, 448472012, 886190243, 823962291, 441987145, 894908057, 837390023, 862747763, 91512877, 722912649, 93349481, 545810047, 913016979, 515556016, 298546360, 734212089, 844284728, 136068973, 71028614, 122223407, 751306630, 44843394, 423748616, 386401231, 812571458, 811253207, 883210298, 108253088, 777750730, 94398075, 357510258, 341016668, 444595182, 421469474, 846006439, 697364303, 430219357, 145159, 329923811, 555736286, 145037472, 50858159, 758063180, 409311835, 199515197, 849732459, 429458586, 110831608, 601311986, 405029768, 899721594, 362036575, 3616348, 447767827, 718164293, 455022502, 154627334, 632024645, 923207902, 841801838, 418932384, 595460287, 460605434, 188513457, 767682601, 51793196, 194981425, 929803954, 504733978, 22197692, 870666331, 333136663, 819520200, 530915500, 599537526, 53266589, 48676597, 387019415, 413134249, 89916173, 988538195, 741237674, 580557472, 340811443, 13472882, 840030352, 781975641, 296220934, 702357371, 942050407, 935085214, 845987731, 799577627, 872670633, 692587304, 440284632, 702895036, 10589510, 109084537, 901549736, 680965380, 523560865, 14608855, 766098800, 955736031, 229070295, 918139336, 762087315, 15060087, 769624318, 210516326, 269537431, 932448778, 651446512, 367308406, 624037144, 927670291, 415521073, 854675140, 947034643, 395133007, 858104556, 792426709, 918444166, 282314711, 96653546, 423079321, 469451942, 792999037, 308400615, 330587501, 691818222, 53917678, 568461122, 362577365, 775464857, 904714011, 845440210, 795470521, 568880508, 666239878, 183860147, 125507811, 545400921, 401495311, 3467092, 430876347, 332849310, 96436924, 957680475, 836934713, 150232592, 891109199, 995835861, 145792868, 255284669, 853681633, 801676454, 45857933, 127560794, 137690320, 534209092, 436059291, 890838261, 134212816, 302504982, 936257832, 761720727, 269396963, 28197218, 59083210, 947207164, 442972791, 384169121, 488722025, 351406087, 443097712, 82956552, 698141640, 145942108, 188889308, 734290094, 387705377, 912805029, 973822420, 47485510, 507370861, 221674431, 786661915, 91335607, 856760661, 173031704, 864904090, 599152735, 495185408, 938099393, 556362344, 990758140, 995900803, 254599934, 462199704, 5008078, 665636661, 527028350, 642386127, 1829553, 551952980, 424017355, 108488740, 701380336, 806666866, 700141562, 59441909, 362171728, 894757457, 445400929, 773238426, 127546419, 723395394, 338826564, 332919619, 340737249, 850054615, 184058121, 13063831, 278558952, 698063140, 498777528, 72607237, 345269132, 902279995, 183690503, 772520236, 708689187, 233896476, 458831695, 230994551, 41124197, 206351350, 689101399, 262700029, 620939252, 892377787, 428085255, 694339277, 213848040, 916329377, 192795757, 474268014, 561285670, 220016093, 638297144, 193877561, 647642810, 64716523, 5417153, 709160560, 438820650, 471896153, 456049785, 424945489, 102312939, 179871925, 155527933, 66018018, 519349428, 575834851, 366155295, 196027859, 709388961, 444696414, 108229719, 111474967, 169464130, 765045351, 916818004, 674916990, 958919968, 932259128, 849009441, 829390390, 846317162, 253991616, 482990034, 163822353, 775754269, 532037321, 49173712, 212326050, 301906174, 678424573, 534302771, 375782334, 160287870, 855370313, 341617592, 25457804, 708941176, 246832732, 903916100, 546588049, 96029971, 706821232, 940560978, 101534792, 337492719, 856837601, 613769045, 707646199, 812028723, 616833643, 679800396, 535428679, 224426630, 413895724, 784683428, 431644219, 111092914, 661756720, 639659700, 41894591, 68359952, 43802473, 952730000, 823133424, 376059765, 707785553, 822330735, 771301262, 948220958, 908479296, 864547297, 515908783, 27167717, 175015260, 401476125, 721945851, 298498970, 707819205, 838011772, 889483594, 356594984, 693435347, 967781679, 401435494, 355846180, 333596320, 628919505, 303558980, 984974994, 113643042, 89409518, 612893129, 122412730, 114900098, 810658251, 247580260, 945287301, 609126629, 492005778, 772356444, 361927818, 440145503, 858752994, 174471327, 210890472, 769016792, 638211867, 546015263, 377533141, 892710683, 705066724, 412035898, 913706912, 989583745, 102815427, 296051463, 435828877, 627348761, 994079761, 369313875, 909339708, 172995194, 816793393, 474860389, 821690532, 962160124, 246051373, 970475428, 561698902, 165844443, 708639335, 918973613, 861542417, 207950600, 197794802, 563223285, 448456804, 787570186, 926930606, 566070711, 279041721, 162328562, 287318056, 191225488, 14318341, 585550504, 409974535, 697728497, 891226405, 200433586, 381575055, 638337683, 483277973, 755030264, 867834356, 962849947, 821535631, 1, 44, 1032, 17024, 220625, 2383232, 22258540, 184242832, 375813872, 392612893, 231706087, 882424931, 687132034, 689650073, 577977876, 303878988, 24310937, 406963663, 625468735, 582435950, 41660062, 421950986, 98962940, 938709884, 758565048, 969234571, 703952131, 900436492, 658647225, 285611947, 399326780, 419454732, 205387170, 983950227, 49990302, 189001672, 62673927, 586296391, 184361166, 506353667, 438069708, 256171907, 825943859, 951340167, 368115756, 522855639, 198647246, 263328246, 450011807, 434855284, 725807775, 648411666, 18383140, 128787399, 387148373, 905324825, 158891954, 656234845, 213026076, 490012707, 365468167, 200221292, 298615515, 290107567, 35072337, 317672326, 60118064, 676291945, 898619095, 494511021, 35193707, 681989460, 255539191, 6318676, 181981289, 309123618, 769843578, 942743189, 29734288, 954472400, 463236670, 747980714, 175643037, 260101113, 77874147, 589524374, 710018290, 567729062, 854908844, 767838566, 521233813, 535397022, 395450772, 519565978, 430844324, 691804767, 750969410, 915664434, 335442962, 327801393, 599337662, 151524696, 372580414, 756807473, 202845724, 578628778, 324772867, 495203100, 594805038, 176866440, 134364432, 797477913, 981614510, 128692174, 938852792, 42148884, 122641852, 370944239, 473851910, 935488807, 532851475, 689984371, 438315593, 696398812, 66001022, 428174065, 54501471, 80878480, 666016821, 47295976, 813797397, 317765605, 714997505, 258919731, 82884010, 661027522, 582655484, 361252385, 24311003, 432884688, 368733632, 23821090, 792526029, 846601436, 536812192, 29313630, 382435159, 426147993, 517181759, 645690342, 270896281, 775661220, 283600768, 240876557, 135665693, 104458079, 616729602, 497103691, 828815240, 86098789, 998656307, 754065783, 488969594, 91503702, 52278308, 883359011, 733253122, 448869387, 985543203, 116773170, 582006344, 860482711, 481797421, 498040658, 240829616, 836032529, 195942841, 508465042, 970760583, 262117458, 515914406, 802808161, 784332475, 374122343, 146224696, 841597534, 586439935, 244148601, 788204315, 767547799, 776362337, 510076278, 624681830, 364806405, 36907700, 539421266, 800828005, 512242954, 899834647, 163376162, 50294413, 18654970, 84289561, 55576943, 421249957, 34930346, 752291330, 162276973, 265235612, 648593820, 174309283, 472188614, 715911113, 367773012, 121970433, 269868616, 883985007, 980070897, 514347496, 412293057, 574601560, 116830355, 45453500, 562859501, 189078677, 827602581, 712444490, 316586780, 733065979, 840949184, 60074648, 135398686, 424428452, 321968689, 410040315, 273128858, 471407472, 574966766, 873880166, 875045586, 51088331, 163730111, 878321231, 726127318, 966070068, 992549896, 363335253, 89848987, 723352311, 66759579, 406269326, 227087300, 150259572, 36586234, 121181736, 671327424, 433664784, 948164313, 657988535, 451431758, 352880293, 341991927, 179834471, 17796695, 709446365, 576526708, 534876965, 620591563, 749402589, 628280366, 213414310, 982746106, 780180633, 458647121, 527146575, 210950823, 363805011, 571210392, 912463620, 153315485, 532024632, 427468951, 230879114, 869803861, 964025520, 480715223, 895116735, 766188327, 419338263, 475074013, 158183698, 899486620, 551866464, 830407504, 385674668, 305150124, 25769566, 438519248, 46473036, 427624180, 723264512, 651472006, 264633252, 457374493, 476392005, 982968243, 594462543, 141658727, 489344824, 433530156, 442633667, 193279091, 506366676, 618868695, 731227096, 902261819, 499005142, 38842574, 647293009, 470120821, 963932040, 826530559, 427769181, 52186234, 243569284, 806914289, 77294303, 605077946, 125786816, 193185124, 669741115, 146483601, 421911450, 244025223, 607708016, 920909811, 503255382, 458139691, 962827176, 614853461, 60315827, 350564197, 429760397, 252570002, 854719144, 336843776, 342192419, 596659989, 924243516, 172320579, 980212083, 387574794, 749118912, 796421442, 338721201, 731277700, 423355068, 842226704, 398877706, 643899462, 276311394, 413568057, 530987554, 558156380, 825270018, 71652153, 764304967, 575174245, 41877959, 189656159, 729954858, 472722511, 759829544, 285982254, 921037034, 543320666, 873711613, 829723375, 146980729, 88768980, 242470712, 9284436, 325379730, 426922557, 253585643, 473459335, 496125795, 212116723, 579959160, 525505189, 681915634, 797942363, 691505794, 454823298, 342255990, 994255712, 284908161, 275004161, 935102263, 472107098, 948357256, 856671615, 528973823, 649773881, 963952149, 308388016, 911396221, 251193820, 721175020, 199750213, 907595892, 491208059, 66513541, 911357998, 28185931, 408941602, 745821213, 601730782, 8869191, 260152446, 11616084, 492782894, 282010506, 115926945, 586669273, 760307966, 135350671, 730510115, 701832702, 230080848, 284697593, 182609947, 968668397, 822892958, 20031466, 582030222, 113170973, 44631330, 117449096, 742186715, 393019551, 475653487, 44400405, 854169605, 417464027, 638137059, 767027912, 156446839, 993857936, 340495049, 620457258, 138844665, 409760846, 178352112, 82788960, 388732194, 649306589, 798058368, 662337136, 564354859, 463324080, 651997437, 151329929, 798760314, 140393196, 82249686, 534814725, 624568021, 130746531, 950081340, 74895509, 582830295, 80288213, 896322580, 930247101, 961634195, 343840503, 151542664, 791653321, 891526646, 512046490, 292522561, 321986893, 483787584, 926080170, 410378864, 504638099, 532986681, 138953386, 701001827, 64586773, 800287681, 592917926, 845148767, 612516645, 103437292, 360749745, 802262044, 905182790, 741928176, 827192105, 608668686, 275550867, 759837767, 768468707, 652063776, 969103143, 1, 45, 1078, 18146, 239803, 2640055, 25119048, 211741156, 609749448, 185787670, 784612981, 979654374, 245960280, 15201333, 958496287, 21110097, 315107827, 742613444, 350112648, 551346765, 22689059, 646342016, 52427180, 113726997, 20972491, 531552248, 493279562, 92962089, 319571072, 658193556, 921146440, 975234478, 32484025, 175484024, 620442122, 566033382, 228886883, 301912152, 137109958, 37427138, 531183271, 684452057, 239066445, 806400806, 345167706, 766401402, 659593100, 342864185, 793254425, 754419464, 829307575, 253460669, 788296808, 455700810, 203460090, 299960617, 672027544, 662169751, 130171479, 226661975, 16040291, 641167104, 11608362, 92735361, 828424038, 151425031, 757058935, 838944903, 705030989, 271605017, 832315720, 525711262, 695893337, 524834613, 616761109, 89325780, 498691877, 390082387, 413410547, 86170624, 733987779, 857386717, 121183471, 378540433, 791481061, 602874536, 895775257, 706223069, 9499, 916233199, 610175789, 305910126, 402086898, 380865911, 987929263, 784720236, 752249361, 533065111, 750214951, 512527924, 120069833, 497034065, 691332267, 542878776, 324018841, 841280375, 368737196, 213532423, 972352910, 856518833, 695976280, 832491001, 482258020, 288928023, 37469870, 669147935, 728824530, 312167670, 98462828, 664815478, 37466991, 488559701, 805407681, 555656112, 449333572, 115257333, 422614443, 217564969, 709154128, 523463461, 73425486, 892488653, 72758100, 139084611, 245397266, 356349189, 258341975, 374070936, 726599734, 907199192, 145474167, 868900328, 80767170, 435742131, 604761267, 550372021, 238314098, 858506407, 406280874, 734533546, 294613351, 569709112, 578499728, 811514468, 971780315, 806793934, 105431100, 109183449, 48863833, 577768093, 679710969, 415227663, 41263734, 575857153, 381654592, 178237376, 962188807, 96401085, 816699360, 379978, 698529453, 815682387, 657011537, 324418972, 693645417, 573047105, 308103161, 882958960, 454854080, 319280881, 638681315, 366562235, 558670399, 767575020, 418970310, 599121706, 533764150, 589341596, 935247125, 342450103, 752510984, 17885861, 270962366, 936052758, 754048953, 578853463, 395299411, 975776432, 660809842, 714104917, 664542262, 888472526, 460099640, 981638523, 92874960, 177231620, 389704303, 815325394, 892076514, 810821143, 435904186, 382196425, 459031152, 355917826, 128881343, 657597142, 768648132, 489510758, 615223177, 785945817, 514595120, 566588750, 607013232, 187911920, 428934627, 690400146, 385480557, 274884476, 214574226, 202705516, 78809920, 768678876, 104566183, 54811645, 783466377, 78714677, 225394661, 571378521, 194681502, 425310485, 768219090, 304793231, 206900396, 615627160, 652872143, 605935098, 888495311, 608958308, 684600222, 150382009, 670451269, 632074742, 29926906, 676412361, 727588975, 541140282, 152873820, 396851079, 644404346, 44361987, 675992732, 795525664, 898044746, 408945421, 518637916, 428148139, 754863856, 398182352, 901207212, 713356422, 978366083, 314876385, 700685480, 450639991, 507197672, 750335365, 694787156, 659670168, 536065922, 58255852, 874808151, 601680063, 300562698, 308983506, 144763409, 291800793, 77526020, 485403753, 904665596, 240987930, 592380858, 131116194, 318805303, 40941643, 253699630, 655235690, 431599614, 508389196, 766960976, 64307752, 83604788, 642165815, 298107337, 143184667, 782909601, 97135064, 800759539, 594114128, 462420032, 946857620, 578998109, 847963761, 556321528, 57391815, 681855904, 181815656, 486333346, 837072759, 524567487, 328595763, 549915998, 810586503, 921107919, 625157836, 520890292, 832156974, 502972509, 844559735, 189855766, 821823028, 625190873, 310510259, 495827691, 683011136, 462720297, 218315456, 558392392, 789434995, 973556645, 730884239, 996176654, 617108310, 869866261, 672230385, 823462275, 454316955, 569646417, 836576125, 486906178, 189726176, 941091111, 447563926, 715506888, 259006307, 152570437, 178255829, 705545293, 756368978, 655390691, 445318929, 656847742, 582354283, 964611397, 757172000, 601301680, 424348696, 51484783, 19240319, 282677827, 308226295, 848392338, 155829926, 371112122, 224524783, 972970693, 890401898, 186586738, 229535528, 744395297, 436751188, 287103606, 767393594, 221149011, 725319915, 148703291, 142739608, 565503173, 66967587, 579759051, 568848401, 146971072, 400042251, 42796974, 930117091, 516575412, 958322295, 49672443, 25502320, 669481138, 837449618, 7837933, 569472200, 125364493, 253977071, 938687542, 347213905, 923213402, 374713215, 103889249, 423021360, 42560340, 446498368, 893011213, 263552847, 473020638, 594960497, 638188472, 306243047, 631678307, 460262893, 114330448, 196301356, 120279822, 408786998, 213927614, 687965452, 221650209, 761159253, 159653422, 237951119, 705996510, 183076481, 962207888, 939920456, 729428244, 527536009, 933629825, 48104537, 426892607, 222940406, 156477133, 294062878, 856995315, 562470362, 935041969, 210948751, 968306167, 842365144, 520781012, 542464204, 753086923, 742421303, 62000597, 644679235, 71406991, 633199433, 272647461, 452692051, 412108892, 971466694, 51102980, 982720545, 17172841, 800141833, 835541670, 112517201, 389287762, 451060806, 667438631, 372888210, 71363616, 925222882, 974951293, 516878304, 717488009, 957226897, 42671831, 558776576, 623171604, 305500795, 631070922, 102790598, 482941055, 578335399, 805101814, 173951677, 379242816, 368922629, 730730546, 873191134, 654555294, 282999571, 122452789, 92227034, 843713012, 807240125, 801145367, 399481174, 81195926, 292593849, 487745170, 77737545, 120468361, 275563695, 294725580, 329691567, 323060707, 128192468, 940264172, 278390124, 237020514, 693096287, 868976326, 357620751, 777387506, 600499325, 283061659, 552760619, 551343042, 374674126, 67456147, 355451755, 309520773, 188033652, 438124708, 963234900, 524570431, 966112342, 609641134, 592345761, 1, 46, 1125, 19316, 260197, 2918394, 28277069, 242654144, 877454212, 274093151, 658806941, 733787098, 12686768, 373279778, 972151771, 700803085, 323660829, 529034010, 15342046, 14519348, 617205005, 151932388, 986173050, 673700068, 544467810, 964286681, 515278420, 556139518, 340574896, 558301369, 203169010, 995039572, 456888812, 641435231, 165153057, 140522292, 660622205, 195293121, 536816710, 963078287, 7389104, 204944482, 754195920, 468292992, 782743724, 983001140, 866703245, 496885028, 44229335, 385957410, 278539952, 468949573, 420982388, 313452346, 869856814, 98935497, 204399132, 112520568, 660616311, 229799510, 228233497, 492491671, 631417681, 54933646, 149425728, 621332861, 339088208, 164640489, 629238436, 824895721, 154091091, 876001533, 408513031, 998443240, 581987593, 639413342, 564182232, 919538600, 946772636, 882410774, 972663920, 656083562, 92818, 266781815, 775781699, 746031288, 222736672, 245153398, 853395663, 612580130, 998160370, 644539418, 268757618, 522753001, 961290581, 775849265, 167666621, 207332842, 699178165, 754169098, 895892786, 110804927, 209717022, 224332021, 783584762, 168756823, 846734143, 820517435, 567375827, 214226237, 514413130, 94334242, 56417678, 452070622, 302779049, 643793464, 45275321, 465081583, 721848633, 905142006, 304646178, 594655979, 909007937, 734286949, 886228757, 175346016, 613908391, 543890160, 182181133, 880150750, 840065256, 833202286, 948664835, 99995047, 986587901, 143761895, 873393215, 472341142, 369663112, 813013714, 860504625, 731747262, 545041246, 583231233, 427381591, 37913038, 537312918, 219404202, 592801409, 727962123, 878247573, 121527391, 62101177, 856133295, 688561557, 4927109, 639161755, 216890863, 944378755, 396352437, 878653962, 905668778, 386987830, 935008847, 899701147, 100650401, 955831377, 336099358, 325599961, 655390214, 368725260, 410912881, 868037904, 255016544, 51552711, 320078126, 868474642, 332377928, 241406268, 35418479, 170587950, 775390874, 598922434, 616742075, 563583865, 362204509, 606438997, 894815935, 49721736, 43588534, 841088924, 703571407, 258771291, 525460849, 233015242, 491199815, 325653075, 858892862, 519655123, 115437087, 727491564, 149427446, 582972761, 204458210, 871579136, 737982490, 129452738, 424878982, 856725917, 336920826, 730532856, 841738688, 738232572, 913319995, 816486040, 235770118, 427698004, 930569686, 569011751, 212446463, 508105319, 803897811, 496189040, 948372030, 432798655, 784691260, 809769369, 691850475, 577558004, 62715847, 947764060, 196109904, 506172286, 447735266, 980867772, 417186123, 46557919, 986790130, 277584037, 822619391, 621076591, 388367593, 68342324, 236699370, 119970164, 657351210, 878868802, 794459312, 436412351, 290870119, 503296346, 564802634, 58773734, 218770767, 842309450, 694735121, 712067611, 605426442, 634737321, 598847809, 189964014, 104895974, 463967300, 12836011, 374171101, 422839429, 769990513, 562838372, 23465799, 935303296, 758855803, 832260567, 373886738, 362866660, 831747060, 745193763, 842521525, 971131364, 323409153, 328965945, 810807795, 987986960, 514599613, 697337301, 518676386, 255182547, 320862033, 438306682, 656059329, 246817307, 296427451, 518314128, 212813255, 401599307, 322632262, 651271379, 102975853, 978392574, 171788197, 425477753, 865141598, 200230496, 352371432, 128877128, 483645145, 487174027, 207964600, 565016864, 366179929, 769999162, 980709292, 279413092, 778963675, 322935221, 775556840, 152203885, 621120920, 754303914, 144652778, 603456104, 397495432, 911648885, 161631342, 183072379, 436197254, 410415743, 654211646, 998944149, 660332881, 659092994, 407158213, 993390015, 62237745, 342306369, 807083806, 460112259, 598009122, 34231667, 354435262, 237881432, 155417941, 495370397, 996923439, 566380833, 854227389, 702509945, 42544433, 284265702, 294553519, 149363293, 27077251, 84953964, 442875086, 52560456, 900402134, 145229989, 73758817, 191009440, 854994962, 638721915, 122661714, 185868970, 77283521, 869275152, 18655948, 313026284, 709600476, 473812539, 310414874, 881320952, 952459523, 248120422, 525865505, 878780555, 987277088, 840681160, 676792790, 412115993, 140030918, 974129475, 721196483, 656805079, 905290349, 47935904, 451920705, 209356056, 551066765, 377150442, 379611973, 957219941, 151470005, 815021467, 645207971, 427463516, 863082600, 325313522, 124436219, 624577057, 614877838, 455973640, 851822937, 25478672, 694724523, 841056623, 311625157, 733217559, 234679922, 488590424, 672460808, 393534712, 496209755, 929085969, 673429468, 675205481, 477828672, 541309112, 421475544, 478494486, 773959869, 620756099, 817295158, 343366608, 474968096, 138789669, 1261477, 581929663, 193727536, 890932863, 10823177, 566850894, 774883564, 16714666, 326523886, 969386350, 297903394, 330603328, 602435368, 640131734, 422205271, 722651837, 536164302, 931111157, 119137488, 728875089, 985577117, 985476890, 17918009, 917723365, 472997173, 89115107, 916366434, 502538821, 230961609, 303908854, 617061492, 736625515, 131713887, 339453221, 738950163, 633262610, 426758031, 238112917, 779917917, 838020550, 66019448, 650675847, 778117049, 610691432, 213274580, 385410347, 146924004, 364868172, 467790003, 719723336, 134820272, 752419541, 477278067, 249134595, 704095466, 475445405, 736299900, 879265925, 152926089, 845846141, 495967193, 279498385, 571884448, 188818617, 160584873, 477296264, 718325160, 376134972, 29944771, 994040918, 900529668, 502667072, 63109761, 493032874, 781301515, 461834757, 82343644, 481132313, 514447042, 33858163, 779555233, 748165656, 15592733, 72424287, 572256728, 868353288, 210902382, 873738113, 462082508, 116372507, 317994063, 320661573, 43412947, 698165915, 782179405, 544478699, 376533191, 591100852, 669522818, 718785967, 689856669, 868867194, 692259782, 326169003, 372530014, 278822874, 245059471, 536750832, 337386716, 351509954, 600150419, 771930319, 812137400, 268506281, 52663290, 576040882, 250206016, 182636529, 238498760, 83748189, 556944302, 408365242, 877381661, 687598532, 206936328, 93325077, 375585930, 311118119, 840250578, 1, 47, 1173, 20535, 281857, 3219563, 31756649, 277324867, 182983217, 698763572, 224340727, 130185913, 938338213, 457596872, 500667258, 726272186, 242531386, 490324006, 697265581, 186365736, 123707347, 149163288, 89978475, 985283339, 584841356, 785509005, 693590689, 256394211, 919078587, 671307265, 271140497, 146527772, 508423202, 678732983, 767147115, 418422439, 470469749, 411147184, 246424306, 580998273, 228726677, 964726100, 955513349, 444565758, 668191949, 622619432, 792082487, 929348032, 601983375, 875985614, 424117930, 730694027, 740975250, 920167707, 500437835, 690210005, 493329701, 913508192, 695611331, 515433292, 682059417, 760833644, 299135864, 144219873, 937695856, 872711671, 176916492, 348891212, 334587033, 49595521, 749704350, 806067034, 773327860, 183297942, 590517602, 642228939, 275941227, 305722242, 165986509, 644370063, 71211109, 994092320, 193064301, 728492690, 76982066, 397536959, 240992716, 459846893, 745186728, 715105963, 864528752, 8495685, 753272988, 61740216, 691254120, 133693721, 536597663, 806042634, 964981978, 37162518, 164112239, 637759779, 841824460, 829311498, 573961610, 622092127, 856298148, 23010232, 90428839, 608194623, 46765621, 381935126, 362962166, 452925715, 585602790, 768818647, 88708532, 942042803, 418311021, 521378251, 499003594, 126819649, 281499536, 951375086, 146412815, 883657287, 598780576, 163659546, 959278876, 560517421, 665346319, 929162776, 164983787, 77699826, 451232846, 342897676, 483260356, 399557298, 954841649, 593150358, 617703430, 292815034, 3827776, 631211917, 629217856, 387782790, 117795063, 964508694, 824603912, 347867132, 217932218, 808071571, 466159291, 919428338, 306867765, 310085680, 347929669, 103137973, 445637697, 645585557, 573817817, 596387955, 672995733, 578127218, 402908135, 115353766, 244018895, 365778204, 555835033, 188328988, 247770780, 214263457, 844226086, 575129810, 998900133, 642186262, 886066131, 9933705, 609621463, 398319031, 223920768, 209742125, 519163806, 74615456, 814536291, 217678251, 205417278, 306418059, 464475526, 330591049, 614947407, 841330174, 17421893, 462387593, 572435987, 550253368, 393354277, 125715312, 124567536, 533400012, 599797708, 528236566, 670562226, 867851657, 488086533, 312725786, 238592338, 37063455, 385067665, 487783197, 118051898, 700641656, 71282753, 435781034, 103306472, 894876554, 845215295, 848516, 105817111, 455104275, 971250603, 659938256, 173306291, 702024160, 716038595, 487118454, 170680030, 880373959, 881689085, 153725278, 74926408, 143593976, 537712434, 635112688, 530810156, 750175992, 211491335, 495469862, 938874667, 906814766, 530322450, 654580872, 345961757, 642596517, 63791230, 944154048, 670877958, 937127089, 186748489, 915912734, 209561832, 276486399, 229476817, 558761321, 226557040, 227364465, 312169979, 745218623, 741668605, 732242764, 141121784, 862165956, 612899824, 26577011, 945385273, 251793938, 946782241, 731260038, 244678083, 406380914, 904932224, 539791264, 681567161, 903979395, 522313639, 307479666, 592336384, 274405785, 808155145, 116439879, 610551965, 466693001, 783212908, 356926408, 441684284, 460337698, 929744044, 6376955, 718008169, 946348344, 771828366, 973818233, 895371075, 977137826, 380169268, 772257849, 31334848, 472603919, 411133545, 814229722, 268412684, 269984826, 925865608, 465876593, 90547760, 192297128, 107314233, 564985934, 624177562, 939350415, 164843750, 127698384, 375467125, 733175906, 272735725, 449176665, 148653187, 981408173, 518395662, 539465581, 376426572, 523018009, 244326749, 117372211, 788925566, 998562683, 66998700, 958836224, 912519308, 243826028, 372775429, 817271079, 249393258, 980817911, 290157076, 803249202, 54296904, 967950499, 259586185, 891527285, 197070576, 229312354, 227197980, 799697366, 938796541, 780082061, 90937344, 484280959, 41280132, 365255061, 357940368, 463355056, 931322797, 484716584, 549219150, 927360223, 836260928, 974511964, 168938341, 138740543, 617041490, 552137623, 940491117, 311751083, 797191757, 581186247, 747525174, 464341615, 45074367, 877273095, 118604361, 820377975, 651223472, 330450797, 299712101, 798402816, 155978336, 76119913, 279749437, 94544299, 576902970, 337821847, 762491092, 205421212, 628488971, 912880168, 293200919, 74345429, 106904237, 117214135, 997309646, 440117215, 601730010, 44099662, 275878624, 579837056, 734358196, 740396992, 105320711, 497734455, 593389397, 892951024, 375888233, 469355971, 904918031, 759963217, 159920933, 656339936, 82028185, 635763012, 494109863, 887577439, 747214684, 51704021, 870514178, 310168296, 344440919, 671389360, 63636271, 867520663, 253359253, 809561479, 515218518, 735486509, 595414813, 855063768, 809133514, 296905455, 403829884, 13706060, 521945271, 406722813, 508410711, 177195219, 735377028, 927006199, 631467156, 561281245, 747357347, 2938426, 465345595, 461810717, 851331500, 936133185, 709629669, 764183492, 336958888, 999734612, 886346709, 929391292, 283117585, 489898780, 493902211, 377860665, 233672406, 313970515, 130449778, 925311516, 829665465, 27964512, 47478431, 502231137, 77997958, 450616449, 231073347, 922519036, 577962078, 74763491, 840109600, 825429573, 325716083, 462423227, 684091307, 610980133, 146344297, 230702558, 840583842, 568780809, 837872774, 467777629, 918753619, 868791683, 692922864, 937076083, 487643358, 553595896, 717484731, 882361644, 739294901, 547711612, 781629368, 821302751, 368923697, 499416921, 374122329, 146178192, 867117817, 743635071, 435195107, 43377741, 23687167, 878990481, 99110158, 262344925, 137035868, 292609610, 625408058, 171070693, 281506530, 350758492, 515834894, 237732608, 828774443, 840832942, 431386878, 857791323, 291378943, 894741249, 559570546, 881728336, 216217018, 497590589, 210577047, 706853900, 528807154, 595327246, 243687205, 679896105, 276389715, 520651743, 981854062, 782051052, 628779694, 482906971, 308000266, 98460224, 329039027, 663453182, 866909422, 358447817, 756042580, 103701857, 530184673, 82157052, 864831037, 833622836, 129557279, 680891914, 903510655, 223117879, 584910098, 872789802, 683398377, 818673921, 424793316, 162530200, 461191009, 233747923, 764377859, 866276050, 20068038, 599500015, 419525268, 504837656, 702339633, 161478719, 731429464, 9977417, 955013204, 944736389, 868359658, 303235910, 570685307, 762022093, 973456873, 491776893, 191155949, 1, 48, 1222, 21804, 304834, 3544928, 35583250, 316123172, 530785426, 505824986, 901343166, 615485588, 789348648, 698747334, 657848248, 964586458, 476943547, 698458295, 801769019, 257736525, 542576587, 933572174, 9542546, 488292838, 779820677, 404677231, 568188493, 931045218, 340825658, 205993974, 185959269, 78058729, 445883053, 431770274, 625502333, 180277174, 804167964, 894493650, 995189957, 934651928, 779076648, 286076285, 196236261, 433504295, 796345349, 46608071, 262327913, 615865530, 569486410, 232121371, 86175778, 154003167, 455565337, 592635041, 449778081, 946011559, 315342730, 523152035, 660192808, 984322053, 918448908, 362530845, 976500024, 826353996, 979299043, 20455239, 106430716, 169990095, 856925551, 339927417, 872925000, 454748405, 844111855, 778706572, 953334777, 367875579, 54603227, 952723870, 746089521, 114899675, 378338080, 515017450, 901556480, 75514717, 118586517, 750778341, 164215503, 398032943, 932771419, 175973529, 371281707, 414155738, 136305212, 176477492, 529591042, 473449712, 104580388, 917944592, 711611694, 275529831, 657391663, 618370464, 182199238, 863262145, 671572410, 926093081, 964697471, 20599847, 886336884, 976845790, 332330830, 936899217, 469444206, 333826539, 382006323, 404644652, 86283892, 711449573, 711524895, 240243757, 137744674, 52585102, 502954368, 568353873, 424768720, 673699213, 453807002, 277591996, 614231800, 858886730, 933633627, 855960053, 795294602, 320736325, 160050137, 741837408, 875372187, 933116510, 439299086, 339530899, 998809886, 988163112, 414204450, 626581582, 425958595, 547450689, 257877182, 25212376, 487090639, 693248108, 736165691, 261048117, 530252319, 667332870, 224234420, 283256778, 493030047, 381167115, 959191937, 567700201, 408470930, 456733167, 877572444, 640070139, 177231251, 53889209, 630925282, 764167042, 903138510, 822950867, 161878067, 741376139, 620673064, 828400388, 989198090, 398235498, 335164252, 650259410, 895482301, 288920533, 986020511, 960531109, 692510577, 743863232, 159848129, 639142915, 658806616, 286815941, 569150064, 996156909, 474086872, 377428234, 108191201, 968576455, 934066962, 520785392, 648351310, 322768543, 500047228, 717012630, 366640002, 617370336, 747113890, 647615517, 420668064, 485924194, 28548015, 242698362, 20265134, 481161073, 780894508, 716872330, 925052871, 809234518, 209608950, 454869307, 42621234, 266915957, 548835092, 11648368, 200676498, 803279760, 609790836, 522043768, 787672824, 264643232, 571421826, 762085826, 854807719, 119023111, 660310435, 945098645, 838260736, 592383406, 728604232, 586121308, 18945549, 62079587, 8000021, 137221342, 936745518, 867913927, 937623778, 183088542, 624248829, 606106136, 815005922, 728188591, 164502140, 885086995, 646575964, 60630781, 250914884, 619961376, 835493684, 1794097, 350786557, 222634027, 605402916, 871984975, 140157610, 784428245, 701028584, 784157139, 199990301, 49282014, 806191394, 544636448, 696393844, 625422532, 306981977, 200109353, 819880255, 622554727, 966234587, 1715755, 884432882, 186517679, 414057470, 559202957, 356291776, 440462056, 76496043, 54502936, 82793754, 693820485, 333532789, 139408482, 538301356, 908601203, 663844984, 277481039, 494620179, 126148065, 101563902, 543304970, 40138848, 255494176, 250466774, 181548534, 183041503, 553027506, 468172977, 571880068, 685135214, 70030015, 431414252, 965377675, 285528459, 577690235, 3039911, 424468115, 149219671, 315258608, 442938842, 340124780, 620577523, 697442435, 606981307, 195766252, 513624332, 160814831, 144529981, 626344971, 929525101, 167384034, 985564306, 757660450, 674490248, 404160553, 218780132, 253152109, 588527766, 276135385, 293545669, 229980166, 406532593, 544661736, 944987368, 74067610, 979465423, 367319108, 691015763, 308068787, 270297211, 892899529, 571121326, 682341094, 508186314, 992592910, 570463576, 551864557, 443417375, 102996223, 180706669, 66278518, 547390018, 97982020, 377733797, 642211092, 809569594, 442856622, 912786312, 563198351, 549331531, 576357131, 891027263, 77805689, 816522985, 731749256, 313952972, 411776160, 795006290, 22615421, 348238413, 716260746, 223962550, 78670864, 47765882, 267128253, 587371111, 927656165, 192469863, 806624234, 136996971, 759497678, 646978177, 833527505, 472805550, 754214240, 960030895, 232746388, 490616131, 420542303, 904038549, 210637836, 74285318, 144447351, 742135765, 244372617, 87595635, 852731251, 594678505, 794681848, 228154101, 363702627, 673985808, 239196945, 836249623, 602064792, 462168907, 430511049, 331217937, 84426505, 529390112, 953694258, 768941491, 296949641, 617567965, 759210871, 554347066, 314959464, 855978152, 459336095, 416019714, 554419893, 643616814, 307318600, 193723511, 342506504, 737708842, 961578294, 644413804, 283651295, 449519877, 262823100, 438065978, 195660179, 15479674, 929627357, 712657286, 867475048, 618979059, 615899609, 290553872, 46585860, 675146342, 899293157, 138576244, 932939832, 413352510, 228638502, 577046541, 52412367, 271101119, 704058715, 716195674, 113738084, 976781966, 417637854, 201849275, 137988263, 703452509, 833173534, 774723430, 98520292, 647910333, 702073064, 101667724, 93613248, 4773372, 993672667, 598539625, 298728331, 547262186, 609550837, 42278975, 203431476, 764589375, 791435299, 273439277, 15186943, 247517820, 332116413, 672582410, 88991345, 573172714, 370502342, 495515460, 486357723, 529038430, 112617630, 9655079, 54905538, 630913486, 94540925, 694069860, 101033114, 601510215, 405093272, 877399916, 606786230, 712700446, 365826653, 440611748, 222502187, 628732942, 260127071, 415183336, 331627148, 603111841, 484627861, 252203062, 603610758, 918118836, 775502591, 558836403, 458735214, 903545723, 229008632, 239177179, 70767308, 751925156, 652119146, 980361868, 450630793, 63075950, 714904102, 795480239, 196855664, 446357279, 343343138, 751184330, 353543327, 265335039, 291055365, 141693974, 952501609, 772988967, 982806649, 295006336, 142133453, 389243658, 551050114, 837354729, 288032982, 926886748, 940810321, 996269340, 544323652, 123254721, 449847916, 164321665, 408440169, 540527971, 235735087, 384560805, 888470688, 711171300, 414716347, 219479361, 559050803, 610845133, 321258507, 296543705, 253557800, 771631909, 466270561, 966519146, 100544233, 474799959, 147649345, 956135303, 808272257, 279282920, 472357219, 422709994, 530025514, 999788009, 64593897, 709199531, 479060735, 311654131, 943520011, 427742758, 799287390, 782392773, 191335024, 830990096, 336010037, 237942831, 237453992, 695887098, 398366572, 529644737, 344086296, 862051533, 684436865, 317549101, 968659087, 366641438, 1, 49, 1272, 23124, 329180, 3895908, 39783804, 359447204, 925733384, 746545659, 165655001, 158091124, 719304162, 111160209, 171158550, 935012406, 874008903, 988755604, 608336289, 351327718, 211049418, 970686245, 441380023, 920727544, 396494781, 218114186, 934368772, 753990221, 203263446, 488226646, 946324350, 642441651, 816607227, 122420091, 629716118, 498106515, 488881569, 100763230, 814241373, 430998026, 986590664, 188596813, 238499794, 887765759, 719310391, 819612870, 840885905, 584773429, 811468143, 396065785, 368868801, 299761844, 617462619, 308704442, 206242421, 833439007, 106715469, 970135543, 972244832, 66232618, 207050932, 577078708, 955731123, 103929249, 632790957, 297717977, 280927805, 856143814, 140717794, 889342899, 570959166, 553036683, 311778062, 833874032, 321035571, 629235909, 60666525, 19636232, 889773198, 837811568, 283828621, 499062871, 459250525, 468391935, 389843786, 80632526, 462481073, 859711240, 66143264, 831825780, 518914304, 998480225, 496960804, 480385724, 483317701, 923742113, 771054094, 630267330, 478946945, 527928962, 674723787, 882998613, 123711144, 324674723, 964132061, 961988031, 65215295, 858250635, 924300325, 577545014, 241841560, 172586320, 726876085, 210684082, 897202470, 742850020, 161301259, 120853804, 344539574, 836860211, 667275920, 72688787, 930704832, 179668299, 861726583, 168665810, 834696469, 672920894, 419563732, 302874180, 454615268, 934181182, 119694911, 779976833, 216225187, 244379028, 586838513, 942544272, 397970796, 155525782, 435250288, 609294947, 697035870, 790138207, 313089121, 451259481, 904475234, 15500998, 428233316, 352796372, 805867626, 355791012, 191743365, 390372515, 86113794, 224579645, 34292553, 472538607, 244805809, 799547326, 350596592, 550928379, 248605526, 858957317, 809083222, 418025439, 717379009, 843111164, 748566980, 795763411, 344249103, 246799165, 468081584, 533360568, 97839725, 814208152, 370784820, 149643652, 648814350, 586462723, 179226570, 323415874, 413399345, 830824722, 901264775, 785155020, 673315179, 883230707, 320461657, 209574161, 896187167, 641537195, 580708044, 615201169, 907420567, 226969633, 44823693, 653925850, 618905940, 556249274, 683808190, 595045606, 406684866, 817926872, 498013040, 741888764, 255307898, 750076370, 226664326, 45791371, 138249186, 182084615, 925519009, 32002450, 507648904, 36302093, 164244320, 134446595, 176304234, 443232913, 204696272, 377207389, 330407781, 317016375, 255990328, 346121343, 776903928, 865285835, 180645765, 94169320, 523805568, 66571932, 958229276, 706032441, 157122799, 174128102, 265560802, 960871567, 814597354, 840895548, 702037, 848074074, 17426708, 276377856, 55696613, 206160180, 32721003, 453495162, 587538197, 204676036, 610254246, 936113705, 842825687, 202272844, 145230437, 624393323, 739106533, 700708897, 523328161, 691038973, 656087189, 213848962, 927815456, 921255504, 609475698, 113463094, 529085932, 807792149, 579407091, 163833313, 694176222, 471399591, 346973697, 718259544, 297359882, 892552532, 451373341, 120883534, 8029910, 624607649, 606649877, 815313728, 231664869, 673443919, 615486405, 94571095, 110823650, 950289120, 646876432, 928906934, 684469503, 297251947, 919054473, 285157267, 967739040, 274416446, 465229888, 656873003, 825576691, 53305194, 539107135, 609069516, 669008004, 585520763, 526072937, 91836656, 101778461, 538228891, 424599066, 719851020, 234795290, 701214554, 914481398, 497763115, 504286064, 212679726, 409710596, 134500525, 154608785, 554889670, 267547678, 851784437, 749366191, 681515762, 587313005, 604179607, 297539881, 51380469, 30897443, 988568867, 430543091, 168358864, 325894509, 131217074, 122226126, 289735266, 2541560, 697428098, 339809826, 339814711, 568813016, 256466301, 865405619, 710940331, 7424767, 660900037, 729644940, 444, 450105203, 690939247, 459755659, 92556107, 42398758, 782901298, 483436309, 73995240, 784415989, 602791285, 655683750, 744368335, 684929720, 939318197, 1937536, 94209990, 544006669, 195169186, 297173575, 151918090, 559870646, 425964491, 818978660, 571568643, 60393204, 415731654, 547756555, 991386612, 383053326, 997830526, 963081859, 107336308, 898219937, 906988404, 550036125, 981857264, 691293427, 481189647, 501756531, 316529056, 476096058, 168221459, 165690115, 553028411, 960794528, 453386272, 963889156, 71983103, 494867184, 462967097, 635240847, 989817132, 23786457, 968645733, 163475174, 884798755, 971346358, 8231228, 947835970, 751371876, 21594745, 702982989, 997528759, 30899466, 874470660, 839706683, 64336797, 183002010, 415355406, 851375333, 802315034, 662347966, 459017349, 83113197, 807783874, 686211775, 665742332, 548408223, 38712773, 947065654, 224142524, 544199777, 554457822, 161813447, 59932464, 324817969, 826816639, 159675767, 610260222, 802832692, 962264291, 230527850, 654881259, 493134625, 56109407, 491401533, 163680598, 892934948, 889185132, 78662275, 741528574, 616484511, 204394884, 120980232, 4959172, 884202370, 468625389, 987185268, 797914336, 292935354, 542176515, 965256954, 25044127, 701524209, 669825969, 264620823, 983915826, 463815578, 325409981, 142164710, 946513145, 626025918, 890502327, 456729879, 921471703, 889764153, 10834930, 550258959, 888111963, 456661896, 560525119, 254574198, 379302005, 359197537, 748972811, 432885247, 174603143, 495215302, 304225805, 499574, 89067439, 956588800, 479903186, 900293862, 918419160, 874312513, 779518268, 750190343, 34999197, 204187488, 29703716, 310295240, 212734818, 705461990, 880565621, 542764103, 578132976, 871657196, 920555643, 635330221, 603836039, 905337022, 446003049, 531829391, 914627500, 109964459, 793773872, 883594493, 588890899, 761763418, 850946563, 47045637, 406265955, 398330580, 175033998, 98562597, 74022406, 109783010, 888406279, 62923507, 851720727, 920064661, 659715101, 731241623, 740764931, 68490942, 26861674, 832409630, 156628069, 65837301, 277330611, 504531610, 621094682, 513712789, 824543274, 863846088, 522929299, 50674845, 205053841, 391074024, 703020653, 598865065, 977680558, 126857946, 571772915, 596794646, 195429545, 328266420, 36051456, 451216030, 522276964, 948367998, 561406981, 389510759, 585943971, 108053297, 459413669, 288907310, 136029766, 802792879, 520247265, 414339912, 337619243, 597859489, 40005835, 350918, 321070418, 199829979, 141119131, 515535428, 350920730, 314377413, 808898947, 900198037, 799762368, 570476717, 244997759, 402733111, 626061442, 103647198, 938528989, 898060580, 652361018, 641847472, 149112119, 134262079, 887185896, 606038263, 859408453, 950373236, 692335861, 405660442, 565431386, 959094106, 393940636, 423632434, 612413824, 143336067, 663257107, 9730523, 471491852, 112828340, 936303905, 998673093, 55233966, 416039620, 144081002, 565258672, 539355694, 202448366, 14002378, 539019751, 307827209, 288622328, 788194350, 570120788, 965430343, 472467292}; int n, k; cin >> n >> k; if (k & 1) { assert(false); cout << 0 << '\n'; return 0; } int idx = 0; REP(i, n - 1) idx += sz[i]; idx += k / 2; cout << ans[idx] % MOD << '\n'; return 0; }
#include <bits/stdc++.h> using namespace std; #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define REP(i, n) FOR(i, 0, n) const int MOD = 1000000007; int main() { // freopen("input.txt", "r", stdin); vector<int> sz{1, 2, 3, 5, 7, 10, 13, 17, 21, 26, 31, 37, 43, 50, 57, 65, 73, 82, 91, 101, 111, 122, 133, 145, 157, 170, 183, 197, 211, 226, 241, 257, 273, 290, 307, 325, 343, 362, 381, 401, 421, 442, 463, 485, 507, 530, 553, 577, 601, 626}; vector<long long> ans{ 1, 1, 1, 1, 2, 3, 1, 3, 7, 9, 4, 1, 4, 12, 24, 35, 24, 20, 1, 5, 18, 46, 93, 137, 148, 136, 100, 36, 1, 6, 25, 76, 187, 366, 591, 744, 884, 832, 716, 360, 252, 1, 7, 33, 115, 327, 765, 1523, 2553, 3696, 4852, 5708, 5892, 5452, 4212, 2844, 1764, 576, 1, 8, 42, 164, 524, 1400, 3226, 6436, 11323, 17640, 25472, 33280, 40520, 44240, 45512, 40608, 35496, 25632, 18108, 8064, 5184, 1, 9, 52, 224, 790, 2350, 6072, 13768, 27821, 50461, 83420, 127840, 182256, 242272, 301648, 350864, 382576, 389232, 373536, 332640, 273060, 208548, 136512, 81792, 46656, 14400, 1, 10, 63, 296, 1138, 3708, 10538, 26480, 59673, 121626, 226787, 390144, 628744, 949472, 1355952, 1826464, 2341600, 2833632, 3282464, 3584160, 3765600, 3719664, 3531924, 3093336, 2642364, 2010240, 1508544, 963072, 621504, 259200, 158400, 1, 11, 75, 381, 1582, 5582, 17222, 47194, 116457, 261163, 537459, 1022981, 1817652, 3040352, 4810720, 7230928, 10360160, 14178912, 18577792, 23327872, 28132048, 32571504, 36310464, 38903904, 40028724, 39552156, 37457388, 33941412, 29314944, 24179904, 18835776, 13777344, 9452736, 5716800, 3211200, 1742400, 518400, 1, 12, 88, 480, 2137, 8096, 26860, 79376, 211811, 515308, 1153268, 2391936, 4633331, 8438664, 14557048, 23874176, 37407760, 56117824, 80906752, 112162240, 150052400, 193572736, 241706624, 291576384, 341323776, 386160048, 424359540, 450394992, 464545584, 461528208, 446428476, 413557632, 373573440, 321120000, 268449408, 210332160, 162330624, 112550400, 77788800, 46540800, 28497600, 11404800, 6739200, 1, 13, 102, 594, 2819, 11391, 40344, 127508, 364587, 952559, 2293742, 5126898, 10710633, 21042989, 39117852, 69175664, 116857024, 189256368, 294745440, 442503456, 641759376, 900689616, 225195321, 617201401, 74227554, 586823330, 140227131, 711888699, 274217080, 795069832, 242715461, 585116357, 796764497, 861974465, 769155485, 525176285, 146566301, 650715556, 73773796, 455145195, 828946802, 226153586, 685663993, 216281593, 828705600, 536385600, 309484800, 166924800, 87609600, 25401600, 1, 14, 117, 724, 3645, 15626, 58741, 197280, 600215, 1671266, 4295107, 10259436, 22922995, 48184950, 95816051, 181136304, 327071752, 566117888, 942525072, 513281017, 349163810, 532145419, 154557773, 309226767, 88509354, 563257605, 789064441, 766807654, 474675580, 795689314, 599134613, 627066840, 658988947, 307608398, 337632800, 295701193, 44870369, 150212311, 705302359, 336038622, 452522163, 797367958, 62674553, 57993322, 777736994, 845298906, 452367755, 90655804, 810196653, 976943895, 564798323, 582118351, 994783972, 869862386, 697759993, 660441600, 381024000, 1, 15, 133, 871, 4633, 20979, 83313, 295803, 952299, 2809009, 7656027, 19414457, 46086247, 102967901, 217634463, 437195525, 838372452, 540635289, 722168530, 638311860, 640827391, 196046908, 898688562, 478199884, 793020369, 808862771, 562236075, 94791602, 385333320, 237794527, 197694759, 398043392, 504456766, 579736664, 78137089, 793367253, 961295251, 280517488, 179779783, 947563092, 901772777, 859566930, 199212409, 920781370, 362900807, 735004334, 297264154, 482748036, 653703312, 140400674, 623159781, 320434095, 373194802, 13313867, 205909676, 360223815, 570584277, 68075848, 372652149, 961247580, 23084534, 261139053, 151302323, 715359965, 625702393, 1, 16, 150, 1036, 5802, 27648, 115538, 431844, 1464468, 4554040, 13096378, 35069940, 87969166, 207781760, 464351910, 986188668, 998611836, 879505923, 237509223, 15110629, 621334822, 88677622, 257578542, 963016850, 235638961, 442107823, 429101453, 483004748, 329733855, 718448185, 266304376, 413950543, 256286771, 626720357, 318467482, 59069608, 81901162, 352730851, 104241055, 503595237, 956355036, 534522134, 457799859, 108929893, 887297322, 424614770, 265024591, 876853471, 515703045, 692038809, 210906163, 20070317, 468291405, 145357835, 797577421, 232358134, 747771239, 343859985, 833879609, 78548665, 289896769, 449285934, 313197004, 379603290, 397630660, 609910102, 442642726, 627950853, 722186028, 705163253, 998661511, 771071664, 636940611, 1, 17, 168, 1220, 7172, 35852, 157132, 616084, 2192506, 7159090, 21631676, 60902460, 160707468, 399489140, 939796228, 101060910, 481320121, 151453550, 952463061, 931694473, 957528293, 554162053, 990142499, 644946993, 651797781, 791594351, 556120466, 271969917, 107619398, 710253075, 280526462, 615698879, 99748930, 775178221, 257586036, 645364809, 806795120, 340635512, 801741075, 790520661, 68328385, 331513794, 351728404, 931812262, 91105169, 176869824, 445724501, 370449983, 359815736, 918724628, 869062973, 659791249, 657727222, 395793733, 32692523, 78858425, 151369211, 628504487, 842750087, 152091477, 889718876, 908002421, 944598446, 656459208, 712920845, 47550280, 92244967, 110652620, 951703750, 217822851, 901098263, 655149074, 861896271, 859184013, 992613245, 768042116, 807916959, 335381553, 909568095, 153171069, 827990317, 681893483, 1, 18, 187, 1424, 8764, 45832, 210072, 861400, 3206786, 10957868, 34666130, 102239488, 282743580, 736889224, 817936097, 262532028, 534038590, 412279142, 965109380, 86702267, 846482566, 945052509, 644517943, 548776024, 679330947, 152291502, 882910517, 188127435, 636778925, 902059202, 132531208, 193904122, 893705022, 246193070, 652079051, 958060250, 148697872, 504141990, 371410212, 807466717, 514477363, 565424570, 560794838, 11419155, 215137208, 665710713, 791504234, 359367396, 224050172, 509091270, 125989128, 782600310, 957126038, 667219607, 386301613, 605448653, 296557741, 618019404, 194294675, 222923480, 765962783, 743934970, 24324611, 512643153, 214242880, 286900578, 228877964, 91240846, 430467141, 533029377, 904804693, 373207899, 916503101, 83598539, 560288494, 363356684, 68282446, 152683809, 284461190, 124425011, 167972327, 428909487, 373215034, 420008537, 513304383, 874743039, 487193257, 97337408, 532639641, 184378261, 955976093, 1, 19, 207, 1649, 10600, 57852, 276620, 1183172, 4595034, 16384606, 54107670, 166643130, 481442164, 311240781, 381378831, 288429444, 380463632, 370477330, 171662912, 688513797, 626045604, 789881798, 844990830, 70546834, 230422087, 267733218, 970080423, 75064762, 104073936, 888990608, 393490487, 819401315, 362017415, 197941501, 97730360, 491049732, 790022455, 142301163, 381999002, 81566974, 255547256, 500580164, 503785886, 874661360, 953064009, 357278689, 416715628, 656421867, 311332859, 849655408, 575613107, 850236831, 533549113, 255339339, 611845477, 501164398, 135987981, 672393680, 678611757, 552403430, 470027818, 333312311, 203812034, 929380798, 133842121, 497262544, 839881753, 29703780, 133717366, 249364505, 959337844, 632980495, 72879056, 356819838, 662140760, 182352973, 260787823, 329159184, 423643610, 488600943, 164109163, 8143787, 184454683, 684285006, 693158498, 382122550, 488552031, 777204359, 564238497, 598675373, 603916585, 720234840, 93182262, 238936257, 486420235, 352604922, 958291193, 880928218, 736558676, 163545641, 189347824, 1, 20, 228, 1896, 12703, 72200, 359348, 1599616, 6465450, 23997032, 82508708, 264654080, 796563486, 260832418, 76986106, 528774007, 854313906, 307546108, 722735109, 61004626, 805619536, 18191861, 511411798, 993782454, 401030744, 633897378, 70862649, 96855526, 314416445, 92910833, 135520920, 492052755, 24334887, 643976444, 574388511, 317610455, 122930943, 637889505, 255461238, 950861369, 48876234, 149504663, 198682481, 942670278, 866921314, 563621302, 960474580, 980132644, 624295523, 399490883, 351714973, 945626033, 827908349, 157456205, 481861323, 472454109, 343580291, 683697065, 95059407, 841332348, 464714941, 596887160, 38681949, 757883329, 590303711, 64921694, 730086270, 15240461, 714742087, 32874447, 175996750, 277466516, 788882909, 11880203, 95097385, 778398376, 531252352, 479554466, 557013590, 609738833, 798714176, 859324339, 721484640, 268442938, 861267595, 806087188, 31691029, 950412807, 580575404, 849451646, 691790951, 264837637, 967322620, 365040170, 622467624, 456436788, 658680316, 60575186, 387550026, 215002020, 31349904, 449373833, 559514745, 640364153, 807042078, 450172023, 562637973, 109112418, 545193132, 195217263, 976304283, 1, 21, 250, 2166, 15097, 89189, 461164, 2132144, 8950214, 34503182, 123236828, 410729140, 284813823, 790835929, 594736274, 153822108, 374418504, 157537842, 147846917, 133568389, 483576696, 508616649, 656867821, 84463125, 640047601, 955370715, 182167616, 49108700, 229345632, 795610484, 502493987, 857101031, 142485158, 996679960, 742503997, 723858587, 317526153, 365342533, 250775491, 442738912, 408346120, 881242865, 135363327, 231979623, 347291745, 824934645, 995772018, 164592917, 354883487, 450805745, 963969802, 171006181, 92161176, 169883419, 961669090, 26844445, 393784092, 571606470, 464707158, 34144520, 652396373, 745405475, 202923498, 135935314, 703695236, 776259115, 48310283, 874186699, 219390686, 510394758, 751965065, 418424556, 8781061, 736058807, 674014147, 674780706, 590530540, 4352977, 803825827, 167292329, 541083402, 260679638, 665083995, 939990721, 816665296, 886017767, 669822229, 694816125, 643235536, 937314556, 115942268, 261159535, 687177905, 12245758, 694615643, 977706180, 217949106, 118952653, 898868241, 856650616, 42954342, 330321980, 535121720, 982503521, 719423135, 714354007, 18745970, 333448882, 302037622, 935654015, 778423936, 317991952, 284756555, 504736970, 155871365, 118263505, 797065125, 640838446, 258037348, 34344762, 502389803, 911086550, 1, 22, 273, 2460, 17807, 109158, 585339, 2805752, 12209406, 48792492, 180680070, 624410736, 25734764, 199973794, 977710523, 571365953, 412869707, 328237414, 214863466, 633048751, 257394955, 317735309, 673309005, 193600985, 704135816, 514918834, 650479735, 33606857, 490034801, 698396427, 67986999, 220797055, 218864611, 931163713, 940790978, 675674698, 85542051, 543018292, 61247584, 910803604, 831296179, 923943160, 89478028, 104500393, 161998091, 254912705, 539249258, 547749719, 357852173, 690014841, 206926249, 893887199, 747112232, 382059625, 148865046, 301618706, 260333115, 442306036, 247371284, 782005651, 233300621, 920894203, 317455792, 678639547, 427050277, 482884001, 854060466, 980543322, 860769666, 701293636, 771136168, 670745480, 486701027, 168461356, 848787800, 289825171, 498776317, 33320170, 430165721, 821516580, 115533370, 398776967, 333310602, 563097053, 553134182, 219816464, 216637272, 206027601, 933677337, 925510467, 267639197, 43693887, 486722546, 270929495, 877730912, 261947307, 375318068, 692508932, 989184491, 226696206, 288508969, 739837562, 849035543, 782296408, 273955665, 801085382, 431898190, 935043965, 202752072, 867866169, 151133676, 67940990, 78118516, 742654574, 165553271, 254022475, 668960857, 929973305, 656759571, 877339826, 925206924, 133648890, 623964326, 796176354, 256442424, 844384225, 955053908, 35821657, 33969824, 328610099, 171474448, 265634834, 954990510, 1, 23, 297, 2779, 20859, 132473, 735535, 3649437, 16435370, 67971642, 260491974, 931772466, 129241853, 915880695, 773220207, 21124907, 663657824, 89235883, 562087424, 395633225, 79602143, 818737728, 503346111, 923762587, 810187543, 71950684, 872552891, 722894374, 788701216, 792043650, 839896539, 577542972, 345484502, 350106805, 159630680, 594479078, 806985602, 451202244, 562057157, 345406448, 404888318, 371479292, 122121086, 196184273, 855722413, 625056343, 209132008, 580725504, 234791519, 683270249, 879431955, 820639155, 890517789, 877206124, 780147370, 943542736, 532169988, 134361777, 389279830, 486085405, 212150153, 60309713, 36144061, 220641769, 167907687, 433032241, 672669299, 4840381, 543970499, 860603358, 920463673, 899153827, 269139419, 99866794, 833550296, 732963165, 649634036, 220976898, 948879986, 81746947, 249278044, 943429751, 227240067, 617290217, 857759442, 317672542, 702411387, 392102340, 598392406, 771484657, 20769431, 772211314, 777981688, 103043307, 336611982, 922346108, 46010568, 620920750, 740298345, 143296430, 127113300, 229361025, 452883985, 298773134, 583669967, 430943791, 878469881, 498554889, 377075156, 399618101, 518539100, 610655946, 762624102, 339746521, 193491143, 582788075, 58498274, 139175929, 439487543, 659039143, 969039085, 205473123, 149794944, 735361805, 144310487, 952281582, 885994682, 290034640, 449859219, 870975475, 717604104, 930837761, 466542500, 510501275, 368063612, 61813298, 959329905, 938922014, 660077190, 12025968, 335011033, 657136343, 351072920, 964781583, 196462283, 1, 24, 322, 3124, 24280, 159528, 915834, 4696644, 21857553, 93405656, 369882084, 367190881, 745178532, 541448535, 237690972, 408537702, 191376116, 678513161, 493570976, 397907192, 9101765, 658714208, 122356973, 514532531, 911169029, 6916896, 782796, 910119724, 942560918, 62371227, 773940129, 523667340, 669757203, 42568262, 891666384, 467022993, 486796667, 727294526, 413613585, 787453753, 599953158, 417187968, 359849625, 117069116, 879478181, 12380000, 910899870, 838986319, 102687453, 103327364, 376800830, 429223538, 780159138, 706916356, 587575355, 971169352, 36010810, 483798044, 344462034, 787276711, 359714668, 737585540, 514856433, 506547585, 7966248, 935961, 931790046, 725219981, 437246235, 737823353, 539625329, 101294921, 998345360, 158678756, 14552916, 434899855, 58679632, 771567929, 908041362, 370603042, 958461645, 473954165, 329932246, 645017860, 950250115, 632956030, 39737256, 308287817, 593859369, 848980890, 73354610, 67983312, 794665532, 744501399, 571146358, 79777328, 768540650, 301591668, 87146707, 749547055, 542914952, 113807115, 981646049, 443442346, 689844336, 226785366, 664441023, 644644459, 65534356, 186334852, 433121661, 818953887, 687026114, 344822747, 464015963, 110899493, 294091084, 65199948, 37449794, 719226153, 501099656, 413337315, 725255533, 799293560, 259962068, 954615054, 373654234, 764439094, 914044890, 22085466, 539035590, 698634111, 313016212, 98993468, 941478268, 955683335, 902077766, 420565422, 767959775, 128648986, 355285226, 534029655, 104714136, 932643222, 778200211, 56428536, 225880543, 792355687, 449940761, 181471652, 529937629, 325235521, 6575392, 94094707, 441392085, 37264955, 911557047, 1, 25, 348, 3496, 28098, 190746, 1130768, 5985744, 28747851, 126764795, 517958180, 975500521, 75313899, 914923483, 611051644, 458281681, 932346365, 712529240, 185024083, 463834094, 950836649, 286357381, 871292163, 434939852, 58330077, 629835295, 27932676, 66354549, 10923173, 590226200, 526183672, 176005584, 809584977, 222348292, 260397896, 396327746, 178971085, 774808076, 78650222, 507195902, 144802453, 299847298, 581537053, 724817078, 350425193, 503589319, 654904119, 595937600, 992781673, 82554146, 868891604, 769490422, 119334199, 287573489, 85347169, 118147346, 949694675, 540939467, 927324362, 545027201, 610310429, 769058023, 21423, 262519735, 786795808, 240407039, 428554518, 447092428, 788617633, 367724192, 374279457, 343082569, 856162651, 150954733, 962857235, 700751807, 895999415, 533537747, 537990547, 268357366, 869434038, 633081543, 603452058, 947934680, 987367826, 743179254, 710352935, 835787228, 706586787, 845202323, 238777269, 405136472, 480736674, 155194042, 871452828, 677921910, 616952227, 984554304, 602482844, 894952109, 161534829, 782737895, 850072208, 670793244, 828100052, 222399146, 284700626, 231919567, 306545173, 673216888, 772842480, 314744315, 347738200, 25002680, 730048408, 649455506, 745857274, 196252843, 529935260, 419302767, 276709210, 732855171, 343508231, 624945362, 861002432, 484757974, 367927715, 209929226, 661865936, 531107025, 413469524, 479519565, 741904536, 610072165, 606639245, 934344602, 716197790, 587584177, 185414563, 306822687, 841034662, 971868532, 919896238, 158358640, 773475266, 936203252, 665923149, 911486615, 197651366, 774528535, 82937079, 883806524, 130206852, 774201811, 995994000, 245370199, 842572718, 793423605, 740588350, 687616120, 657690139, 857790226, 37323118, 88399209, 523321086, 117621631, 71036645, 222192424, 788926021, 202125596, 1, 26, 375, 3896, 32342, 226580, 1385350, 7560544, 37426495, 170077814, 716127109, 814596482, 388283574, 187079164, 480126707, 290089727, 38629756, 54115650, 64891257, 901599546, 718222041, 911275669, 323565019, 817912019, 805459451, 803612364, 201797073, 732830955, 80380678, 23464457, 701195891, 272214917, 913862649, 132026200, 669751010, 759341231, 973676755, 794065196, 967438659, 308299894, 10712690, 949669597, 781686555, 88559004, 727530543, 318751597, 278470531, 434911202, 804701133, 324324750, 981099143, 232682614, 987104568, 776649739, 786487389, 442468777, 569068005, 663709268, 881510700, 203686642, 57967683, 568729400, 236001193, 623959074, 703861418, 908672716, 70204475, 867825588, 827103298, 241630317, 362696969, 415618616, 805038660, 598704556, 10082872, 643477587, 415164213, 703084166, 477367476, 20036406, 629980785, 802614294, 952521645, 17601466, 311433959, 830294700, 548394039, 535645146, 521413012, 929141249, 283365227, 727229980, 443388093, 410708269, 286618040, 319768543, 938841603, 93475597, 394693465, 931196821, 495806189, 902879580, 707905623, 303901454, 576396872, 484544924, 486011674, 564305854, 311518869, 856442237, 372745088, 366968335, 813470622, 720542245, 551543931, 596748971, 778551123, 354920979, 984250497, 691689872, 327423759, 52302396, 920309409, 457393341, 162758194, 401889329, 760192486, 361045291, 58998809, 845800809, 8575285, 649668894, 501939170, 542308042, 574502757, 192463535, 690505425, 204738512, 689813836, 483570629, 525148782, 216925832, 952334594, 68584858, 946061868, 229986068, 113082103, 705545851, 563504064, 430610853, 209937938, 608555345, 578039088, 750439353, 944169681, 417934823, 74422181, 960090808, 568355902, 435674968, 894299009, 15861008, 618713868, 509911155, 168869978, 339481775, 369451744, 600513141, 71634326, 781507214, 857107917, 106564183, 736233715, 362800524, 615467708, 519437498, 342065337, 206666492, 505918934, 308299385, 20927738, 106279730, 457391057, 1, 27, 403, 4325, 37042, 267514, 1685106, 9470830, 48268511, 225792189, 978561725, 958557158, 38052071, 919433401, 254995547, 546697380, 704487939, 32839999, 508901654, 551556389, 663564198, 695178769, 814009554, 547143595, 371559020, 945387943, 670094820, 616330760, 976064124, 607380120, 8699769, 998280938, 580008436, 958036252, 912203574, 544195790, 396609897, 954428754, 708902921, 801338681, 431017191, 381717232, 344144422, 131861617, 874277396, 830300192, 596462835, 318671397, 244894238, 904557382, 834593756, 283869037, 697514761, 969250693, 509524190, 913260759, 384371901, 692021356, 509945770, 32685910, 505430483, 907189201, 193340383, 693205397, 603006308, 305262013, 925218957, 968092842, 27052064, 47727228, 477199307, 293774777, 98292616, 663047137, 995897620, 288543890, 998081856, 524487172, 892499155, 556044593, 972323813, 578208602, 933674462, 509188659, 985492681, 986901126, 628028841, 519717277, 311965185, 897395442, 829761538, 9680527, 161715155, 343759581, 402616197, 861303980, 911400557, 358697993, 515548395, 553147014, 892738525, 205604013, 762111690, 442223169, 7841804, 517369986, 84729818, 152655938, 700957258, 898706126, 75157861, 271201265, 543855670, 440588279, 204308612, 236683234, 208667572, 404506592, 809547310, 853106482, 518815458, 16491026, 491832633, 360120645, 923872102, 602086347, 641452842, 18221609, 229080666, 428455406, 569262655, 856993308, 230900297, 490066099, 367669571, 96292417, 52365382, 469261002, 374633464, 900617667, 182287939, 49700390, 796588976, 949085023, 222503562, 658471212, 94278399, 66098044, 72459139, 603916441, 257635815, 234793049, 951525459, 549173423, 938321308, 13662267, 288258509, 65326301, 11071916, 364716823, 929353581, 839483911, 199241395, 29486252, 482468148, 829994735, 370892643, 687560607, 531658704, 568187724, 486108828, 475403750, 227529481, 124500798, 228110006, 56292488, 958873404, 963718586, 481659835, 183136868, 593123751, 622015148, 469053734, 211587807, 928091671, 481375722, 612130911, 134707706, 334981252, 784422204, 712253942, 698883770, 390222722, 25478322, 28778175, 349558455, 616616543, 1, 28, 432, 4784, 42229, 314064, 2036108, 11772944, 61710789, 296841956, 322742117, 501368237, 486564198, 208215103, 787564548, 236938424, 301578523, 866593178, 461034739, 153403692, 741061604, 268366308, 41671958, 999969805, 820629183, 540097933, 348143198, 290585123, 709901036, 830657214, 397773343, 205345230, 80836479, 744283025, 767371096, 13280133, 166091858, 688213267, 405245759, 999129285, 957885801, 125598090, 229197648, 232621259, 771781842, 15692966, 623498734, 209019752, 451480479, 405116698, 905232949, 522429827, 160392239, 911337480, 463779522, 870625842, 997849245, 364479050, 834828, 300785526, 10186705, 265101999, 566806573, 614983712, 685595755, 48653250, 344390997, 673637797, 896886255, 108856368, 31386606, 486989879, 489263782, 517653845, 976993581, 117774221, 829510874, 294191687, 233225993, 831800739, 448583977, 657291524, 649603801, 456575978, 536862581, 855051723, 994222346, 302476269, 502749737, 322446053, 790323255, 357338908, 887312147, 181428924, 536100952, 55330164, 160205355, 190454705, 365581727, 201998030, 826748536, 400273437, 624522779, 849319472, 800147953, 80982274, 447705256, 168185200, 97822479, 309878269, 678607548, 912097410, 927785144, 334246635, 662138658, 715198385, 260363473, 461374975, 89468114, 651175074, 575096135, 130470890, 71518840, 879845193, 486812125, 128678982, 647847215, 49005945, 59417027, 550597313, 85275582, 589669875, 488581288, 579391253, 238935007, 307933774, 801626662, 991248834, 831660242, 2289249, 939337934, 170802252, 112167473, 712496239, 45742853, 482400666, 341362938, 957391891, 147812751, 376451585, 832724562, 418101830, 38563919, 274362964, 819817184, 400041713, 313141267, 806456583, 999307614, 670677205, 585839782, 845991536, 831623045, 109161241, 554327240, 822718306, 173814042, 363700239, 22366070, 479904205, 190929878, 554951008, 774006606, 279182950, 109357938, 401823952, 575672540, 860574847, 593910748, 547825741, 217594637, 989467389, 184852185, 331539318, 325720467, 383229710, 654245987, 146654996, 209385163, 560462909, 965812836, 65583448, 508391947, 709539829, 955465325, 214525022, 394005813, 531700924, 773028650, 417539579, 326670161, 406612199, 165245, 699092510, 550837077, 14964582, 527720684, 440459594, 268905155, 297293091, 881879628, 1, 29, 462, 5274, 47935, 366779, 2445008, 14530396, 78259797, 386723841, 770080067, 561338901, 331351593, 839635833, 167817400, 497149119, 881282118, 352201610, 471630724, 181160121, 88806794, 987377178, 289689361, 946592969, 656979867, 594487341, 196240769, 948508749, 810784209, 709855728, 576276359, 518417791, 87667236, 667014934, 181628700, 79050911, 337053925, 373883684, 560120551, 458872893, 815731972, 827954345, 771964062, 380463298, 190074568, 335845313, 308369049, 297128477, 730684746, 742600059, 263592454, 96421517, 206168581, 306386280, 238588046, 136275025, 509837233, 285349782, 467079296, 44733505, 132275281, 829959933, 391862643, 62600608, 253168338, 426879146, 365435454, 91732486, 471304236, 543190875, 798110387, 894371900, 696428631, 750022470, 726550236, 936549828, 542410178, 939184541, 791578453, 983635297, 823881369, 150676558, 585328209, 653882077, 963087655, 950795211, 936066317, 71868369, 440124326, 965151462, 175368387, 40663323, 699428294, 108367130, 332044307, 970432796, 572024201, 885659377, 539317691, 132218646, 139253073, 467726930, 45351751, 297376822, 508633325, 703469419, 746467332, 503668629, 112630766, 930570931, 962347630, 576196343, 698904389, 167199167, 333129737, 608922442, 222067115, 688206452, 802821275, 954540394, 911151138, 906746447, 902608727, 890863920, 307268385, 54404696, 104370759, 495676754, 441341576, 829087999, 88911607, 975336543, 381836343, 298727399, 758323163, 709721214, 146811076, 322114121, 909574264, 955852236, 803216000, 511491931, 157225317, 671670053, 367885171, 612666342, 842261160, 508147005, 345029386, 809990068, 981225972, 241279545, 458275632, 172983843, 48836190, 961296645, 538132589, 271432367, 877708377, 386417805, 815731556, 463571419, 404450924, 113136747, 549319603, 219464194, 220054123, 907114544, 328856175, 265047793, 589592614, 328159953, 809008569, 510434161, 420313068, 107873733, 868895119, 895337042, 156863206, 48004547, 666506430, 727609186, 85858741, 59205240, 78940637, 545962715, 139572749, 421355881, 858507471, 952603331, 401020118, 942925111, 296295597, 997986384, 115737481, 677010850, 282276283, 274892540, 163700485, 118592549, 846472792, 136765224, 236032397, 179431589, 539549211, 214067143, 923131121, 999465547, 232088789, 610013691, 896204760, 478686995, 218989077, 91096939, 221616643, 243944261, 454787573, 542927414, 355318220, 147354818, 482630, 675619041, 634351197, 478341164, 574509037, 738721209, 1, 30, 493, 5796, 54193, 426242, 2919073, 17814512, 98499977, 499582398, 346636279, 286311246, 338970899, 482987014, 740494022, 522312682, 389124982, 438269373, 295660905, 384589942, 269003911, 190728878, 21841107, 394443500, 159301748, 885681179, 869073529, 396029106, 969827087, 16747334, 474716791, 259235367, 753984455, 365768194, 423375006, 957390875, 407261764, 592999097, 928039310, 529328158, 133251022, 533719572, 434981329, 779487889, 212784950, 467080112, 287628298, 91658981, 576061624, 322787361, 682746649, 234833733, 676878118, 220869554, 982232103, 879428014, 742840902, 65876039, 230084790, 68776407, 988541480, 113769367, 288661011, 898604342, 790158821, 811679832, 416532461, 643426286, 357304561, 904850873, 143689492, 643378934, 217587561, 816799579, 741653213, 950522177, 519192837, 195766899, 875531753, 913462122, 931740864, 147485151, 73473743, 881407231, 943949423, 19375017, 95185407, 658198820, 654223830, 78841384, 487272636, 810454297, 156111172, 108214345, 594083015, 721613382, 413639222, 199581479, 219296986, 983776208, 50034813, 434669652, 336761553, 553659069, 443256837, 867959007, 649693919, 829394710, 511124003, 801382432, 809258820, 440312724, 549557631, 57091967, 619973166, 38255131, 989252595, 296849831, 126449228, 992478958, 948085171, 398912012, 308493194, 585304989, 581850817, 704472537, 457658359, 706849064, 974235300, 322942033, 801441410, 806760539, 930211369, 674605925, 140615032, 804334982, 654022727, 747554604, 304695097, 670935186, 973200118, 899755340, 43016718, 33443894, 486649937, 183173093, 28680647, 612676891, 17478829, 208078434, 467131016, 651933212, 464433186, 3993644, 959280435, 310671435, 524438940, 540166082, 143663989, 984026973, 596317769, 299039541, 925611762, 115137245, 238184581, 798462400, 902062936, 499673997, 696053154, 121959061, 376644235, 378356623, 996412950, 115590297, 517087995, 817795384, 731733847, 61225249, 930096903, 292653780, 149516053, 503527083, 233497811, 781589564, 87992011, 514696635, 495015483, 151617728, 478098704, 773499685, 621536652, 787266199, 440325002, 249898342, 747360642, 671517137, 216648293, 686506084, 544204132, 949750238, 249236969, 319054830, 756596931, 233403453, 594672369, 158463779, 809106181, 249481644, 610711719, 262167344, 179138909, 270160113, 278492510, 490828032, 946977816, 803242084, 541036271, 624688984, 204404014, 881539240, 779609382, 561095932, 524976628, 888316278, 139701497, 712146362, 413036824, 810411985, 241441787, 247390036, 695355554, 122993697, 227371919, 399947791, 833892197, 899399938, 781528108, 656359733, 551706967, 845829828, 900357325, 1, 31, 525, 6351, 61037, 493071, 3466221, 21705119, 123102861, 640304911, 83941000, 859775332, 485271727, 929183599, 393442380, 976105677, 287805815, 238271867, 74391877, 765979021, 335546599, 709265303, 808915958, 907593582, 463983041, 147572225, 888153362, 391439968, 221443415, 801779213, 245226914, 866175931, 810047153, 267980729, 805674759, 955321032, 906824500, 367243333, 486256638, 145115859, 530769671, 290945081, 932311137, 51068986, 807551107, 185085629, 261181005, 959829857, 118218336, 295880881, 506261294, 848742193, 936582961, 153400705, 578662225, 341741810, 161659811, 816049772, 839223846, 559301757, 400427189, 216771109, 207016492, 505237766, 795055758, 945605740, 555992642, 907845643, 982951177, 401043526, 597396374, 84431994, 362552441, 746539639, 303946121, 357484364, 893505269, 526515449, 560103044, 121894895, 445706213, 592793631, 713670463, 810676671, 143889731, 392244416, 73126772, 488568958, 542583029, 752584772, 7383345, 155007498, 994039957, 804821801, 379264833, 525210782, 239847467, 126254398, 219331239, 753237922, 434345445, 635807399, 872366121, 133933893, 590603804, 32230684, 70841222, 840236255, 909722819, 689521789, 529248821, 178846494, 980363222, 548654005, 434479841, 697553680, 35011089, 544881135, 260563063, 695816358, 44173506, 726085055, 671716390, 781464159, 450226987, 146813053, 877951734, 991641337, 221699230, 419417817, 794832550, 810418558, 969705412, 219055178, 274301546, 503413612, 695160244, 74090275, 26176299, 695070748, 341801549, 897892431, 470380437, 3467372, 448525308, 439337134, 724845391, 9187155, 585558376, 372261444, 277930003, 34819054, 431482585, 279947765, 492267585, 818516372, 484582901, 390623889, 856573701, 179325546, 611189228, 688765384, 847931848, 534263758, 557397045, 116495491, 85868985, 610969731, 478650084, 585159686, 14772190, 776211983, 474268574, 460744792, 134988124, 912707317, 105964987, 809266690, 785401545, 161419686, 653370610, 499797235, 534961655, 323936668, 802659551, 370287438, 326963010, 342959476, 313044094, 148582386, 976795271, 120954501, 724957759, 860215558, 270001726, 640931921, 833230238, 701256342, 242231076, 286286219, 13632467, 253663042, 129411109, 603714672, 564008356, 523901279, 216864213, 524434304, 182659511, 983267072, 644616701, 707181007, 618980658, 405751838, 571460922, 136629759, 744395053, 539608518, 963053644, 97893406, 866038338, 265757870, 944699732, 964525924, 892464175, 168006507, 562926324, 742708490, 132927348, 526909479, 79557205, 129052432, 157042523, 659309142, 834183171, 802572815, 517259737, 256356803, 353227137, 87135975, 224995979, 596580540, 402931204, 515099940, 793833445, 691900231, 589149123, 114327507, 887760880, 389703467, 830251700, 783657579, 433484966, 412892473, 432995349, 911076886, 112628181, 1, 32, 558, 6940, 68502, 567920, 4095058, 26291268, 152836946, 814626856, 19929138, 508014078, 3627542, 383619686, 178749032, 257695016, 714018516, 472708243, 782289684, 785010736, 673452130, 967313791, 416615851, 594708501, 823838568, 374885539, 520875465, 462873691, 866641568, 110422771, 371334024, 597629306, 954905318, 192386746, 711820060, 202869372, 886359460, 670157944, 884126969, 502946720, 582271977, 402610790, 343533084, 511648372, 517557636, 170605372, 597697292, 829559995, 983984749, 601678152, 265076525, 200313780, 586898347, 936910249, 473920775, 97417050, 844866738, 973357211, 106398807, 531568235, 220592830, 72245680, 709223174, 966562898, 364453034, 204299565, 516186616, 388239153, 70201813, 72763421, 794896998, 14537122, 759848271, 370782607, 723372604, 610938893, 161728308, 212501210, 376508968, 271352258, 323852567, 552136716, 801650724, 615740271, 208656790, 224034222, 747809272, 617340476, 153891047, 285642015, 901118362, 123777425, 16228193, 623027527, 937436377, 60747289, 714381298, 882770713, 15381170, 999192137, 197256049, 480638655, 953137460, 883599778, 148656904, 722191509, 39402136, 582147050, 757441169, 260428827, 253172482, 508174417, 834955862, 157349819, 261175551, 247577251, 264652493, 595186522, 812752039, 875384578, 747313263, 224431706, 462673707, 39074204, 237357876, 896371707, 361524710, 10299862, 761952483, 924315000, 304463541, 831385606, 228637562, 845205390, 599099308, 177524018, 209006125, 256908838, 355221513, 792061054, 713446694, 397486564, 756107839, 527866716, 337624854, 575430320, 456754471, 959728018, 921786900, 102983773, 936936381, 473475121, 131588049, 189268154, 863126769, 700571091, 871530822, 832046604, 609629520, 45186676, 853387560, 464311797, 368430192, 151536782, 691919878, 176735598, 972465597, 804610607, 50289062, 722819065, 20410813, 11987321, 648373171, 889715409, 778512390, 280809979, 767453391, 155472064, 275305459, 296611231, 377220752, 229158487, 259857310, 987705391, 873889855, 448418244, 657467052, 301028637, 400332864, 304525446, 853531448, 201469133, 757430782, 288842043, 292821474, 389580374, 148645279, 450672899, 404696472, 399758661, 549392647, 972607841, 459482261, 344863732, 405989209, 14412475, 913865943, 988039851, 302203080, 293916756, 28383491, 502818531, 791480646, 619991127, 151573496, 311251301, 362738947, 457688580, 884177111, 390413172, 889218635, 530910268, 818241216, 542232757, 765042883, 885001834, 10229128, 574524301, 836418812, 984923781, 235783687, 868003012, 379478756, 832878398, 751487743, 496700139, 587857943, 624473538, 510088706, 778144708, 214176553, 953029206, 646822434, 252787767, 281229254, 401166205, 434753895, 343430684, 941989547, 465870277, 861407908, 387687010, 216509894, 375279811, 453878600, 982073623, 677731113, 95924240, 198468867, 861679672, 204003039, 472066136, 228890861, 880462406, 133638984, 924365283, 274136081, 742318625, 898640542, 85174164, 775817726, 982947180, 716729952, 1, 33, 592, 7564, 76624, 651480, 4814916, 31671996, 188578368, 29248753, 200002145, 508415428, 442411092, 823607844, 339155380, 84465338, 814093820, 347929398, 722645092, 146033429, 312847170, 460125097, 915837300, 530134554, 683613860, 22911398, 950166343, 297700883, 874171812, 779302544, 705201416, 91735442, 764568060, 448540109, 794383951, 50664826, 501387621, 764478731, 392332791, 697065547, 136584719, 904822171, 811342153, 498086442, 66346910, 903864157, 648069920, 294527566, 68277872, 192952288, 465503414, 89641650, 342876181, 975687654, 849073744, 732768838, 299144725, 960087859, 432060633, 521050995, 669642411, 783220798, 964761936, 888496451, 578822675, 774117896, 595815330, 556187991, 328078421, 497539038, 461150544, 593197759, 454579240, 228665398, 675695769, 189021504, 506127036, 683711210, 767254008, 372876392, 950363733, 781425867, 518441353, 618578159, 210702480, 146366158, 211092828, 25645664, 252569415, 768287264, 315751220, 46304131, 875313001, 63062094, 41563387, 521548621, 882111752, 325592507, 674715724, 754661696, 386558110, 154963091, 238088464, 48050421, 639662963, 70331570, 315682289, 290604457, 553625701, 114470501, 286499320, 302628334, 934963054, 90280656, 946037777, 701374947, 21339121, 663053978, 944685826, 452543047, 117230904, 560747251, 199227363, 16627409, 318622953, 147892287, 924956445, 813803967, 785002825, 524657750, 94619872, 228326183, 399365341, 370689535, 675442405, 908504726, 873312142, 624281896, 910865167, 214431914, 356568789, 649815619, 48684312, 203060656, 723151845, 388405201, 798060040, 729614446, 977682164, 533436928, 146813819, 149571082, 895803037, 777214043, 552248021, 204656845, 982800841, 733286978, 63964308, 481147156, 389291330, 76639625, 311176854, 441157810, 671041225, 83215916, 462900391, 792922861, 933493638, 911064426, 640299582, 658369868, 816565473, 95242536, 385493380, 848295064, 737403618, 437312030, 117969370, 718173112, 995019578, 309321859, 756181744, 40101942, 426476878, 702396178, 795715493, 835764511, 743326504, 209546865, 430615231, 826070511, 334341237, 118979238, 371120144, 839568659, 676120384, 72519, 845333099, 357629799, 910834209, 593346831, 104377605, 380654497, 634970517, 115890735, 793059350, 887063630, 651636452, 507749972, 783577804, 143656503, 242083869, 911105370, 970085702, 524972130, 465698950, 325374351, 536364599, 196104291, 139239152, 633851401, 256158579, 919175466, 894613648, 315818683, 5141779, 876022828, 934709255, 681050535, 191918360, 662583345, 207316521, 848780031, 272975543, 702356884, 769886013, 961041057, 6500208, 70262300, 494310602, 739703998, 384177576, 343193798, 693062586, 969762392, 66952659, 685150241, 630304511, 413041585, 515441116, 191001103, 912006289, 473846745, 605301455, 795067847, 856671001, 508821454, 735406667, 258084054, 117733205, 780290039, 23367661, 593944851, 692132515, 4650353, 187487602, 151055135, 898863554, 673507355, 215091232, 603704193, 594167428, 682519378, 496434131, 965159536, 430378180, 248402836, 470772870, 307340881, 347656961, 749714755, 122062081, 558277910, 169666679, 941915597, 277380477, 270070849, 652088255, 549544085, 1, 34, 627, 8224, 85440, 744480, 5635892, 37957128, 231322416, 291965329, 678229698, 199102832, 733159273, 432255582, 825398987, 945721657, 530531857, 605903605, 198451639, 405128341, 881104650, 95712824, 87475937, 88052462, 854657880, 671362129, 345256719, 279913923, 405600244, 791623773, 184158289, 548244621, 559931899, 811302745, 822463013, 829884052, 612803610, 114370483, 717655175, 250670751, 158660853, 996989593, 922821653, 403693850, 640224917, 726696528, 558324649, 504260316, 457498775, 235424755, 214797729, 595578763, 703649058, 668639597, 273743575, 830864733, 8621856, 152359528, 351252345, 54682531, 631863641, 533130514, 548187372, 212107229, 690348600, 269650465, 644636821, 588449397, 716956418, 569059993, 571818753, 620732748, 238441683, 628780105, 73251606, 77232245, 265685085, 860541096, 181038883, 995121568, 787161997, 984175916, 994855981, 70309595, 279951259, 412871815, 881913054, 268261177, 575207129, 196951994, 610045829, 705950877, 200402175, 179100085, 912730914, 795237101, 264189519, 756871237, 840795855, 477498958, 568161700, 101820158, 478938140, 546807900, 824972458, 320572966, 375535061, 712736750, 146215080, 296045377, 892271196, 198915619, 973312163, 292266224, 766955048, 774760742, 724672108, 189810671, 590576941, 955913056, 705860403, 956268133, 120026477, 977289531, 897970234, 594373646, 802624855, 16139526, 294245189, 661099173, 505327457, 687552139, 570417673, 288750674, 928298666, 124243321, 103493234, 782666425, 810561902, 479140046, 567654010, 66398299, 87173858, 171094018, 401077961, 201022453, 649177770, 751032860, 458665510, 583069945, 3741921, 644139368, 777863779, 427938859, 574083500, 968708036, 5259009, 14753514, 566158894, 428971413, 29779639, 601893398, 934948155, 463945886, 442386091, 787098075, 294593703, 467511028, 998601384, 749411810, 495421040, 283658473, 287441865, 687819162, 964614928, 353638623, 648210867, 238886215, 893364457, 158958124, 29345292, 800368429, 595552294, 572640574, 913495958, 705720935, 850127566, 83220185, 799386246, 848828465, 335228800, 498492912, 819731260, 972790229, 191002130, 289923062, 997108332, 479589354, 13686350, 377632380, 915241611, 38445376, 115515812, 312111610, 862313776, 36444206, 491509332, 899038496, 494299749, 577210085, 925017398, 377889538, 129014425, 544007299, 134491550, 77644047, 150186363, 549177782, 243194000, 889811949, 476414356, 302027816, 934223010, 116351600, 936035078, 728736728, 99057293, 233685532, 715949090, 484999785, 527817757, 40017975, 403976200, 963752121, 230480821, 165554215, 501580240, 480519751, 374582722, 588438105, 13652788, 835399525, 909982574, 63720437, 165170490, 768431894, 385829327, 268804006, 950180874, 398363435, 512876602, 149304949, 858796870, 305796565, 80654592, 209088881, 365995652, 741417209, 580938286, 849913699, 209592153, 430983500, 292682916, 89781822, 346251985, 899920810, 490814818, 319818650, 865676138, 199552930, 49606030, 396988194, 289382805, 394082926, 680976370, 125444750, 312554820, 11884810, 730982055, 36906819, 144996838, 532313029, 339360681, 509568859, 763509787, 79118993, 930179491, 756170211, 627420026, 161269793, 542072728, 498021200, 392693531, 523036960, 919765468, 367278574, 755839168, 466305341, 613534367, 534169086, 166110829, 107021592, 280650539, 268761091, 590645300, 269909358, 234042842, 1, 35, 663, 8921, 94988, 847688, 6568888, 45268120, 282195928, 611807809, 518705216, 990050297, 271051698, 122408000, 405189613, 94926808, 864141322, 53735275, 24011733, 736554738, 929218491, 904644261, 780020466, 504939462, 734736582, 905177688, 612557341, 964587741, 714487014, 841745335, 939266470, 221175663, 553510265, 427922711, 816845808, 551876447, 104782423, 432788437, 75343637, 98990584, 780296494, 401590023, 184896774, 39759619, 46187357, 134251301, 342702573, 517720, 358976055, 583636644, 962541900, 167548822, 161325057, 550357824, 277594189, 165080443, 231182951, 735855208, 908711807, 571176463, 42569340, 237272417, 790920442, 624258522, 720842250, 768667158, 451444080, 122083868, 366641147, 308868590, 806102171, 616667978, 212552319, 508058403, 321794596, 570313528, 460066496, 737582233, 710064955, 691296552, 63281621, 675218599, 955697061, 110510427, 512018248, 153536802, 745040214, 175960352, 594730127, 864516601, 686994354, 671193730, 758082482, 651219990, 268055455, 209604272, 794711886, 922988292, 233697499, 855180879, 757331520, 952855529, 712373324, 501054908, 610479660, 988305583, 359797155, 981016202, 392046260, 222705767, 339379031, 255395660, 760704862, 824907580, 377018926, 100950434, 568292199, 345612839, 702169410, 76425882, 316244660, 633878521, 345805531, 43908232, 498746978, 171201976, 618174067, 828038701, 451921110, 452033897, 911744318, 64098066, 83924105, 595571257, 147937863, 948006101, 514496555, 77289879, 282007238, 421799065, 804334778, 765393189, 193008022, 263503242, 355816072, 278012511, 227861525, 902054870, 618486736, 979710805, 971590402, 61042704, 664850817, 113175896, 488535341, 617582794, 612947413, 45804546, 259073867, 263038734, 265569066, 162645795, 60875191, 359494871, 979749311, 139358127, 29529290, 309151363, 279422923, 345089768, 87598058, 700337527, 479652910, 994907927, 933976635, 324751070, 167729179, 810904540, 230096199, 33195878, 559883815, 674302503, 158162721, 997344757, 974400760, 476723636, 933671908, 372458552, 487353300, 603836216, 903251923, 461631785, 620155186, 664707969, 139328434, 135802315, 547850780, 544085832, 243757336, 714792500, 277247444, 736724545, 7257213, 104433298, 33077964, 133546300, 658470668, 407613385, 15549086, 409602732, 220607605, 154437658, 434924060, 212726357, 432662346, 953726155, 55947205, 221865215, 896738564, 702917595, 219549259, 784888336, 998968443, 737927890, 111474776, 479544893, 204531672, 722344756, 339644359, 296335713, 172390948, 145219000, 740849986, 175518952, 876047366, 775536223, 909308844, 333180421, 96764559, 528034987, 396799645, 413114766, 622993858, 563074288, 710510893, 900874806, 315196225, 993816000, 623166550, 642968249, 328645521, 844280596, 556521945, 272458659, 580772239, 284457451, 186994948, 909094031, 935768265, 319893231, 114481887, 109302906, 586737223, 466388545, 717893242, 342269015, 164207650, 394855609, 330099455, 836592042, 939058426, 541984626, 852636994, 524042858, 358495217, 921118657, 464191254, 284341637, 363378706, 679058686, 917272314, 562488937, 105215359, 614330571, 404183151, 365378837, 280141835, 594380252, 79371576, 739360814, 210010442, 10232401, 449147207, 97531383, 696215921, 900156881, 51327507, 224992261, 946786023, 685932368, 729503576, 741723150, 479111191, 872812474, 454570174, 217639787, 553029674, 745481673, 194164134, 241094015, 672191097, 520725696, 177728245, 485102929, 511421076, 349030122, 157631252, 431267952, 813510823, 604978728, 799539100, 871169236, 265066919, 191499414, 52282294, 1, 36, 700, 9656, 105307, 961912, 7625652, 53738944, 342470612, 999200441, 797070294, 375863958, 9523173, 166271514, 481765400, 879554808, 535680694, 467340394, 413500052, 692064693, 580959888, 369347871, 169821810, 621921924, 137911737, 940784828, 741570244, 905517670, 551817302, 657369119, 721648393, 536831850, 500879720, 726253305, 296162041, 891225164, 880747817, 182180719, 544050763, 654393489, 357200480, 356889637, 635049309, 374948412, 486169649, 407475615, 51228607, 535369936, 325305756, 74215114, 944988254, 919680639, 647644667, 526651696, 763479161, 278201627, 103508412, 387580497, 561661113, 38190290, 310583115, 569811056, 351262691, 985051203, 403138813, 643132429, 289980808, 570569544, 550559442, 934893929, 352045239, 810200946, 61218795, 42358563, 89293505, 506603831, 400595820, 117891860, 469015294, 166372283, 320554017, 155147268, 955469333, 896730515, 826039051, 931193995, 36098122, 893366407, 522834450, 917130400, 759016216, 23584371, 48884561, 844352920, 604253909, 886656394, 548946691, 688504947, 972899398, 721435398, 409845929, 399680456, 284950632, 796741351, 217452678, 611033399, 592790059, 219084711, 504058472, 277505825, 120276345, 694287126, 35416589, 305976723, 447309020, 969824889, 565684997, 62139306, 857693940, 901163636, 262850397, 927594387, 721909425, 958991660, 471789360, 260033992, 544270783, 877013007, 153311613, 85679796, 660447085, 213261352, 954007371, 8266647, 75417194, 28241545, 733410215, 579803150, 41901427, 876245480, 900022334, 813145019, 668096269, 73987267, 175135030, 724217744, 139403302, 77167168, 775504145, 397863476, 816272710, 221129133, 242347768, 885383757, 728565085, 947647994, 605379205, 598139075, 269419404, 178994132, 603450690, 652850980, 19254430, 182635911, 57268581, 239936865, 878358438, 515315850, 141611162, 665647032, 700517198, 807335907, 965806030, 897617342, 773532343, 924389029, 419741954, 420757062, 581633294, 179995348, 34733596, 923518220, 731757774, 573741822, 531242380, 813544540, 336821038, 442738016, 551572674, 470067223, 638102335, 989538200, 956007535, 613954394, 401563904, 103519975, 569290006, 144046622, 689996849, 638589501, 358099514, 725282594, 691632053, 702244532, 284031792, 473014945, 465414316, 116886234, 142777936, 342518645, 138051544, 347505254, 57716395, 939744642, 114873890, 359397343, 671360195, 724489266, 683013222, 345781236, 550104449, 877003874, 63443231, 224660360, 658626409, 133687251, 933261032, 273131705, 48202694, 144323990, 559827621, 779609382, 930553156, 35267489, 493151974, 645090534, 517431516, 368634145, 540405134, 215255527, 144656993, 549192120, 659960465, 217236722, 742258783, 538378955, 211409043, 760044403, 389330065, 692548510, 583181570, 627949137, 829194932, 234693932, 651493437, 707321269, 828284674, 652751037, 873736576, 267300299, 729754896, 429920674, 875733754, 60888792, 225478637, 39002446, 407176220, 761384762, 131879783, 661443680, 51638267, 568172852, 186052558, 637968267, 556455031, 313451921, 238551452, 644714578, 449541818, 640800540, 923965193, 38909678, 41940756, 338485997, 888949941, 526610135, 48150535, 778944981, 480892059, 874500608, 900322190, 973783674, 468787609, 618167632, 913754856, 327797543, 845404908, 752246622, 831422464, 484541178, 501948673, 647306990, 882577308, 771072569, 171273117, 620085552, 385025714, 126556571, 472404266, 664907284, 284895728, 860747643, 285481155, 480968189, 426457284, 579997870, 253315436, 264967992, 325506073, 407074927, 289125366, 710111895, 168902913, 39893459, 264014099, 335462311, 284068808, 624620216, 265346008, 330183605, 301153063, 136165951, 223572391, 416076696, 791322793, 440956632, 812128221, 56870528, 529001955, 157225171, 153110824, 659760559, 934444871, 1, 37, 738, 10430, 116437, 1088001, 8818820, 63517016, 413577336, 466132154, 602224077, 950429493, 571044537, 948550192, 759622519, 360792951, 40404471, 549575252, 331339348, 353289303, 642561133, 959520386, 811439523, 113998222, 306747368, 686402540, 608623079, 625536502, 102898449, 513583096, 310389938, 861964034, 144673299, 459932354, 368865341, 656127608, 909171212, 807159815, 446679967, 582385365, 827063804, 980667706, 264330272, 600794253, 740948802, 906942889, 945728377, 18846332, 985664112, 7701519, 115050801, 870345183, 606442987, 443069595, 817056595, 621418778, 690512206, 255049968, 161633922, 402904753, 372549674, 317848199, 779510849, 454579621, 366999138, 955388684, 940196190, 710141532, 289889641, 400266971, 473006189, 518001144, 203532149, 277752196, 73653399, 957077834, 580796815, 797359407, 33679102, 974181950, 229170666, 221016673, 753153481, 718492334, 480056326, 134801483, 829292600, 87160542, 624566954, 157188714, 912350324, 248797376, 864861712, 311625650, 564724833, 638897879, 211767349, 670618766, 182357348, 406247054, 335828971, 235855014, 766599169, 873180801, 943988159, 797515463, 949064434, 37355164, 366387587, 992037332, 39085136, 457008562, 710738441, 147115812, 245127944, 221285308, 44913339, 750687382, 166494925, 487773254, 2533400, 294773545, 964749926, 838352064, 354747747, 983055334, 906311260, 773970452, 136280712, 732037766, 304757958, 868694356, 9717274, 686595153, 845171773, 715645486, 457517675, 868876321, 257821804, 398717354, 952878758, 459394839, 735151005, 982831573, 597714383, 483469574, 396276440, 147004054, 275175512, 449695021, 280047682, 322443740, 657859781, 236891682, 338855034, 771308208, 208042945, 611383416, 470020781, 959351211, 871193372, 314812327, 417008584, 157794928, 30304137, 772193806, 92880268, 735754383, 725090032, 678769251, 695572650, 713627047, 220917673, 996272940, 711499227, 615337951, 732510553, 265860373, 10346269, 946167168, 327969286, 691646116, 588894836, 556718107, 891256057, 29035235, 193826291, 413628097, 951441661, 812044940, 432676044, 866499015, 139084375, 351784477, 900166473, 781089061, 914118385, 818686834, 857340116, 329139077, 237478891, 284468211, 215304591, 458481845, 227432873, 865995208, 554027168, 463893384, 221077016, 374577314, 119759917, 360383422, 704486222, 404678036, 137104816, 809074680, 755219457, 826569646, 867839827, 768754773, 89100960, 257194726, 724398193, 973188469, 858913715, 18463743, 680309520, 450458743, 140048366, 764912130, 371007014, 456635116, 735728421, 778688084, 152973997, 434969799, 574794869, 212648988, 728361716, 542931287, 302379989, 751579729, 92390154, 220181191, 407743441, 315151252, 520426045, 407908622, 679231575, 395003916, 794034847, 347654216, 68808817, 829211530, 81601558, 162714123, 30761100, 394951130, 268715057, 283612447, 241955302, 623210420, 275963878, 159211117, 252162685, 595441437, 529655660, 437222092, 841111836, 179960886, 135660761, 917237477, 768051317, 444580903, 506791801, 487181239, 875489229, 680194597, 205928376, 680445786, 683783933, 969592088, 132367844, 396994570, 832926454, 630581401, 505495558, 385734337, 641541057, 95095471, 989574773, 911275608, 518514268, 282262989, 419271827, 469001628, 420271862, 947083037, 407529572, 59976989, 434008630, 863717239, 945875935, 75676474, 215313835, 250745830, 87811894, 264747800, 37018493, 98597371, 710706515, 142785594, 391940962, 336466122, 341268838, 21508490, 413865364, 232101532, 92701632, 8053527, 412757119, 757312194, 403681966, 949009531, 880975038, 37050684, 272465075, 678404684, 193438246, 672480427, 700064004, 142628578, 802581416, 279140871, 973655892, 800905741, 598005728, 935768930, 668573394, 207197197, 649003003, 270174246, 76144766, 315632510, 875459369, 359185050, 528086919, 473525359, 758981160, 249109513, 189948776, 344668617, 795917722, 549344159, 348920520, 486734532, 302843834, 285724416, 810790165, 350603652, 574459989, 873908008, 1, 38, 777, 11244, 128419, 1226846, 10161959, 74764168, 497121432, 26344483, 38234873, 423642505, 376339808, 863392989, 917340710, 353019266, 355701734, 828153534, 204362640, 374924405, 607928554, 963790885, 940721850, 687219775, 764705852, 876861874, 763291630, 981930457, 551085656, 980270580, 505906881, 983294521, 135354674, 135665519, 630173290, 212355830, 143623144, 227056594, 817242891, 163435465, 418550307, 731605596, 289566443, 285968813, 433396374, 290335437, 260134359, 257166798, 296375223, 99595679, 459082068, 507135523, 972388714, 133158519, 975205558, 982374421, 644050428, 996778111, 162109063, 746906113, 514292299, 926426755, 356009260, 196659267, 409916170, 325494529, 655002543, 558511285, 36446396, 471095084, 174722764, 671116976, 160891233, 868903396, 304037581, 23612943, 337881011, 234387037, 370561646, 356075504, 698718914, 535181667, 514726084, 815242029, 608023573, 448544035, 835833664, 991058290, 399256230, 20531824, 669361826, 539724566, 760387110, 830813942, 547045707, 178050500, 929198630, 6813905, 110412371, 858816899, 809729618, 833864785, 232951975, 485491061, 613385270, 553071180, 627954610, 952757220, 692906182, 748961577, 662247263, 52513186, 149763764, 145530822, 33882391, 453364543, 997405166, 992558694, 759602854, 84367345, 100239977, 854081961, 858205595, 486024240, 91555639, 177882871, 949083392, 519037398, 556513157, 228484413, 492836072, 589348909, 196163508, 266626335, 11245627, 157404436, 270481031, 638406640, 490889097, 527976504, 370488458, 823400678, 322868722, 206357234, 647142926, 768625346, 265191551, 148038615, 363341916, 267722164, 893118504, 738977503, 565582757, 762106365, 849369394, 766495732, 13155357, 515888816, 523640060, 647203814, 437352666, 546684558, 961386555, 7614498, 893885274, 936701598, 428062192, 113231261, 402917050, 409965843, 165984892, 799921270, 659405770, 509144023, 774701607, 842603658, 487390464, 251731862, 581859608, 922860080, 258383681, 201597752, 292594441, 460903867, 638298912, 848020590, 765105850, 965506327, 844776867, 575276415, 85481014, 653985938, 197424999, 197600210, 989591463, 112466859, 918937916, 878289962, 30252094, 561367106, 701604983, 794157139, 205106586, 358551581, 218730442, 820317821, 718077344, 742273426, 343977802, 723940137, 91227055, 889419899, 835334285, 445942872, 874169472, 806494972, 841559090, 34902341, 936247116, 742348345, 932764662, 776531786, 136341990, 609226011, 962126351, 692609037, 492230872, 512261831, 61424189, 202712100, 557188069, 23267751, 10862209, 780311892, 698216821, 610626474, 445698906, 548927052, 791636623, 278469086, 802570473, 843652647, 214889050, 950325814, 545811188, 732525066, 799299048, 547938769, 119233118, 836166054, 515368215, 821018309, 703809789, 385697728, 474302192, 326687407, 701322950, 753939342, 860741461, 608860184, 481069405, 497217661, 107822505, 538149776, 65872865, 267685484, 630211463, 833714775, 127007356, 988488267, 704390393, 326686679, 330510067, 968474337, 860095258, 865223840, 3530159, 602833824, 943838253, 510792598, 862215682, 804647558, 57277705, 379631476, 611335785, 827032941, 500396827, 166974973, 950996383, 97277257, 336237474, 527425945, 836169765, 13569792, 45600126, 103702022, 589110361, 158793934, 917834123, 750227633, 450511448, 228174293, 380815071, 984828008, 35225572, 19924799, 316530723, 169463852, 11894443, 83625994, 27918722, 725825514, 510537357, 901592447, 560692763, 386943274, 409576331, 409681305, 19743037, 901841314, 504205848, 287987501, 95070522, 999713439, 52172335, 458657276, 716446234, 960325619, 967217606, 29400294, 323715881, 571473809, 542099425, 838958945, 826022366, 215456133, 111542899, 27057122, 264098733, 414451664, 367598279, 660361161, 317432327, 788309656, 482969647, 453723335, 307123116, 46250346, 156036134, 550671015, 501877998, 918162544, 672414507, 744250791, 519150731, 449335541, 717241257, 798831268, 772517138, 286300330, 910111510, 66350225, 850058429, 996528049, 454249733, 463645138, 33673728, 195487971, 700828817, 25012182, 447505308, 968790402, 312778627, 684898658, 698549052, 965513947, 825161447, 410399245, 428579579, 669192144, 82412074, 1, 39, 817, 12099, 141295, 1379381, 11669611, 87657665, 594899060, 695536795, 226472285, 640458905, 794561570, 378189352, 472728269, 218438573, 56516519, 255055733, 845027144, 588332091, 652544873, 575593478, 251899261, 421780632, 446749115, 397384403, 967249876, 562965804, 307548860, 910064219, 267557957, 532097834, 694036707, 378870548, 124206593, 109699395, 5415029, 722948552, 875697847, 694452268, 7553293, 132421363, 106964105, 391245927, 870340375, 243365738, 69805673, 199865008, 75486973, 171179760, 109991897, 220793643, 513746719, 106419838, 540171765, 580499245, 759007158, 982900537, 645687882, 590392656, 601803737, 221575615, 697448067, 153409333, 368742411, 593478736, 779784392, 983542304, 533669091, 167997680, 729893362, 841704349, 760614624, 47743042, 998724205, 972938209, 77600320, 536850090, 695359058, 769331095, 966134679, 528777379, 695035445, 387545073, 911151592, 242062595, 521446824, 889535341, 920252167, 112865832, 806555197, 118151259, 625842139, 701618487, 790273468, 694977537, 572862214, 473466414, 246109368, 48621359, 353657541, 554932622, 499105369, 867797665, 487345603, 842033962, 519557065, 245850790, 335288378, 782811146, 892240358, 338051309, 826545456, 41171254, 334148733, 152569170, 144665017, 941279118, 897754414, 89241104, 416864510, 41530804, 299074740, 73588196, 959211062, 109470038, 500259918, 366443802, 403320596, 183957534, 992196343, 652194487, 652679636, 980112362, 896443763, 694053263, 85474084, 793481845, 36502549, 113761902, 13660255, 295744749, 768030597, 559676644, 267907464, 329732897, 34721556, 481917917, 470669881, 496023609, 35319413, 426881953, 436183525, 539581676, 797395436, 949513087, 636400441, 684066319, 283217124, 456809507, 742722246, 708837224, 1825110, 845476655, 721485134, 509524702, 571748192, 313097600, 164720049, 83489702, 463694600, 122519767, 438333196, 350973050, 742760174, 292313656, 699166885, 733491013, 480543050, 245749577, 741817620, 207993307, 244579067, 622422144, 604751887, 899189402, 151409381, 217727618, 880477312, 214663719, 394263729, 196688383, 548030201, 726215545, 464673145, 261250632, 625458514, 838784252, 982491280, 700533618, 585918514, 160625577, 639912412, 329107337, 639996475, 820595096, 822718095, 278815123, 496262265, 918547360, 8027724, 726754416, 823448457, 260321413, 863184482, 650858805, 276099402, 685460415, 954079520, 733965175, 676833996, 368637623, 143549481, 304621819, 472579474, 749596748, 116386311, 410243381, 633945382, 411647917, 177570608, 616578162, 767744928, 61290651, 523112125, 276619822, 15151789, 253528389, 167816966, 891846580, 541892511, 341041750, 391023167, 293092921, 243156326, 622723871, 473135257, 726189187, 379573236, 555335821, 257038714, 482079083, 723871307, 606515981, 65251208, 632383753, 147352575, 594192641, 924833549, 483314326, 808069004, 770319259, 427864560, 25642674, 464671587, 569308215, 637300329, 923466624, 23057035, 86870702, 983746124, 846059215, 574808201, 554549209, 446310553, 959681948, 778636627, 211592095, 516682914, 291911580, 587928798, 427680003, 894209596, 866648165, 679666232, 460484096, 854394115, 982195268, 822495481, 835383529, 431162040, 830468499, 195346596, 57036658, 866149457, 860543178, 818146210, 279107618, 892401239, 225036974, 868558986, 685134666, 744469605, 156127522, 187537334, 788919638, 909025900, 672187019, 217419201, 384265406, 616374282, 378322214, 141913342, 501653295, 461070473, 25985020, 589549638, 109433868, 888240019, 931367280, 762349235, 234613827, 765084315, 611038359, 758764450, 286873014, 382512476, 382119459, 20294058, 943700532, 211933192, 58390954, 180966724, 929698288, 805610393, 509211182, 866583662, 775212548, 88368846, 726939816, 185342247, 229877142, 705155204, 200856219, 36832958, 610458570, 660966337, 749737121, 592806565, 894272325, 480779946, 649154472, 88597955, 74084666, 744113332, 528684751, 282107891, 100372245, 756922141, 58776739, 981772435, 924634098, 951039927, 397719622, 577729727, 762973087, 736969640, 674672356, 297937804, 986319572, 149411109, 496025335, 118765897, 173573997, 13186371, 696131467, 139811703, 497652080, 238358226, 252091863, 126575962, 416549513, 112043953, 769546766, 210139961, 218718185, 975953506, 930028805, 845629302, 57030776, 852433935, 836915594, 400219298, 622051773, 829969111, 114603161, 10751254, 909008878, 579282117, 214070865, 563200757, 1, 40, 858, 12996, 155108, 1546584, 13357338, 102391268, 708914679, 491589996, 307979410, 602522471, 317222127, 290284759, 54099411, 989042041, 349750818, 106531062, 706143382, 63807262, 819412921, 144007031, 937903432, 671633208, 144280187, 535961584, 391683158, 665684992, 173615217, 173957993, 353557533, 689224661, 70346145, 249590014, 418977958, 826283746, 394602103, 916349862, 513826761, 491750575, 183159109, 757685121, 418341803, 274891227, 642914114, 790796259, 588464975, 740365449, 551222753, 10565934, 35820801, 515689568, 211177017, 828019707, 68961130, 155306993, 295844962, 698696703, 264483577, 967049520, 615265667, 559761896, 719262960, 509462378, 575657367, 591920899, 676732702, 723371825, 327050158, 311506131, 94078284, 608080285, 992236405, 137506625, 399044419, 458634324, 553334522, 801149022, 685520978, 446537546, 993927587, 293142441, 349812890, 364132070, 129851348, 857298051, 877404263, 877505804, 63808796, 43779853, 597054006, 757518688, 847719064, 814336009, 295491019, 566317327, 427355879, 99632937, 271930495, 211594531, 907085661, 370381473, 40651392, 893659649, 363630034, 486697292, 957988008, 762036357, 927839193, 855832860, 336383816, 307639758, 266751066, 682795763, 757933830, 702637096, 416587519, 241670221, 803239702, 991067388, 753770489, 69318095, 379601638, 829408102, 918333643, 833524181, 647446668, 999853061, 600717076, 736359930, 166694847, 912637361, 883248816, 334184966, 360770954, 907814459, 571070899, 760625736, 543003305, 12232839, 27415041, 235755079, 155935992, 895456358, 299525687, 387663753, 430722193, 845849975, 389897647, 157165043, 232374231, 709459451, 819494807, 873294798, 982307907, 723241456, 529916420, 190269000, 832006535, 157577121, 119818595, 751958343, 818604698, 923214476, 455357809, 664208514, 204222119, 358021985, 507909159, 532713722, 447934290, 550255949, 9030523, 204809569, 704696131, 798537153, 779574805, 146334295, 422444856, 763243391, 968318292, 409596303, 730176788, 661449533, 145680243, 291092743, 406566554, 840725280, 859336604, 385485264, 540592314, 491573347, 430591599, 799102625, 349645352, 953856191, 685505744, 968883032, 548153198, 991972402, 298640488, 335784052, 560792641, 200482497, 534424478, 835919822, 256133832, 789502694, 815463653, 367192054, 711296060, 505894941, 749371649, 586599852, 478956964, 771301542, 936596369, 641013477, 895880622, 275251735, 709512313, 675062513, 900057226, 864601515, 604121575, 213439255, 718556713, 352300658, 293209273, 62461535, 212741657, 925233457, 601757735, 357273411, 900952265, 337965737, 654516053, 138964736, 683012438, 388413281, 151113816, 328964247, 191920444, 84786019, 179152386, 346561188, 643354711, 718267295, 169193229, 252223726, 887596939, 657097686, 142103925, 40078284, 150004901, 459569297, 459199105, 789641065, 6481222, 858687076, 375816137, 147145108, 520309635, 748217920, 667457550, 716254093, 186260954, 725808394, 626037945, 743543562, 764478177, 601933842, 797462265, 777370200, 654651513, 156072819, 707272486, 178868661, 27986290, 925976600, 457000898, 540704905, 843382395, 769084631, 760118502, 476552208, 749317409, 710185045, 964800796, 516878606, 266237510, 913933501, 813693982, 336046538, 762072594, 997287607, 756174558, 615699332, 325935068, 478725181, 294206110, 71125626, 862744505, 369229533, 687983312, 908265361, 496504119, 960935105, 69879109, 315010091, 778995602, 757128123, 249975621, 699329744, 984761141, 255696873, 966070938, 214893935, 551564463, 316442626, 532269369, 314110968, 128028415, 969165598, 561496103, 817486578, 282697706, 480617072, 509205119, 834540584, 277705122, 660874354, 778117470, 366056531, 831243822, 903068403, 672944646, 441340373, 340680954, 617276976, 849516577, 560088434, 230800586, 10428026, 372559113, 922230949, 889642650, 244184042, 533938488, 841639506, 817920213, 336934324, 44823033, 565545678, 701086145, 241957483, 114182239, 850726147, 526783422, 115816117, 835376982, 659266467, 815849396, 168028335, 255187925, 748491938, 622185783, 663040863, 743392515, 163408177, 383060357, 31556416, 794030948, 934245344, 258437764, 379321408, 40236316, 660469577, 655665845, 690942361, 375378322, 568352979, 602028119, 317437606, 657543398, 100015852, 252684947, 481051042, 964341166, 522946308, 280791483, 467949044, 475945690, 972019230, 462068105, 580258224, 819125286, 65219413, 675919204, 938373431, 246074242, 416112669, 990084376, 992206586, 174382581, 694468435, 670357482, 52707698, 430228891, 194064984, 374269653, 873105421, 89789806, 360326019, 422866288, 247972613, 990139142, 766813630, 25619403, 929658745, 91230876, 1, 41, 900, 13936, 169902, 1729478, 15241768, 119176344, 841399673, 434809990, 446105964, 492649140, 758977149, 206041682, 323715565, 660084286, 595902939, 912996958, 734408694, 639760787, 253066665, 208103163, 518638879, 141246298, 316067064, 932295902, 638352197, 835906694, 518593201, 772224592, 710767801, 155069328, 87760296, 888628863, 85616127, 159719113, 852745152, 116208329, 603162784, 598162586, 214665773, 928212607, 364268988, 422947444, 91651894, 294508512, 306449339, 29129368, 721764444, 23720919, 155935808, 134434641, 906918132, 581645037, 673925534, 656820458, 712140580, 940311261, 639783029, 193680127, 625191701, 485391283, 454129733, 912047676, 531795443, 151893083, 16212124, 506754047, 491882623, 143293012, 25311790, 265858487, 730580376, 281408346, 313354998, 904477185, 246774679, 76212745, 790588368, 952519623, 156839403, 194467618, 872887052, 91963369, 534129628, 238356180, 632320800, 58443419, 722943306, 618550091, 33518175, 519583410, 960079192, 538023159, 305123951, 486152058, 294482726, 518323725, 455607677, 182021187, 748135143, 512410493, 35362801, 719659644, 317014598, 528329960, 583008290, 443175574, 659178079, 174647583, 349497845, 577399146, 818913619, 271472027, 656817275, 494680790, 969710982, 229444476, 267631925, 175671131, 35511369, 58752774, 135202754, 944159958, 464206230, 475819996, 314325811, 754861491, 276808552, 810159244, 91192489, 626570800, 590621471, 514780234, 305537247, 801654104, 149383516, 787215362, 114530579, 859617326, 613074050, 468568467, 919259772, 617744284, 340905322, 985953212, 372028816, 217079653, 938494776, 284906842, 769978385, 515786223, 285120775, 375534381, 675385916, 665832700, 133450834, 3874364, 408375526, 770616302, 276273159, 413928636, 723794836, 198571707, 678091222, 296508406, 529916658, 588863591, 413257244, 498474249, 915935032, 120501359, 836927142, 230121084, 774509032, 870826787, 489996192, 917057075, 196187219, 383821852, 922336284, 22274995, 748507616, 607632780, 183109949, 339998525, 507933598, 698781318, 498085612, 803731847, 473820207, 901546035, 302928184, 865394080, 114078163, 2199878, 779942965, 594445523, 91527221, 272107811, 718335802, 365412741, 52329171, 414520032, 494974650, 300177708, 811610962, 146810674, 337728819, 506402762, 403329973, 694340600, 766854981, 757139989, 188368338, 788752320, 918847437, 928046733, 527551285, 479184799, 517252899, 712149490, 791491255, 238449676, 667119615, 757940899, 445679476, 734062646, 326185889, 40504124, 623294475, 807102585, 697275776, 960233124, 90479243, 277423126, 459856976, 523164613, 283246190, 353589088, 214300387, 783487356, 692462518, 267488040, 851918218, 799153667, 810257248, 109085516, 633189413, 670646041, 913414538, 526057886, 701571781, 823895555, 366072317, 141394361, 832809290, 464577360, 305577012, 512815120, 121404516, 195457318, 321946163, 309097012, 239601477, 94799504, 314416433, 43085740, 639634392, 892727867, 559091131, 668748148, 422889784, 711508368, 676630033, 634668710, 364293294, 844937242, 751071408, 322260215, 891789141, 187899827, 511558264, 521391391, 670781806, 509672700, 51147255, 62331255, 681097643, 668432081, 698715101, 46454740, 726474418, 934462337, 72103891, 408373632, 957100449, 670661469, 786800623, 834620545, 287400489, 490496888, 497846381, 189806313, 912940390, 809020495, 703284720, 835793884, 605744360, 923348658, 214377202, 697918809, 343995053, 445012242, 544883273, 475774494, 73159748, 664916820, 945806189, 388033609, 184443581, 891139166, 132967061, 662232592, 630310273, 296941879, 926467100, 732662520, 755030683, 373067237, 200501225, 132039597, 621016442, 864116597, 199168443, 229224627, 19895297, 392227721, 512572983, 888183257, 954225811, 362992884, 408318299, 664465052, 828120392, 703374891, 61248349, 16358204, 241119413, 30565637, 838212406, 921697699, 543334430, 89858526, 273185879, 355471309, 304528048, 507574008, 476038937, 789196651, 57644735, 932966132, 292240565, 284284800, 198355642, 844613937, 375170024, 881957600, 108981244, 644631978, 730251746, 563646094, 15703371, 891969119, 462467018, 842418885, 184776107, 20489508, 525173823, 93913531, 199936707, 49296883, 500271791, 9386940, 42793104, 102301079, 299925062, 242848544, 157270543, 567750735, 512260765, 540910896, 473863432, 123756576, 867793612, 940752336, 189701376, 338838501, 163690216, 120916067, 790468763, 680974009, 939542025, 299064055, 752326705, 668302564, 775312490, 929999123, 713601128, 593704708, 595301628, 539445680, 220384571, 492539730, 572951883, 264745653, 946510661, 751486844, 372815432, 445849920, 481560920, 887629330, 46438187, 433046906, 550746520, 68280122, 549536967, 98170304, 942092421, 657076175, 85959544, 736296914, 244774210, 196059783, 968298850, 183375217, 810099519, 413635020, 636120983, 396309504, 740465895, 371532101, 1, 42, 943, 14920, 185722, 1929132, 17340642, 138243024, 994832181, 548192008, 829424358, 702470585, 488681655, 275370643, 835638795, 810867407, 286977068, 950047225, 83539435, 44629372, 288790619, 507410843, 264046736, 483012816, 672138691, 875194556, 651203850, 66911617, 918075656, 674825734, 94581776, 415282344, 303997379, 819537616, 622429217, 698967413, 751254549, 420414807, 687830513, 601402264, 434289505, 724948167, 754889253, 808542135, 995391960, 178813332, 724416372, 177739106, 814105099, 753597104, 45856871, 272275296, 786414287, 511285559, 160720229, 317562390, 790336119, 868224061, 359611251, 78736463, 773457035, 927802445, 421722380, 116775238, 364696053, 502866895, 626441652, 490807991, 713262576, 797949369, 598695934, 260170588, 82830001, 494545919, 272206045, 443643728, 598266021, 33015507, 884148700, 307476402, 959867411, 216334812, 800291904, 985570368, 488188448, 107147695, 538136243, 662412600, 979298525, 134498654, 226734918, 727004323, 749341953, 119616289, 344235011, 179701806, 771727176, 867138213, 462181714, 886155872, 120844409, 637609736, 732957723, 950929297, 917858187, 787591285, 658307576, 752393246, 363474545, 410621001, 994736846, 177814531, 780475306, 862888709, 592093607, 579502147, 557845688, 288775481, 603183203, 577960148, 788283409, 673824051, 683888139, 877184660, 633236685, 114600324, 443874806, 243845462, 737247494, 816215602, 301818289, 678209727, 613605938, 858234475, 818583083, 638002191, 955539556, 166659792, 402119583, 136117938, 121601666, 755992562, 47984728, 295575049, 499852111, 307179145, 332974068, 315732357, 716712867, 640162541, 867854182, 934376752, 313718034, 59903781, 946384843, 119557570, 525136020, 151571916, 798992199, 641098837, 260839275, 993458171, 824535499, 355644177, 761912070, 816737774, 16159145, 269418274, 606453921, 360745230, 8968332, 697762673, 987763777, 660889863, 735951723, 644168107, 694447061, 112348183, 530007620, 3042837, 764274326, 848173528, 194620935, 635775962, 259196720, 713828904, 940082694, 457694335, 838811079, 742877821, 825043434, 999682813, 323541591, 50872352, 337477908, 513975090, 485543671, 991738379, 437900643, 771900426, 686428428, 563411325, 914169111, 935692665, 43568184, 490175371, 749564693, 101137943, 245839802, 603981104, 626386341, 386920859, 413292672, 913439917, 70347116, 434898910, 144090153, 824132212, 891175519, 132402569, 347193520, 969072546, 16729602, 608672301, 618817500, 911982521, 688615529, 732174336, 500282116, 497352932, 456415575, 878875953, 316115544, 915703538, 598465482, 596140294, 730305232, 164832432, 897815573, 166896959, 324516472, 764718824, 566396641, 914517008, 874306816, 779763109, 852306547, 611269114, 292511571, 915381300, 758955270, 257373679, 74625589, 121789415, 230596845, 205840454, 916544901, 23902587, 416402779, 293269031, 510816400, 975368660, 955188220, 72244504, 561311434, 137072009, 127537010, 860723336, 883260674, 394382836, 913512596, 497775666, 206616201, 483790701, 11643758, 543373789, 107216374, 536706614, 345207484, 197739695, 416959310, 802020491, 883579389, 155472766, 707726533, 878636875, 137339984, 387604391, 170286771, 862464509, 93116703, 698306089, 277231574, 157624181, 518482505, 545923209, 301838767, 429107456, 65466197, 400869145, 603396151, 201146053, 29560436, 908247428, 740900666, 645622178, 468181946, 182006817, 585006092, 39427009, 901513909, 575103140, 643739693, 969005418, 413112711, 121940507, 949419798, 274176335, 533655948, 73448571, 447893873, 303200166, 406062958, 327948494, 399154885, 680966803, 676784794, 346165530, 118434942, 634041854, 219847494, 927409557, 731595298, 204066166, 484721091, 397391612, 62697528, 613046235, 363210072, 588627148, 359818291, 176675393, 710790103, 31891420, 193284227, 13322649, 80677012, 364175866, 156203486, 303397217, 540753075, 969185318, 762928705, 479974322, 873609278, 714679223, 243389411, 893917661, 730412727, 540295939, 380888528, 199480073, 111615382, 501213077, 699982545, 83674978, 340471893, 589623231, 135448371, 354059110, 416125008, 490338358, 869847423, 644581498, 153365962, 261322947, 680966984, 400282844, 542955010, 604680600, 412088220, 680278649, 139286485, 860834305, 469429775, 280658323, 253030904, 2560916, 10309871, 297479762, 823144855, 871982081, 47058346, 963847165, 382927224, 356584190, 324565827, 306141977, 910279795, 453817674, 601981427, 979339306, 222338413, 904561649, 382529080, 408856660, 854658577, 411827225, 670817056, 827144476, 223389693, 471934610, 930635535, 587441381, 722797748, 95690794, 663628478, 287716698, 646651719, 701670514, 288321331, 90367689, 303151955, 540716833, 449495113, 614473847, 768187147, 779428778, 859329178, 317839203, 24311574, 208713726, 534909824, 569617669, 779723332, 951823587, 262620278, 508684571, 644816282, 124674019, 369884532, 146396384, 993989514, 828097325, 353947367, 356630001, 483119775, 36683277, 829372562, 480348153, 416969202, 237164413, 917166508, 673670902, 955993972, 550159722, 115253791, 571208381, 883450110, 234414978, 338605160, 465632072, 975880238, 1, 43, 987, 15949, 202614, 2146662, 19672862, 159841410, 171958174, 857707214, 674952199, 863564473, 694487987, 218927913, 150857334, 64522123, 242512102, 726888439, 233627107, 811786714, 114239005, 343074532, 372330107, 720689358, 467711835, 904517093, 48140523, 445520536, 151023837, 477389409, 167654505, 524330326, 826025786, 750662832, 873751815, 63739722, 191556854, 667326112, 50500515, 441625511, 782830742, 400734038, 564497630, 921910383, 845548941, 368028935, 749018447, 103585045, 796556849, 628596101, 868979841, 539520158, 627354569, 90231323, 417433082, 56768496, 355579497, 422451590, 886349503, 72956900, 803725461, 415871073, 683643384, 621063238, 193330057, 325926450, 277754812, 24871409, 448472012, 886190243, 823962291, 441987145, 894908057, 837390023, 862747763, 91512877, 722912649, 93349481, 545810047, 913016979, 515556016, 298546360, 734212089, 844284728, 136068973, 71028614, 122223407, 751306630, 44843394, 423748616, 386401231, 812571458, 811253207, 883210298, 108253088, 777750730, 94398075, 357510258, 341016668, 444595182, 421469474, 846006439, 697364303, 430219357, 145159, 329923811, 555736286, 145037472, 50858159, 758063180, 409311835, 199515197, 849732459, 429458586, 110831608, 601311986, 405029768, 899721594, 362036575, 3616348, 447767827, 718164293, 455022502, 154627334, 632024645, 923207902, 841801838, 418932384, 595460287, 460605434, 188513457, 767682601, 51793196, 194981425, 929803954, 504733978, 22197692, 870666331, 333136663, 819520200, 530915500, 599537526, 53266589, 48676597, 387019415, 413134249, 89916173, 988538195, 741237674, 580557472, 340811443, 13472882, 840030352, 781975641, 296220934, 702357371, 942050407, 935085214, 845987731, 799577627, 872670633, 692587304, 440284632, 702895036, 10589510, 109084537, 901549736, 680965380, 523560865, 14608855, 766098800, 955736031, 229070295, 918139336, 762087315, 15060087, 769624318, 210516326, 269537431, 932448778, 651446512, 367308406, 624037144, 927670291, 415521073, 854675140, 947034643, 395133007, 858104556, 792426709, 918444166, 282314711, 96653546, 423079321, 469451942, 792999037, 308400615, 330587501, 691818222, 53917678, 568461122, 362577365, 775464857, 904714011, 845440210, 795470521, 568880508, 666239878, 183860147, 125507811, 545400921, 401495311, 3467092, 430876347, 332849310, 96436924, 957680475, 836934713, 150232592, 891109199, 995835861, 145792868, 255284669, 853681633, 801676454, 45857933, 127560794, 137690320, 534209092, 436059291, 890838261, 134212816, 302504982, 936257832, 761720727, 269396963, 28197218, 59083210, 947207164, 442972791, 384169121, 488722025, 351406087, 443097712, 82956552, 698141640, 145942108, 188889308, 734290094, 387705377, 912805029, 973822420, 47485510, 507370861, 221674431, 786661915, 91335607, 856760661, 173031704, 864904090, 599152735, 495185408, 938099393, 556362344, 990758140, 995900803, 254599934, 462199704, 5008078, 665636661, 527028350, 642386127, 1829553, 551952980, 424017355, 108488740, 701380336, 806666866, 700141562, 59441909, 362171728, 894757457, 445400929, 773238426, 127546419, 723395394, 338826564, 332919619, 340737249, 850054615, 184058121, 13063831, 278558952, 698063140, 498777528, 72607237, 345269132, 902279995, 183690503, 772520236, 708689187, 233896476, 458831695, 230994551, 41124197, 206351350, 689101399, 262700029, 620939252, 892377787, 428085255, 694339277, 213848040, 916329377, 192795757, 474268014, 561285670, 220016093, 638297144, 193877561, 647642810, 64716523, 5417153, 709160560, 438820650, 471896153, 456049785, 424945489, 102312939, 179871925, 155527933, 66018018, 519349428, 575834851, 366155295, 196027859, 709388961, 444696414, 108229719, 111474967, 169464130, 765045351, 916818004, 674916990, 958919968, 932259128, 849009441, 829390390, 846317162, 253991616, 482990034, 163822353, 775754269, 532037321, 49173712, 212326050, 301906174, 678424573, 534302771, 375782334, 160287870, 855370313, 341617592, 25457804, 708941176, 246832732, 903916100, 546588049, 96029971, 706821232, 940560978, 101534792, 337492719, 856837601, 613769045, 707646199, 812028723, 616833643, 679800396, 535428679, 224426630, 413895724, 784683428, 431644219, 111092914, 661756720, 639659700, 41894591, 68359952, 43802473, 952730000, 823133424, 376059765, 707785553, 822330735, 771301262, 948220958, 908479296, 864547297, 515908783, 27167717, 175015260, 401476125, 721945851, 298498970, 707819205, 838011772, 889483594, 356594984, 693435347, 967781679, 401435494, 355846180, 333596320, 628919505, 303558980, 984974994, 113643042, 89409518, 612893129, 122412730, 114900098, 810658251, 247580260, 945287301, 609126629, 492005778, 772356444, 361927818, 440145503, 858752994, 174471327, 210890472, 769016792, 638211867, 546015263, 377533141, 892710683, 705066724, 412035898, 913706912, 989583745, 102815427, 296051463, 435828877, 627348761, 994079761, 369313875, 909339708, 172995194, 816793393, 474860389, 821690532, 962160124, 246051373, 970475428, 561698902, 165844443, 708639335, 918973613, 861542417, 207950600, 197794802, 563223285, 448456804, 787570186, 926930606, 566070711, 279041721, 162328562, 287318056, 191225488, 14318341, 585550504, 409974535, 697728497, 891226405, 200433586, 381575055, 638337683, 483277973, 755030264, 867834356, 962849947, 821535631, 1, 44, 1032, 17024, 220625, 2383232, 22258540, 184242832, 375813872, 392612893, 231706087, 882424931, 687132034, 689650073, 577977876, 303878988, 24310937, 406963663, 625468735, 582435950, 41660062, 421950986, 98962940, 938709884, 758565048, 969234571, 703952131, 900436492, 658647225, 285611947, 399326780, 419454732, 205387170, 983950227, 49990302, 189001672, 62673927, 586296391, 184361166, 506353667, 438069708, 256171907, 825943859, 951340167, 368115756, 522855639, 198647246, 263328246, 450011807, 434855284, 725807775, 648411666, 18383140, 128787399, 387148373, 905324825, 158891954, 656234845, 213026076, 490012707, 365468167, 200221292, 298615515, 290107567, 35072337, 317672326, 60118064, 676291945, 898619095, 494511021, 35193707, 681989460, 255539191, 6318676, 181981289, 309123618, 769843578, 942743189, 29734288, 954472400, 463236670, 747980714, 175643037, 260101113, 77874147, 589524374, 710018290, 567729062, 854908844, 767838566, 521233813, 535397022, 395450772, 519565978, 430844324, 691804767, 750969410, 915664434, 335442962, 327801393, 599337662, 151524696, 372580414, 756807473, 202845724, 578628778, 324772867, 495203100, 594805038, 176866440, 134364432, 797477913, 981614510, 128692174, 938852792, 42148884, 122641852, 370944239, 473851910, 935488807, 532851475, 689984371, 438315593, 696398812, 66001022, 428174065, 54501471, 80878480, 666016821, 47295976, 813797397, 317765605, 714997505, 258919731, 82884010, 661027522, 582655484, 361252385, 24311003, 432884688, 368733632, 23821090, 792526029, 846601436, 536812192, 29313630, 382435159, 426147993, 517181759, 645690342, 270896281, 775661220, 283600768, 240876557, 135665693, 104458079, 616729602, 497103691, 828815240, 86098789, 998656307, 754065783, 488969594, 91503702, 52278308, 883359011, 733253122, 448869387, 985543203, 116773170, 582006344, 860482711, 481797421, 498040658, 240829616, 836032529, 195942841, 508465042, 970760583, 262117458, 515914406, 802808161, 784332475, 374122343, 146224696, 841597534, 586439935, 244148601, 788204315, 767547799, 776362337, 510076278, 624681830, 364806405, 36907700, 539421266, 800828005, 512242954, 899834647, 163376162, 50294413, 18654970, 84289561, 55576943, 421249957, 34930346, 752291330, 162276973, 265235612, 648593820, 174309283, 472188614, 715911113, 367773012, 121970433, 269868616, 883985007, 980070897, 514347496, 412293057, 574601560, 116830355, 45453500, 562859501, 189078677, 827602581, 712444490, 316586780, 733065979, 840949184, 60074648, 135398686, 424428452, 321968689, 410040315, 273128858, 471407472, 574966766, 873880166, 875045586, 51088331, 163730111, 878321231, 726127318, 966070068, 992549896, 363335253, 89848987, 723352311, 66759579, 406269326, 227087300, 150259572, 36586234, 121181736, 671327424, 433664784, 948164313, 657988535, 451431758, 352880293, 341991927, 179834471, 17796695, 709446365, 576526708, 534876965, 620591563, 749402589, 628280366, 213414310, 982746106, 780180633, 458647121, 527146575, 210950823, 363805011, 571210392, 912463620, 153315485, 532024632, 427468951, 230879114, 869803861, 964025520, 480715223, 895116735, 766188327, 419338263, 475074013, 158183698, 899486620, 551866464, 830407504, 385674668, 305150124, 25769566, 438519248, 46473036, 427624180, 723264512, 651472006, 264633252, 457374493, 476392005, 982968243, 594462543, 141658727, 489344824, 433530156, 442633667, 193279091, 506366676, 618868695, 731227096, 902261819, 499005142, 38842574, 647293009, 470120821, 963932040, 826530559, 427769181, 52186234, 243569284, 806914289, 77294303, 605077946, 125786816, 193185124, 669741115, 146483601, 421911450, 244025223, 607708016, 920909811, 503255382, 458139691, 962827176, 614853461, 60315827, 350564197, 429760397, 252570002, 854719144, 336843776, 342192419, 596659989, 924243516, 172320579, 980212083, 387574794, 749118912, 796421442, 338721201, 731277700, 423355068, 842226704, 398877706, 643899462, 276311394, 413568057, 530987554, 558156380, 825270018, 71652153, 764304967, 575174245, 41877959, 189656159, 729954858, 472722511, 759829544, 285982254, 921037034, 543320666, 873711613, 829723375, 146980729, 88768980, 242470712, 9284436, 325379730, 426922557, 253585643, 473459335, 496125795, 212116723, 579959160, 525505189, 681915634, 797942363, 691505794, 454823298, 342255990, 994255712, 284908161, 275004161, 935102263, 472107098, 948357256, 856671615, 528973823, 649773881, 963952149, 308388016, 911396221, 251193820, 721175020, 199750213, 907595892, 491208059, 66513541, 911357998, 28185931, 408941602, 745821213, 601730782, 8869191, 260152446, 11616084, 492782894, 282010506, 115926945, 586669273, 760307966, 135350671, 730510115, 701832702, 230080848, 284697593, 182609947, 968668397, 822892958, 20031466, 582030222, 113170973, 44631330, 117449096, 742186715, 393019551, 475653487, 44400405, 854169605, 417464027, 638137059, 767027912, 156446839, 993857936, 340495049, 620457258, 138844665, 409760846, 178352112, 82788960, 388732194, 649306589, 798058368, 662337136, 564354859, 463324080, 651997437, 151329929, 798760314, 140393196, 82249686, 534814725, 624568021, 130746531, 950081340, 74895509, 582830295, 80288213, 896322580, 930247101, 961634195, 343840503, 151542664, 791653321, 891526646, 512046490, 292522561, 321986893, 483787584, 926080170, 410378864, 504638099, 532986681, 138953386, 701001827, 64586773, 800287681, 592917926, 845148767, 612516645, 103437292, 360749745, 802262044, 905182790, 741928176, 827192105, 608668686, 275550867, 759837767, 768468707, 652063776, 969103143, 1, 45, 1078, 18146, 239803, 2640055, 25119048, 211741156, 609749448, 185787670, 784612981, 979654374, 245960280, 15201333, 958496287, 21110097, 315107827, 742613444, 350112648, 551346765, 22689059, 646342016, 52427180, 113726997, 20972491, 531552248, 493279562, 92962089, 319571072, 658193556, 921146440, 975234478, 32484025, 175484024, 620442122, 566033382, 228886883, 301912152, 137109958, 37427138, 531183271, 684452057, 239066445, 806400806, 345167706, 766401402, 659593100, 342864185, 793254425, 754419464, 829307575, 253460669, 788296808, 455700810, 203460090, 299960617, 672027544, 662169751, 130171479, 226661975, 16040291, 641167104, 11608362, 92735361, 828424038, 151425031, 757058935, 838944903, 705030989, 271605017, 832315720, 525711262, 695893337, 524834613, 616761109, 89325780, 498691877, 390082387, 413410547, 86170624, 733987779, 857386717, 121183471, 378540433, 791481061, 602874536, 895775257, 706223069, 9499, 916233199, 610175789, 305910126, 402086898, 380865911, 987929263, 784720236, 752249361, 533065111, 750214951, 512527924, 120069833, 497034065, 691332267, 542878776, 324018841, 841280375, 368737196, 213532423, 972352910, 856518833, 695976280, 832491001, 482258020, 288928023, 37469870, 669147935, 728824530, 312167670, 98462828, 664815478, 37466991, 488559701, 805407681, 555656112, 449333572, 115257333, 422614443, 217564969, 709154128, 523463461, 73425486, 892488653, 72758100, 139084611, 245397266, 356349189, 258341975, 374070936, 726599734, 907199192, 145474167, 868900328, 80767170, 435742131, 604761267, 550372021, 238314098, 858506407, 406280874, 734533546, 294613351, 569709112, 578499728, 811514468, 971780315, 806793934, 105431100, 109183449, 48863833, 577768093, 679710969, 415227663, 41263734, 575857153, 381654592, 178237376, 962188807, 96401085, 816699360, 379978, 698529453, 815682387, 657011537, 324418972, 693645417, 573047105, 308103161, 882958960, 454854080, 319280881, 638681315, 366562235, 558670399, 767575020, 418970310, 599121706, 533764150, 589341596, 935247125, 342450103, 752510984, 17885861, 270962366, 936052758, 754048953, 578853463, 395299411, 975776432, 660809842, 714104917, 664542262, 888472526, 460099640, 981638523, 92874960, 177231620, 389704303, 815325394, 892076514, 810821143, 435904186, 382196425, 459031152, 355917826, 128881343, 657597142, 768648132, 489510758, 615223177, 785945817, 514595120, 566588750, 607013232, 187911920, 428934627, 690400146, 385480557, 274884476, 214574226, 202705516, 78809920, 768678876, 104566183, 54811645, 783466377, 78714677, 225394661, 571378521, 194681502, 425310485, 768219090, 304793231, 206900396, 615627160, 652872143, 605935098, 888495311, 608958308, 684600222, 150382009, 670451269, 632074742, 29926906, 676412361, 727588975, 541140282, 152873820, 396851079, 644404346, 44361987, 675992732, 795525664, 898044746, 408945421, 518637916, 428148139, 754863856, 398182352, 901207212, 713356422, 978366083, 314876385, 700685480, 450639991, 507197672, 750335365, 694787156, 659670168, 536065922, 58255852, 874808151, 601680063, 300562698, 308983506, 144763409, 291800793, 77526020, 485403753, 904665596, 240987930, 592380858, 131116194, 318805303, 40941643, 253699630, 655235690, 431599614, 508389196, 766960976, 64307752, 83604788, 642165815, 298107337, 143184667, 782909601, 97135064, 800759539, 594114128, 462420032, 946857620, 578998109, 847963761, 556321528, 57391815, 681855904, 181815656, 486333346, 837072759, 524567487, 328595763, 549915998, 810586503, 921107919, 625157836, 520890292, 832156974, 502972509, 844559735, 189855766, 821823028, 625190873, 310510259, 495827691, 683011136, 462720297, 218315456, 558392392, 789434995, 973556645, 730884239, 996176654, 617108310, 869866261, 672230385, 823462275, 454316955, 569646417, 836576125, 486906178, 189726176, 941091111, 447563926, 715506888, 259006307, 152570437, 178255829, 705545293, 756368978, 655390691, 445318929, 656847742, 582354283, 964611397, 757172000, 601301680, 424348696, 51484783, 19240319, 282677827, 308226295, 848392338, 155829926, 371112122, 224524783, 972970693, 890401898, 186586738, 229535528, 744395297, 436751188, 287103606, 767393594, 221149011, 725319915, 148703291, 142739608, 565503173, 66967587, 579759051, 568848401, 146971072, 400042251, 42796974, 930117091, 516575412, 958322295, 49672443, 25502320, 669481138, 837449618, 7837933, 569472200, 125364493, 253977071, 938687542, 347213905, 923213402, 374713215, 103889249, 423021360, 42560340, 446498368, 893011213, 263552847, 473020638, 594960497, 638188472, 306243047, 631678307, 460262893, 114330448, 196301356, 120279822, 408786998, 213927614, 687965452, 221650209, 761159253, 159653422, 237951119, 705996510, 183076481, 962207888, 939920456, 729428244, 527536009, 933629825, 48104537, 426892607, 222940406, 156477133, 294062878, 856995315, 562470362, 935041969, 210948751, 968306167, 842365144, 520781012, 542464204, 753086923, 742421303, 62000597, 644679235, 71406991, 633199433, 272647461, 452692051, 412108892, 971466694, 51102980, 982720545, 17172841, 800141833, 835541670, 112517201, 389287762, 451060806, 667438631, 372888210, 71363616, 925222882, 974951293, 516878304, 717488009, 957226897, 42671831, 558776576, 623171604, 305500795, 631070922, 102790598, 482941055, 578335399, 805101814, 173951677, 379242816, 368922629, 730730546, 873191134, 654555294, 282999571, 122452789, 92227034, 843713012, 807240125, 801145367, 399481174, 81195926, 292593849, 487745170, 77737545, 120468361, 275563695, 294725580, 329691567, 323060707, 128192468, 940264172, 278390124, 237020514, 693096287, 868976326, 357620751, 777387506, 600499325, 283061659, 552760619, 551343042, 374674126, 67456147, 355451755, 309520773, 188033652, 438124708, 963234900, 524570431, 966112342, 609641134, 592345761, 1, 46, 1125, 19316, 260197, 2918394, 28277069, 242654144, 877454212, 274093151, 658806941, 733787098, 12686768, 373279778, 972151771, 700803085, 323660829, 529034010, 15342046, 14519348, 617205005, 151932388, 986173050, 673700068, 544467810, 964286681, 515278420, 556139518, 340574896, 558301369, 203169010, 995039572, 456888812, 641435231, 165153057, 140522292, 660622205, 195293121, 536816710, 963078287, 7389104, 204944482, 754195920, 468292992, 782743724, 983001140, 866703245, 496885028, 44229335, 385957410, 278539952, 468949573, 420982388, 313452346, 869856814, 98935497, 204399132, 112520568, 660616311, 229799510, 228233497, 492491671, 631417681, 54933646, 149425728, 621332861, 339088208, 164640489, 629238436, 824895721, 154091091, 876001533, 408513031, 998443240, 581987593, 639413342, 564182232, 919538600, 946772636, 882410774, 972663920, 656083562, 92818, 266781815, 775781699, 746031288, 222736672, 245153398, 853395663, 612580130, 998160370, 644539418, 268757618, 522753001, 961290581, 775849265, 167666621, 207332842, 699178165, 754169098, 895892786, 110804927, 209717022, 224332021, 783584762, 168756823, 846734143, 820517435, 567375827, 214226237, 514413130, 94334242, 56417678, 452070622, 302779049, 643793464, 45275321, 465081583, 721848633, 905142006, 304646178, 594655979, 909007937, 734286949, 886228757, 175346016, 613908391, 543890160, 182181133, 880150750, 840065256, 833202286, 948664835, 99995047, 986587901, 143761895, 873393215, 472341142, 369663112, 813013714, 860504625, 731747262, 545041246, 583231233, 427381591, 37913038, 537312918, 219404202, 592801409, 727962123, 878247573, 121527391, 62101177, 856133295, 688561557, 4927109, 639161755, 216890863, 944378755, 396352437, 878653962, 905668778, 386987830, 935008847, 899701147, 100650401, 955831377, 336099358, 325599961, 655390214, 368725260, 410912881, 868037904, 255016544, 51552711, 320078126, 868474642, 332377928, 241406268, 35418479, 170587950, 775390874, 598922434, 616742075, 563583865, 362204509, 606438997, 894815935, 49721736, 43588534, 841088924, 703571407, 258771291, 525460849, 233015242, 491199815, 325653075, 858892862, 519655123, 115437087, 727491564, 149427446, 582972761, 204458210, 871579136, 737982490, 129452738, 424878982, 856725917, 336920826, 730532856, 841738688, 738232572, 913319995, 816486040, 235770118, 427698004, 930569686, 569011751, 212446463, 508105319, 803897811, 496189040, 948372030, 432798655, 784691260, 809769369, 691850475, 577558004, 62715847, 947764060, 196109904, 506172286, 447735266, 980867772, 417186123, 46557919, 986790130, 277584037, 822619391, 621076591, 388367593, 68342324, 236699370, 119970164, 657351210, 878868802, 794459312, 436412351, 290870119, 503296346, 564802634, 58773734, 218770767, 842309450, 694735121, 712067611, 605426442, 634737321, 598847809, 189964014, 104895974, 463967300, 12836011, 374171101, 422839429, 769990513, 562838372, 23465799, 935303296, 758855803, 832260567, 373886738, 362866660, 831747060, 745193763, 842521525, 971131364, 323409153, 328965945, 810807795, 987986960, 514599613, 697337301, 518676386, 255182547, 320862033, 438306682, 656059329, 246817307, 296427451, 518314128, 212813255, 401599307, 322632262, 651271379, 102975853, 978392574, 171788197, 425477753, 865141598, 200230496, 352371432, 128877128, 483645145, 487174027, 207964600, 565016864, 366179929, 769999162, 980709292, 279413092, 778963675, 322935221, 775556840, 152203885, 621120920, 754303914, 144652778, 603456104, 397495432, 911648885, 161631342, 183072379, 436197254, 410415743, 654211646, 998944149, 660332881, 659092994, 407158213, 993390015, 62237745, 342306369, 807083806, 460112259, 598009122, 34231667, 354435262, 237881432, 155417941, 495370397, 996923439, 566380833, 854227389, 702509945, 42544433, 284265702, 294553519, 149363293, 27077251, 84953964, 442875086, 52560456, 900402134, 145229989, 73758817, 191009440, 854994962, 638721915, 122661714, 185868970, 77283521, 869275152, 18655948, 313026284, 709600476, 473812539, 310414874, 881320952, 952459523, 248120422, 525865505, 878780555, 987277088, 840681160, 676792790, 412115993, 140030918, 974129475, 721196483, 656805079, 905290349, 47935904, 451920705, 209356056, 551066765, 377150442, 379611973, 957219941, 151470005, 815021467, 645207971, 427463516, 863082600, 325313522, 124436219, 624577057, 614877838, 455973640, 851822937, 25478672, 694724523, 841056623, 311625157, 733217559, 234679922, 488590424, 672460808, 393534712, 496209755, 929085969, 673429468, 675205481, 477828672, 541309112, 421475544, 478494486, 773959869, 620756099, 817295158, 343366608, 474968096, 138789669, 1261477, 581929663, 193727536, 890932863, 10823177, 566850894, 774883564, 16714666, 326523886, 969386350, 297903394, 330603328, 602435368, 640131734, 422205271, 722651837, 536164302, 931111157, 119137488, 728875089, 985577117, 985476890, 17918009, 917723365, 472997173, 89115107, 916366434, 502538821, 230961609, 303908854, 617061492, 736625515, 131713887, 339453221, 738950163, 633262610, 426758031, 238112917, 779917917, 838020550, 66019448, 650675847, 778117049, 610691432, 213274580, 385410347, 146924004, 364868172, 467790003, 719723336, 134820272, 752419541, 477278067, 249134595, 704095466, 475445405, 736299900, 879265925, 152926089, 845846141, 495967193, 279498385, 571884448, 188818617, 160584873, 477296264, 718325160, 376134972, 29944771, 994040918, 900529668, 502667072, 63109761, 493032874, 781301515, 461834757, 82343644, 481132313, 514447042, 33858163, 779555233, 748165656, 15592733, 72424287, 572256728, 868353288, 210902382, 873738113, 462082508, 116372507, 317994063, 320661573, 43412947, 698165915, 782179405, 544478699, 376533191, 591100852, 669522818, 718785967, 689856669, 868867194, 692259782, 326169003, 372530014, 278822874, 245059471, 536750832, 337386716, 351509954, 600150419, 771930319, 812137400, 268506281, 52663290, 576040882, 250206016, 182636529, 238498760, 83748189, 556944302, 408365242, 877381661, 687598532, 206936328, 93325077, 375585930, 311118119, 840250578, 1, 47, 1173, 20535, 281857, 3219563, 31756649, 277324867, 182983217, 698763572, 224340727, 130185913, 938338213, 457596872, 500667258, 726272186, 242531386, 490324006, 697265581, 186365736, 123707347, 149163288, 89978475, 985283339, 584841356, 785509005, 693590689, 256394211, 919078587, 671307265, 271140497, 146527772, 508423202, 678732983, 767147115, 418422439, 470469749, 411147184, 246424306, 580998273, 228726677, 964726100, 955513349, 444565758, 668191949, 622619432, 792082487, 929348032, 601983375, 875985614, 424117930, 730694027, 740975250, 920167707, 500437835, 690210005, 493329701, 913508192, 695611331, 515433292, 682059417, 760833644, 299135864, 144219873, 937695856, 872711671, 176916492, 348891212, 334587033, 49595521, 749704350, 806067034, 773327860, 183297942, 590517602, 642228939, 275941227, 305722242, 165986509, 644370063, 71211109, 994092320, 193064301, 728492690, 76982066, 397536959, 240992716, 459846893, 745186728, 715105963, 864528752, 8495685, 753272988, 61740216, 691254120, 133693721, 536597663, 806042634, 964981978, 37162518, 164112239, 637759779, 841824460, 829311498, 573961610, 622092127, 856298148, 23010232, 90428839, 608194623, 46765621, 381935126, 362962166, 452925715, 585602790, 768818647, 88708532, 942042803, 418311021, 521378251, 499003594, 126819649, 281499536, 951375086, 146412815, 883657287, 598780576, 163659546, 959278876, 560517421, 665346319, 929162776, 164983787, 77699826, 451232846, 342897676, 483260356, 399557298, 954841649, 593150358, 617703430, 292815034, 3827776, 631211917, 629217856, 387782790, 117795063, 964508694, 824603912, 347867132, 217932218, 808071571, 466159291, 919428338, 306867765, 310085680, 347929669, 103137973, 445637697, 645585557, 573817817, 596387955, 672995733, 578127218, 402908135, 115353766, 244018895, 365778204, 555835033, 188328988, 247770780, 214263457, 844226086, 575129810, 998900133, 642186262, 886066131, 9933705, 609621463, 398319031, 223920768, 209742125, 519163806, 74615456, 814536291, 217678251, 205417278, 306418059, 464475526, 330591049, 614947407, 841330174, 17421893, 462387593, 572435987, 550253368, 393354277, 125715312, 124567536, 533400012, 599797708, 528236566, 670562226, 867851657, 488086533, 312725786, 238592338, 37063455, 385067665, 487783197, 118051898, 700641656, 71282753, 435781034, 103306472, 894876554, 845215295, 848516, 105817111, 455104275, 971250603, 659938256, 173306291, 702024160, 716038595, 487118454, 170680030, 880373959, 881689085, 153725278, 74926408, 143593976, 537712434, 635112688, 530810156, 750175992, 211491335, 495469862, 938874667, 906814766, 530322450, 654580872, 345961757, 642596517, 63791230, 944154048, 670877958, 937127089, 186748489, 915912734, 209561832, 276486399, 229476817, 558761321, 226557040, 227364465, 312169979, 745218623, 741668605, 732242764, 141121784, 862165956, 612899824, 26577011, 945385273, 251793938, 946782241, 731260038, 244678083, 406380914, 904932224, 539791264, 681567161, 903979395, 522313639, 307479666, 592336384, 274405785, 808155145, 116439879, 610551965, 466693001, 783212908, 356926408, 441684284, 460337698, 929744044, 6376955, 718008169, 946348344, 771828366, 973818233, 895371075, 977137826, 380169268, 772257849, 31334848, 472603919, 411133545, 814229722, 268412684, 269984826, 925865608, 465876593, 90547760, 192297128, 107314233, 564985934, 624177562, 939350415, 164843750, 127698384, 375467125, 733175906, 272735725, 449176665, 148653187, 981408173, 518395662, 539465581, 376426572, 523018009, 244326749, 117372211, 788925566, 998562683, 66998700, 958836224, 912519308, 243826028, 372775429, 817271079, 249393258, 980817911, 290157076, 803249202, 54296904, 967950499, 259586185, 891527285, 197070576, 229312354, 227197980, 799697366, 938796541, 780082061, 90937344, 484280959, 41280132, 365255061, 357940368, 463355056, 931322797, 484716584, 549219150, 927360223, 836260928, 974511964, 168938341, 138740543, 617041490, 552137623, 940491117, 311751083, 797191757, 581186247, 747525174, 464341615, 45074367, 877273095, 118604361, 820377975, 651223472, 330450797, 299712101, 798402816, 155978336, 76119913, 279749437, 94544299, 576902970, 337821847, 762491092, 205421212, 628488971, 912880168, 293200919, 74345429, 106904237, 117214135, 997309646, 440117215, 601730010, 44099662, 275878624, 579837056, 734358196, 740396992, 105320711, 497734455, 593389397, 892951024, 375888233, 469355971, 904918031, 759963217, 159920933, 656339936, 82028185, 635763012, 494109863, 887577439, 747214684, 51704021, 870514178, 310168296, 344440919, 671389360, 63636271, 867520663, 253359253, 809561479, 515218518, 735486509, 595414813, 855063768, 809133514, 296905455, 403829884, 13706060, 521945271, 406722813, 508410711, 177195219, 735377028, 927006199, 631467156, 561281245, 747357347, 2938426, 465345595, 461810717, 851331500, 936133185, 709629669, 764183492, 336958888, 999734612, 886346709, 929391292, 283117585, 489898780, 493902211, 377860665, 233672406, 313970515, 130449778, 925311516, 829665465, 27964512, 47478431, 502231137, 77997958, 450616449, 231073347, 922519036, 577962078, 74763491, 840109600, 825429573, 325716083, 462423227, 684091307, 610980133, 146344297, 230702558, 840583842, 568780809, 837872774, 467777629, 918753619, 868791683, 692922864, 937076083, 487643358, 553595896, 717484731, 882361644, 739294901, 547711612, 781629368, 821302751, 368923697, 499416921, 374122329, 146178192, 867117817, 743635071, 435195107, 43377741, 23687167, 878990481, 99110158, 262344925, 137035868, 292609610, 625408058, 171070693, 281506530, 350758492, 515834894, 237732608, 828774443, 840832942, 431386878, 857791323, 291378943, 894741249, 559570546, 881728336, 216217018, 497590589, 210577047, 706853900, 528807154, 595327246, 243687205, 679896105, 276389715, 520651743, 981854062, 782051052, 628779694, 482906971, 308000266, 98460224, 329039027, 663453182, 866909422, 358447817, 756042580, 103701857, 530184673, 82157052, 864831037, 833622836, 129557279, 680891914, 903510655, 223117879, 584910098, 872789802, 683398377, 818673921, 424793316, 162530200, 461191009, 233747923, 764377859, 866276050, 20068038, 599500015, 419525268, 504837656, 702339633, 161478719, 731429464, 9977417, 955013204, 944736389, 868359658, 303235910, 570685307, 762022093, 973456873, 491776893, 191155949, 1, 48, 1222, 21804, 304834, 3544928, 35583250, 316123172, 530785426, 505824986, 901343166, 615485588, 789348648, 698747334, 657848248, 964586458, 476943547, 698458295, 801769019, 257736525, 542576587, 933572174, 9542546, 488292838, 779820677, 404677231, 568188493, 931045218, 340825658, 205993974, 185959269, 78058729, 445883053, 431770274, 625502333, 180277174, 804167964, 894493650, 995189957, 934651928, 779076648, 286076285, 196236261, 433504295, 796345349, 46608071, 262327913, 615865530, 569486410, 232121371, 86175778, 154003167, 455565337, 592635041, 449778081, 946011559, 315342730, 523152035, 660192808, 984322053, 918448908, 362530845, 976500024, 826353996, 979299043, 20455239, 106430716, 169990095, 856925551, 339927417, 872925000, 454748405, 844111855, 778706572, 953334777, 367875579, 54603227, 952723870, 746089521, 114899675, 378338080, 515017450, 901556480, 75514717, 118586517, 750778341, 164215503, 398032943, 932771419, 175973529, 371281707, 414155738, 136305212, 176477492, 529591042, 473449712, 104580388, 917944592, 711611694, 275529831, 657391663, 618370464, 182199238, 863262145, 671572410, 926093081, 964697471, 20599847, 886336884, 976845790, 332330830, 936899217, 469444206, 333826539, 382006323, 404644652, 86283892, 711449573, 711524895, 240243757, 137744674, 52585102, 502954368, 568353873, 424768720, 673699213, 453807002, 277591996, 614231800, 858886730, 933633627, 855960053, 795294602, 320736325, 160050137, 741837408, 875372187, 933116510, 439299086, 339530899, 998809886, 988163112, 414204450, 626581582, 425958595, 547450689, 257877182, 25212376, 487090639, 693248108, 736165691, 261048117, 530252319, 667332870, 224234420, 283256778, 493030047, 381167115, 959191937, 567700201, 408470930, 456733167, 877572444, 640070139, 177231251, 53889209, 630925282, 764167042, 903138510, 822950867, 161878067, 741376139, 620673064, 828400388, 989198090, 398235498, 335164252, 650259410, 895482301, 288920533, 986020511, 960531109, 692510577, 743863232, 159848129, 639142915, 658806616, 286815941, 569150064, 996156909, 474086872, 377428234, 108191201, 968576455, 934066962, 520785392, 648351310, 322768543, 500047228, 717012630, 366640002, 617370336, 747113890, 647615517, 420668064, 485924194, 28548015, 242698362, 20265134, 481161073, 780894508, 716872330, 925052871, 809234518, 209608950, 454869307, 42621234, 266915957, 548835092, 11648368, 200676498, 803279760, 609790836, 522043768, 787672824, 264643232, 571421826, 762085826, 854807719, 119023111, 660310435, 945098645, 838260736, 592383406, 728604232, 586121308, 18945549, 62079587, 8000021, 137221342, 936745518, 867913927, 937623778, 183088542, 624248829, 606106136, 815005922, 728188591, 164502140, 885086995, 646575964, 60630781, 250914884, 619961376, 835493684, 1794097, 350786557, 222634027, 605402916, 871984975, 140157610, 784428245, 701028584, 784157139, 199990301, 49282014, 806191394, 544636448, 696393844, 625422532, 306981977, 200109353, 819880255, 622554727, 966234587, 1715755, 884432882, 186517679, 414057470, 559202957, 356291776, 440462056, 76496043, 54502936, 82793754, 693820485, 333532789, 139408482, 538301356, 908601203, 663844984, 277481039, 494620179, 126148065, 101563902, 543304970, 40138848, 255494176, 250466774, 181548534, 183041503, 553027506, 468172977, 571880068, 685135214, 70030015, 431414252, 965377675, 285528459, 577690235, 3039911, 424468115, 149219671, 315258608, 442938842, 340124780, 620577523, 697442435, 606981307, 195766252, 513624332, 160814831, 144529981, 626344971, 929525101, 167384034, 985564306, 757660450, 674490248, 404160553, 218780132, 253152109, 588527766, 276135385, 293545669, 229980166, 406532593, 544661736, 944987368, 74067610, 979465423, 367319108, 691015763, 308068787, 270297211, 892899529, 571121326, 682341094, 508186314, 992592910, 570463576, 551864557, 443417375, 102996223, 180706669, 66278518, 547390018, 97982020, 377733797, 642211092, 809569594, 442856622, 912786312, 563198351, 549331531, 576357131, 891027263, 77805689, 816522985, 731749256, 313952972, 411776160, 795006290, 22615421, 348238413, 716260746, 223962550, 78670864, 47765882, 267128253, 587371111, 927656165, 192469863, 806624234, 136996971, 759497678, 646978177, 833527505, 472805550, 754214240, 960030895, 232746388, 490616131, 420542303, 904038549, 210637836, 74285318, 144447351, 742135765, 244372617, 87595635, 852731251, 594678505, 794681848, 228154101, 363702627, 673985808, 239196945, 836249623, 602064792, 462168907, 430511049, 331217937, 84426505, 529390112, 953694258, 768941491, 296949641, 617567965, 759210871, 554347066, 314959464, 855978152, 459336095, 416019714, 554419893, 643616814, 307318600, 193723511, 342506504, 737708842, 961578294, 644413804, 283651295, 449519877, 262823100, 438065978, 195660179, 15479674, 929627357, 712657286, 867475048, 618979059, 615899609, 290553872, 46585860, 675146342, 899293157, 138576244, 932939832, 413352510, 228638502, 577046541, 52412367, 271101119, 704058715, 716195674, 113738084, 976781966, 417637854, 201849275, 137988263, 703452509, 833173534, 774723430, 98520292, 647910333, 702073064, 101667724, 93613248, 4773372, 993672667, 598539625, 298728331, 547262186, 609550837, 42278975, 203431476, 764589375, 791435299, 273439277, 15186943, 247517820, 332116413, 672582410, 88991345, 573172714, 370502342, 495515460, 486357723, 529038430, 112617630, 9655079, 54905538, 630913486, 94540925, 694069860, 101033114, 601510215, 405093272, 877399916, 606786230, 712700446, 365826653, 440611748, 222502187, 628732942, 260127071, 415183336, 331627148, 603111841, 484627861, 252203062, 603610758, 918118836, 775502591, 558836403, 458735214, 903545723, 229008632, 239177179, 70767308, 751925156, 652119146, 980361868, 450630793, 63075950, 714904102, 795480239, 196855664, 446357279, 343343138, 751184330, 353543327, 265335039, 291055365, 141693974, 952501609, 772988967, 982806649, 295006336, 142133453, 389243658, 551050114, 837354729, 288032982, 926886748, 940810321, 996269340, 544323652, 123254721, 449847916, 164321665, 408440169, 540527971, 235735087, 384560805, 888470688, 711171300, 414716347, 219479361, 559050803, 610845133, 321258507, 296543705, 253557800, 771631909, 466270561, 966519146, 100544233, 474799959, 147649345, 956135303, 808272257, 279282920, 472357219, 422709994, 530025514, 999788009, 64593897, 709199531, 479060735, 311654131, 943520011, 427742758, 799287390, 782392773, 191335024, 830990096, 336010037, 237942831, 237453992, 695887098, 398366572, 529644737, 344086296, 862051533, 684436865, 317549101, 968659087, 366641438, 1, 49, 1272, 23124, 329180, 3895908, 39783804, 359447204, 925733384, 746545659, 165655001, 158091124, 719304162, 111160209, 171158550, 935012406, 874008903, 988755604, 608336289, 351327718, 211049418, 970686245, 441380023, 920727544, 396494781, 218114186, 934368772, 753990221, 203263446, 488226646, 946324350, 642441651, 816607227, 122420091, 629716118, 498106515, 488881569, 100763230, 814241373, 430998026, 986590664, 188596813, 238499794, 887765759, 719310391, 819612870, 840885905, 584773429, 811468143, 396065785, 368868801, 299761844, 617462619, 308704442, 206242421, 833439007, 106715469, 970135543, 972244832, 66232618, 207050932, 577078708, 955731123, 103929249, 632790957, 297717977, 280927805, 856143814, 140717794, 889342899, 570959166, 553036683, 311778062, 833874032, 321035571, 629235909, 60666525, 19636232, 889773198, 837811568, 283828621, 499062871, 459250525, 468391935, 389843786, 80632526, 462481073, 859711240, 66143264, 831825780, 518914304, 998480225, 496960804, 480385724, 483317701, 923742113, 771054094, 630267330, 478946945, 527928962, 674723787, 882998613, 123711144, 324674723, 964132061, 961988031, 65215295, 858250635, 924300325, 577545014, 241841560, 172586320, 726876085, 210684082, 897202470, 742850020, 161301259, 120853804, 344539574, 836860211, 667275920, 72688787, 930704832, 179668299, 861726583, 168665810, 834696469, 672920894, 419563732, 302874180, 454615268, 934181182, 119694911, 779976833, 216225187, 244379028, 586838513, 942544272, 397970796, 155525782, 435250288, 609294947, 697035870, 790138207, 313089121, 451259481, 904475234, 15500998, 428233316, 352796372, 805867626, 355791012, 191743365, 390372515, 86113794, 224579645, 34292553, 472538607, 244805809, 799547326, 350596592, 550928379, 248605526, 858957317, 809083222, 418025439, 717379009, 843111164, 748566980, 795763411, 344249103, 246799165, 468081584, 533360568, 97839725, 814208152, 370784820, 149643652, 648814350, 586462723, 179226570, 323415874, 413399345, 830824722, 901264775, 785155020, 673315179, 883230707, 320461657, 209574161, 896187167, 641537195, 580708044, 615201169, 907420567, 226969633, 44823693, 653925850, 618905940, 556249274, 683808190, 595045606, 406684866, 817926872, 498013040, 741888764, 255307898, 750076370, 226664326, 45791371, 138249186, 182084615, 925519009, 32002450, 507648904, 36302093, 164244320, 134446595, 176304234, 443232913, 204696272, 377207389, 330407781, 317016375, 255990328, 346121343, 776903928, 865285835, 180645765, 94169320, 523805568, 66571932, 958229276, 706032441, 157122799, 174128102, 265560802, 960871567, 814597354, 840895548, 702037, 848074074, 17426708, 276377856, 55696613, 206160180, 32721003, 453495162, 587538197, 204676036, 610254246, 936113705, 842825687, 202272844, 145230437, 624393323, 739106533, 700708897, 523328161, 691038973, 656087189, 213848962, 927815456, 921255504, 609475698, 113463094, 529085932, 807792149, 579407091, 163833313, 694176222, 471399591, 346973697, 718259544, 297359882, 892552532, 451373341, 120883534, 8029910, 624607649, 606649877, 815313728, 231664869, 673443919, 615486405, 94571095, 110823650, 950289120, 646876432, 928906934, 684469503, 297251947, 919054473, 285157267, 967739040, 274416446, 465229888, 656873003, 825576691, 53305194, 539107135, 609069516, 669008004, 585520763, 526072937, 91836656, 101778461, 538228891, 424599066, 719851020, 234795290, 701214554, 914481398, 497763115, 504286064, 212679726, 409710596, 134500525, 154608785, 554889670, 267547678, 851784437, 749366191, 681515762, 587313005, 604179607, 297539881, 51380469, 30897443, 988568867, 430543091, 168358864, 325894509, 131217074, 122226126, 289735266, 2541560, 697428098, 339809826, 339814711, 568813016, 256466301, 865405619, 710940331, 7424767, 660900037, 729644940, 444, 450105203, 690939247, 459755659, 92556107, 42398758, 782901298, 483436309, 73995240, 784415989, 602791285, 655683750, 744368335, 684929720, 939318197, 1937536, 94209990, 544006669, 195169186, 297173575, 151918090, 559870646, 425964491, 818978660, 571568643, 60393204, 415731654, 547756555, 991386612, 383053326, 997830526, 963081859, 107336308, 898219937, 906988404, 550036125, 981857264, 691293427, 481189647, 501756531, 316529056, 476096058, 168221459, 165690115, 553028411, 960794528, 453386272, 963889156, 71983103, 494867184, 462967097, 635240847, 989817132, 23786457, 968645733, 163475174, 884798755, 971346358, 8231228, 947835970, 751371876, 21594745, 702982989, 997528759, 30899466, 874470660, 839706683, 64336797, 183002010, 415355406, 851375333, 802315034, 662347966, 459017349, 83113197, 807783874, 686211775, 665742332, 548408223, 38712773, 947065654, 224142524, 544199777, 554457822, 161813447, 59932464, 324817969, 826816639, 159675767, 610260222, 802832692, 962264291, 230527850, 654881259, 493134625, 56109407, 491401533, 163680598, 892934948, 889185132, 78662275, 741528574, 616484511, 204394884, 120980232, 4959172, 884202370, 468625389, 987185268, 797914336, 292935354, 542176515, 965256954, 25044127, 701524209, 669825969, 264620823, 983915826, 463815578, 325409981, 142164710, 946513145, 626025918, 890502327, 456729879, 921471703, 889764153, 10834930, 550258959, 888111963, 456661896, 560525119, 254574198, 379302005, 359197537, 748972811, 432885247, 174603143, 495215302, 304225805, 499574, 89067439, 956588800, 479903186, 900293862, 918419160, 874312513, 779518268, 750190343, 34999197, 204187488, 29703716, 310295240, 212734818, 705461990, 880565621, 542764103, 578132976, 871657196, 920555643, 635330221, 603836039, 905337022, 446003049, 531829391, 914627500, 109964459, 793773872, 883594493, 588890899, 761763418, 850946563, 47045637, 406265955, 398330580, 175033998, 98562597, 74022406, 109783010, 888406279, 62923507, 851720727, 920064661, 659715101, 731241623, 740764931, 68490942, 26861674, 832409630, 156628069, 65837301, 277330611, 504531610, 621094682, 513712789, 824543274, 863846088, 522929299, 50674845, 205053841, 391074024, 703020653, 598865065, 977680558, 126857946, 571772915, 596794646, 195429545, 328266420, 36051456, 451216030, 522276964, 948367998, 561406981, 389510759, 585943971, 108053297, 459413669, 288907310, 136029766, 802792879, 520247265, 414339912, 337619243, 597859489, 40005835, 350918, 321070418, 199829979, 141119131, 515535428, 350920730, 314377413, 808898947, 900198037, 799762368, 570476717, 244997759, 402733111, 626061442, 103647198, 938528989, 898060580, 652361018, 641847472, 149112119, 134262079, 887185896, 606038263, 859408453, 950373236, 692335861, 405660442, 565431386, 959094106, 393940636, 423632434, 612413824, 143336067, 663257107, 9730523, 471491852, 112828340, 936303905, 998673093, 55233966, 416039620, 144081002, 565258672, 539355694, 202448366, 14002378, 539019751, 307827209, 288622328, 788194350, 570120788, 965430343, 472467292}; int n, k; cin >> n >> k; if (k & 1) { cout << 0 << '\n'; return 0; } if (k > (sz[n - 1] - 1) * 2) { cout << 0 << '\n'; return 0; } int idx = 0; REP(i, n - 1) idx += sz[i]; idx += k / 2; cout << ans[idx] % MOD << '\n'; return 0; }
replace
1,815
1,816
1,815
1,819
0
p02974
C++
Runtime Error
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ███████████ // ██╬╬╬╬╬████╬╬████╬╬╬╬╬██ // █████████╬╬╬╬╬████████████╬╬╬╬╬██╬╬╬╬╬╬███╬╬╬╬╬██ // ████████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬██╬╬╬╬╬╬╬██ // ████╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬╬╬╬╬╬██ // ███╬╬╬█╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬███╬╬╬╬╬╬╬█████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬████████╬╬╬╬╬██ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬██ // ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬████ // █████████████╬╬╬╬╬╬╬╬██╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬██████ // ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬██████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████╬╬╬╬╬╬╬███████████╬╬╬╬╬╬╬╬██╬╬╬██╬╬╬██ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬█╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬██ // ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬▓▓▓▓▓▓╬╬╬████╬╬████╬╬╬╬╬╬╬▓▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬███ // ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬█████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ // ██████████████ // ████╬╬╬╬╬╬███████████████████████████╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████ // ███████ █████ // ███████████████████ #include "bits/stdc++.h" using namespace std; #define MOD 1000000007 // #define MOD 998244353 const double EPS = 1e-9; #define INF (1LL << 60) #define D double #define fs first #define sc second #define int long long #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, a, b) for (int i = (b - 1); i >= (a); --i) #define REP(i, n) FOR(i, 0, (n)) #define RREP(i, n) RFOR(i, 0, (n)) #define ITR(itr, mp) for (auto itr = (mp).begin(); itr != (mp).end(); ++itr) #define RITR(itr, mp) for (auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr) #define range(i, a, b) ((a) <= (i) && (i) < (b)) #define debug(x) cout << #x << " = " << (x) << endl; #define SP << " " << typedef pair<int, int> P; #include <cstdint> template <std::uint_fast64_t Modulus> class modint { using u64 = std::uint_fast64_t; u64 a; public: constexpr modint(const u64 x = 0) noexcept : a(x % Modulus) {} constexpr u64 val() const noexcept { return a; } constexpr modint operator+(const modint rhs) const noexcept { return modint(*this) += rhs; } constexpr modint operator-(const modint rhs) const noexcept { return modint(*this) -= rhs; } constexpr modint operator*(const modint rhs) const noexcept { return modint(*this) *= rhs; } constexpr modint operator/(const modint rhs) const noexcept { return modint(*this) /= rhs; } constexpr bool operator==(const modint rhs) const noexcept { return modint(*this).val() == rhs.val(); } modint &operator+=(const modint rhs) noexcept { a += rhs.a; if (a >= Modulus) { a -= Modulus; } return *this; } modint &operator-=(const modint rhs) noexcept { if (a < rhs.a) { a += Modulus; } a -= rhs.a; return *this; } modint &operator*=(const modint rhs) noexcept { a = a * rhs.a % Modulus; return *this; } modint &operator/=(modint rhs) noexcept { u64 exp = Modulus - 2; while (exp) { if (exp % 2) { *this *= rhs; } rhs *= rhs; exp /= 2; } return *this; } }; using mint = modint<MOD>; typedef vector<mint> vec; typedef vector<vector<mint>> mat; signed main() { ios::sync_with_stdio(false); cin.tie(0); int n, k; cin >> n >> k; if (k % 2) { cout << 0 << endl; return 0; } int a[] = {1, 1, 1, 1, 2, 3, 1, 3, 7, 9, 4, 1, 4, 12, 24, 35, 24, 20, 1, 5, 18, 46, 93, 137, 148, 136, 100, 36, 1, 6, 25, 76, 187, 366, 591, 744, 884, 832, 716, 360, 252, 1, 7, 33, 115, 327, 765, 1523, 2553, 3696, 4852, 5708, 5892, 5452, 4212, 2844, 1764, 576, 1, 8, 42, 164, 524, 1400, 3226, 6436, 11323, 17640, 25472, 33280, 40520, 44240, 45512, 40608, 35496, 25632, 18108, 8064, 5184, 1, 9, 52, 224, 790, 2350, 6072, 13768, 27821, 50461, 83420, 127840, 182256, 242272, 301648, 350864, 382576, 389232, 373536, 332640, 273060, 208548, 136512, 81792, 46656, 14400, 1, 10, 63, 296, 1138, 3708, 10538, 26480, 59673, 121626, 226787, 390144, 628744, 949472, 1355952, 1826464, 2341600, 2833632, 3282464, 3584160, 3765600, 3719664, 3531924, 3093336, 2642364, 2010240, 1508544, 963072, 621504, 259200, 158400, 1, 11, 75, 381, 1582, 5582, 17222, 47194, 116457, 261163, 537459, 1022981, 1817652, 3040352, 4810720, 7230928, 10360160, 14178912, 18577792, 23327872, 28132048, 32571504, 36310464, 38903904, 40028724, 39552156, 37457388, 33941412, 29314944, 24179904, 18835776, 13777344, 9452736, 5716800, 3211200, 1742400, 518400, 1, 12, 88, 480, 2137, 8096, 26860, 79376, 211811, 515308, 1153268, 2391936, 4633331, 8438664, 14557048, 23874176, 37407760, 56117824, 80906752, 112162240, 150052400, 193572736, 241706624, 291576384, 341323776, 386160048, 424359540, 450394992, 464545584, 461528208, 446428476, 413557632, 373573440, 321120000, 268449408, 210332160, 162330624, 112550400, 77788800, 46540800, 28497600, 11404800, 6739200, 1, 13, 102, 594, 2819, 11391, 40344, 127508, 364587, 952559, 2293742, 5126898, 10710633, 21042989, 39117852, 69175664, 116857024, 189256368, 294745440, 442503456, 641759376, 900689616, 225195321, 617201401, 74227554, 586823330, 140227131, 711888699, 274217080, 795069832, 242715461, 585116357, 796764497, 861974465, 769155485, 525176285, 146566301, 650715556, 73773796, 455145195, 828946802, 226153586, 685663993, 216281593, 828705600, 536385600, 309484800, 166924800, 87609600, 25401600, 1, 14, 117, 724, 3645, 15626, 58741, 197280, 600215, 1671266, 4295107, 10259436, 22922995, 48184950, 95816051, 181136304, 327071752, 566117888, 942525072, 513281017, 349163810, 532145419, 154557773, 309226767, 88509354, 563257605, 789064441, 766807654, 474675580, 795689314, 599134613, 627066840, 658988947, 307608398, 337632800, 295701193, 44870369, 150212311, 705302359, 336038622, 452522163, 797367958, 62674553, 57993322, 777736994, 845298906, 452367755, 90655804, 810196653, 976943895, 564798323, 582118351, 994783972, 869862386, 697759993, 660441600, 381024000, 1, 15, 133, 871, 4633, 20979, 83313, 295803, 952299, 2809009, 7656027, 19414457, 46086247, 102967901, 217634463, 437195525, 838372452, 540635289, 722168530, 638311860, 640827391, 196046908, 898688562, 478199884, 793020369, 808862771, 562236075, 94791602, 385333320, 237794527, 197694759, 398043392, 504456766, 579736664, 78137089, 793367253, 961295251, 280517488, 179779783, 947563092, 901772777, 859566930, 199212409, 920781370, 362900807, 735004334, 297264154, 482748036, 653703312, 140400674, 623159781, 320434095, 373194802, 13313867, 205909676, 360223815, 570584277, 68075848, 372652149, 961247580, 23084534, 261139053, 151302323, 715359965, 625702393, 1, 16, 150, 1036, 5802, 27648, 115538, 431844, 1464468, 4554040, 13096378, 35069940, 87969166, 207781760, 464351910, 986188668, 998611836, 879505923, 237509223, 15110629, 621334822, 88677622, 257578542, 963016850, 235638961, 442107823, 429101453, 483004748, 329733855, 718448185, 266304376, 413950543, 256286771, 626720357, 318467482, 59069608, 81901162, 352730851, 104241055, 503595237, 956355036, 534522134, 457799859, 108929893, 887297322, 424614770, 265024591, 876853471, 515703045, 692038809, 210906163, 20070317, 468291405, 145357835, 797577421, 232358134, 747771239, 343859985, 833879609, 78548665, 289896769, 449285934, 313197004, 379603290, 397630660, 609910102, 442642726, 627950853, 722186028, 705163253, 998661511, 771071664, 636940611, 1, 17, 168, 1220, 7172, 35852, 157132, 616084, 2192506, 7159090, 21631676, 60902460, 160707468, 399489140, 939796228, 101060910, 481320121, 151453550, 952463061, 931694473, 957528293, 554162053, 990142499, 644946993, 651797781, 791594351, 556120466, 271969917, 107619398, 710253075, 280526462, 615698879, 99748930, 775178221, 257586036, 645364809, 806795120, 340635512, 801741075, 790520661, 68328385, 331513794, 351728404, 931812262, 91105169, 176869824, 445724501, 370449983, 359815736, 918724628, 869062973, 659791249, 657727222, 395793733, 32692523, 78858425, 151369211, 628504487, 842750087, 152091477, 889718876, 908002421, 944598446, 656459208, 712920845, 47550280, 92244967, 110652620, 951703750, 217822851, 901098263, 655149074, 861896271, 859184013, 992613245, 768042116, 807916959, 335381553, 909568095, 153171069, 827990317, 681893483, 1, 18, 187, 1424, 8764, 45832, 210072, 861400, 3206786, 10957868, 34666130, 102239488, 282743580, 736889224, 817936097, 262532028, 534038590, 412279142, 965109380, 86702267, 846482566, 945052509, 644517943, 548776024, 679330947, 152291502, 882910517, 188127435, 636778925, 902059202, 132531208, 193904122, 893705022, 246193070, 652079051, 958060250, 148697872, 504141990, 371410212, 807466717, 514477363, 565424570, 560794838, 11419155, 215137208, 665710713, 791504234, 359367396, 224050172, 509091270, 125989128, 782600310, 957126038, 667219607, 386301613, 605448653, 296557741, 618019404, 194294675, 222923480, 765962783, 743934970, 24324611, 512643153, 214242880, 286900578, 228877964, 91240846, 430467141, 533029377, 904804693, 373207899, 916503101, 83598539, 560288494, 363356684, 68282446, 152683809, 284461190, 124425011, 167972327, 428909487, 373215034, 420008537, 513304383, 874743039, 487193257, 97337408, 532639641, 184378261, 955976093, 1, 19, 207, 1649, 10600, 57852, 276620, 1183172, 4595034, 16384606, 54107670, 166643130, 481442164, 311240781, 381378831, 288429444, 380463632, 370477330, 171662912, 688513797, 626045604, 789881798, 844990830, 70546834, 230422087, 267733218, 970080423, 75064762, 104073936, 888990608, 393490487, 819401315, 362017415, 197941501, 97730360, 491049732, 790022455, 142301163, 381999002, 81566974, 255547256, 500580164, 503785886, 874661360, 953064009, 357278689, 416715628, 656421867, 311332859, 849655408, 575613107, 850236831, 533549113, 255339339, 611845477, 501164398, 135987981, 672393680, 678611757, 552403430, 470027818, 333312311, 203812034, 929380798, 133842121, 497262544, 839881753, 29703780, 133717366, 249364505, 959337844, 632980495, 72879056, 356819838, 662140760, 182352973, 260787823, 329159184, 423643610, 488600943, 164109163, 8143787, 184454683, 684285006, 693158498, 382122550, 488552031, 777204359, 564238497, 598675373, 603916585, 720234840, 93182262, 238936257, 486420235, 352604922, 958291193, 880928218, 736558676, 163545641, 189347824, 1, 20, 228, 1896, 12703, 72200, 359348, 1599616, 6465450, 23997032, 82508708, 264654080, 796563486, 260832418, 76986106, 528774007, 854313906, 307546108, 722735109, 61004626, 805619536, 18191861, 511411798, 993782454, 401030744, 633897378, 70862649, 96855526, 314416445, 92910833, 135520920, 492052755, 24334887, 643976444, 574388511, 317610455, 122930943, 637889505, 255461238, 950861369, 48876234, 149504663, 198682481, 942670278, 866921314, 563621302, 960474580, 980132644, 624295523, 399490883, 351714973, 945626033, 827908349, 157456205, 481861323, 472454109, 343580291, 683697065, 95059407, 841332348, 464714941, 596887160, 38681949, 757883329, 590303711, 64921694, 730086270, 15240461, 714742087, 32874447, 175996750, 277466516, 788882909, 11880203, 95097385, 778398376, 531252352, 479554466, 557013590, 609738833, 798714176, 859324339, 721484640, 268442938, 861267595, 806087188, 31691029, 950412807, 580575404, 849451646, 691790951, 264837637, 967322620, 365040170, 622467624, 456436788, 658680316, 60575186, 387550026, 215002020, 31349904, 449373833, 559514745, 640364153, 807042078, 450172023, 562637973, 109112418, 545193132, 195217263, 976304283, 1, 21, 250, 2166, 15097, 89189, 461164, 2132144, 8950214, 34503182, 123236828, 410729140, 284813823, 790835929, 594736274, 153822108, 374418504, 157537842, 147846917, 133568389, 483576696, 508616649, 656867821, 84463125, 640047601, 955370715, 182167616, 49108700, 229345632, 795610484, 502493987, 857101031, 142485158, 996679960, 742503997, 723858587, 317526153, 365342533, 250775491, 442738912, 408346120, 881242865, 135363327, 231979623, 347291745, 824934645, 995772018, 164592917, 354883487, 450805745, 963969802, 171006181, 92161176, 169883419, 961669090, 26844445, 393784092, 571606470, 464707158, 34144520, 652396373, 745405475, 202923498, 135935314, 703695236, 776259115, 48310283, 874186699, 219390686, 510394758, 751965065, 418424556, 8781061, 736058807, 674014147, 674780706, 590530540, 4352977, 803825827, 167292329, 541083402, 260679638, 665083995, 939990721, 816665296, 886017767, 669822229, 694816125, 643235536, 937314556, 115942268, 261159535, 687177905, 12245758, 694615643, 977706180, 217949106, 118952653, 898868241, 856650616, 42954342, 330321980, 535121720, 982503521, 719423135, 714354007, 18745970, 333448882, 302037622, 935654015, 778423936, 317991952, 284756555, 504736970, 155871365, 118263505, 797065125, 640838446, 258037348, 34344762, 502389803, 911086550, 1, 22, 273, 2460, 17807, 109158, 585339, 2805752, 12209406, 48792492, 180680070, 624410736, 25734764, 199973794, 977710523, 571365953, 412869707, 328237414, 214863466, 633048751, 257394955, 317735309, 673309005, 193600985, 704135816, 514918834, 650479735, 33606857, 490034801, 698396427, 67986999, 220797055, 218864611, 931163713, 940790978, 675674698, 85542051, 543018292, 61247584, 910803604, 831296179, 923943160, 89478028, 104500393, 161998091, 254912705, 539249258, 547749719, 357852173, 690014841, 206926249, 893887199, 747112232, 382059625, 148865046, 301618706, 260333115, 442306036, 247371284, 782005651, 233300621, 920894203, 317455792, 678639547, 427050277, 482884001, 854060466, 980543322, 860769666, 701293636, 771136168, 670745480, 486701027, 168461356, 848787800, 289825171, 498776317, 33320170, 430165721, 821516580, 115533370, 398776967, 333310602, 563097053, 553134182, 219816464, 216637272, 206027601, 933677337, 925510467, 267639197, 43693887, 486722546, 270929495, 877730912, 261947307, 375318068, 692508932, 989184491, 226696206, 288508969, 739837562, 849035543, 782296408, 273955665, 801085382, 431898190, 935043965, 202752072, 867866169, 151133676, 67940990, 78118516, 742654574, 165553271, 254022475, 668960857, 929973305, 656759571, 877339826, 925206924, 133648890, 623964326, 796176354, 256442424, 844384225, 955053908, 35821657, 33969824, 328610099, 171474448, 265634834, 954990510, 1, 23, 297, 2779, 20859, 132473, 735535, 3649437, 16435370, 67971642, 260491974, 931772466, 129241853, 915880695, 773220207, 21124907, 663657824, 89235883, 562087424, 395633225, 79602143, 818737728, 503346111, 923762587, 810187543, 71950684, 872552891, 722894374, 788701216, 792043650, 839896539, 577542972, 345484502, 350106805, 159630680, 594479078, 806985602, 451202244, 562057157, 345406448, 404888318, 371479292, 122121086, 196184273, 855722413, 625056343, 209132008, 580725504, 234791519, 683270249, 879431955, 820639155, 890517789, 877206124, 780147370, 943542736, 532169988, 134361777, 389279830, 486085405, 212150153, 60309713, 36144061, 220641769, 167907687, 433032241, 672669299, 4840381, 543970499, 860603358, 920463673, 899153827, 269139419, 99866794, 833550296, 732963165, 649634036, 220976898, 948879986, 81746947, 249278044, 943429751, 227240067, 617290217, 857759442, 317672542, 702411387, 392102340, 598392406, 771484657, 20769431, 772211314, 777981688, 103043307, 336611982, 922346108, 46010568, 620920750, 740298345, 143296430, 127113300, 229361025, 452883985, 298773134, 583669967, 430943791, 878469881, 498554889, 377075156, 399618101, 518539100, 610655946, 762624102, 339746521, 193491143, 582788075, 58498274, 139175929, 439487543, 659039143, 969039085, 205473123, 149794944, 735361805, 144310487, 952281582, 885994682, 290034640, 449859219, 870975475, 717604104, 930837761, 466542500, 510501275, 368063612, 61813298, 959329905, 938922014, 660077190, 12025968, 335011033, 657136343, 351072920, 964781583, 196462283, 1, 24, 322, 3124, 24280, 159528, 915834, 4696644, 21857553, 93405656, 369882084, 367190881, 745178532, 541448535, 237690972, 408537702, 191376116, 678513161, 493570976, 397907192, 9101765, 658714208, 122356973, 514532531, 911169029, 6916896, 782796, 910119724, 942560918, 62371227, 773940129, 523667340, 669757203, 42568262, 891666384, 467022993, 486796667, 727294526, 413613585, 787453753, 599953158, 417187968, 359849625, 117069116, 879478181, 12380000, 910899870, 838986319, 102687453, 103327364, 376800830, 429223538, 780159138, 706916356, 587575355, 971169352, 36010810, 483798044, 344462034, 787276711, 359714668, 737585540, 514856433, 506547585, 7966248, 935961, 931790046, 725219981, 437246235, 737823353, 539625329, 101294921, 998345360, 158678756, 14552916, 434899855, 58679632, 771567929, 908041362, 370603042, 958461645, 473954165, 329932246, 645017860, 950250115, 632956030, 39737256, 308287817, 593859369, 848980890, 73354610, 67983312, 794665532, 744501399, 571146358, 79777328, 768540650, 301591668, 87146707, 749547055, 542914952, 113807115, 981646049, 443442346, 689844336, 226785366, 664441023, 644644459, 65534356, 186334852, 433121661, 818953887, 687026114, 344822747, 464015963, 110899493, 294091084, 65199948, 37449794, 719226153, 501099656, 413337315, 725255533, 799293560, 259962068, 954615054, 373654234, 764439094, 914044890, 22085466, 539035590, 698634111, 313016212, 98993468, 941478268, 955683335, 902077766, 420565422, 767959775, 128648986, 355285226, 534029655, 104714136, 932643222, 778200211, 56428536, 225880543, 792355687, 449940761, 181471652, 529937629, 325235521, 6575392, 94094707, 441392085, 37264955, 911557047, 1, 25, 348, 3496, 28098, 190746, 1130768, 5985744, 28747851, 126764795, 517958180, 975500521, 75313899, 914923483, 611051644, 458281681, 932346365, 712529240, 185024083, 463834094, 950836649, 286357381, 871292163, 434939852, 58330077, 629835295, 27932676, 66354549, 10923173, 590226200, 526183672, 176005584, 809584977, 222348292, 260397896, 396327746, 178971085, 774808076, 78650222, 507195902, 144802453, 299847298, 581537053, 724817078, 350425193, 503589319, 654904119, 595937600, 992781673, 82554146, 868891604, 769490422, 119334199, 287573489, 85347169, 118147346, 949694675, 540939467, 927324362, 545027201, 610310429, 769058023, 21423, 262519735, 786795808, 240407039, 428554518, 447092428, 788617633, 367724192, 374279457, 343082569, 856162651, 150954733, 962857235, 700751807, 895999415, 533537747, 537990547, 268357366, 869434038, 633081543, 603452058, 947934680, 987367826, 743179254, 710352935, 835787228, 706586787, 845202323, 238777269, 405136472, 480736674, 155194042, 871452828, 677921910, 616952227, 984554304, 602482844, 894952109, 161534829, 782737895, 850072208, 670793244, 828100052, 222399146, 284700626, 231919567, 306545173, 673216888, 772842480, 314744315, 347738200, 25002680, 730048408, 649455506, 745857274, 196252843, 529935260, 419302767, 276709210, 732855171, 343508231, 624945362, 861002432, 484757974, 367927715, 209929226, 661865936, 531107025, 413469524, 479519565, 741904536, 610072165, 606639245, 934344602, 716197790, 587584177, 185414563, 306822687, 841034662, 971868532, 919896238, 158358640, 773475266, 936203252, 665923149, 911486615, 197651366, 774528535, 82937079, 883806524, 130206852, 774201811, 995994000, 245370199, 842572718, 793423605, 740588350, 687616120, 657690139, 857790226, 37323118, 88399209, 523321086, 117621631, 71036645, 222192424, 788926021, 202125596, 1, 26, 375, 3896, 32342, 226580, 1385350, 7560544, 37426495, 170077814, 716127109, 814596482, 388283574, 187079164, 480126707, 290089727, 38629756, 54115650, 64891257, 901599546, 718222041, 911275669, 323565019, 817912019, 805459451, 803612364, 201797073, 732830955, 80380678, 23464457, 701195891, 272214917, 913862649, 132026200, 669751010, 759341231, 973676755, 794065196, 967438659, 308299894, 10712690, 949669597, 781686555, 88559004, 727530543, 318751597, 278470531, 434911202, 804701133, 324324750, 981099143, 232682614, 987104568, 776649739, 786487389, 442468777, 569068005, 663709268, 881510700, 203686642, 57967683, 568729400, 236001193, 623959074, 703861418, 908672716, 70204475, 867825588, 827103298, 241630317, 362696969, 415618616, 805038660, 598704556, 10082872, 643477587, 415164213, 703084166, 477367476, 20036406, 629980785, 802614294, 952521645, 17601466, 311433959, 830294700, 548394039, 535645146, 521413012, 929141249, 283365227, 727229980, 443388093, 410708269, 286618040, 319768543, 938841603, 93475597, 394693465, 931196821, 495806189, 902879580, 707905623, 303901454, 576396872, 484544924, 486011674, 564305854, 311518869, 856442237, 372745088, 366968335, 813470622, 720542245, 551543931, 596748971, 778551123, 354920979, 984250497, 691689872, 327423759, 52302396, 920309409, 457393341, 162758194, 401889329, 760192486, 361045291, 58998809, 845800809, 8575285, 649668894, 501939170, 542308042, 574502757, 192463535, 690505425, 204738512, 689813836, 483570629, 525148782, 216925832, 952334594, 68584858, 946061868, 229986068, 113082103, 705545851, 563504064, 430610853, 209937938, 608555345, 578039088, 750439353, 944169681, 417934823, 74422181, 960090808, 568355902, 435674968, 894299009, 15861008, 618713868, 509911155, 168869978, 339481775, 369451744, 600513141, 71634326, 781507214, 857107917, 106564183, 736233715, 362800524, 615467708, 519437498, 342065337, 206666492, 505918934, 308299385, 20927738, 106279730, 457391057, 1, 27, 403, 4325, 37042, 267514, 1685106, 9470830, 48268511, 225792189, 978561725, 958557158, 38052071, 919433401, 254995547, 546697380, 704487939, 32839999, 508901654, 551556389, 663564198, 695178769, 814009554, 547143595, 371559020, 945387943, 670094820, 616330760, 976064124, 607380120, 8699769, 998280938, 580008436, 958036252, 912203574, 544195790, 396609897, 954428754, 708902921, 801338681, 431017191, 381717232, 344144422, 131861617, 874277396, 830300192, 596462835, 318671397, 244894238, 904557382, 834593756, 283869037, 697514761, 969250693, 509524190, 913260759, 384371901, 692021356, 509945770, 32685910, 505430483, 907189201, 193340383, 693205397, 603006308, 305262013, 925218957, 968092842, 27052064, 47727228, 477199307, 293774777, 98292616, 663047137, 995897620, 288543890, 998081856, 524487172, 892499155, 556044593, 972323813, 578208602, 933674462, 509188659, 985492681, 986901126, 628028841, 519717277, 311965185, 897395442, 829761538, 9680527, 161715155, 343759581, 402616197, 861303980, 911400557, 358697993, 515548395, 553147014, 892738525, 205604013, 762111690, 442223169, 7841804, 517369986, 84729818, 152655938, 700957258, 898706126, 75157861, 271201265, 543855670, 440588279, 204308612, 236683234, 208667572, 404506592, 809547310, 853106482, 518815458, 16491026, 491832633, 360120645, 923872102, 602086347, 641452842, 18221609, 229080666, 428455406, 569262655, 856993308, 230900297, 490066099, 367669571, 96292417, 52365382, 469261002, 374633464, 900617667, 182287939, 49700390, 796588976, 949085023, 222503562, 658471212, 94278399, 66098044, 72459139, 603916441, 257635815, 234793049, 951525459, 549173423, 938321308, 13662267, 288258509, 65326301, 11071916, 364716823, 929353581, 839483911, 199241395, 29486252, 482468148, 829994735, 370892643, 687560607, 531658704, 568187724, 486108828, 475403750, 227529481, 124500798, 228110006, 56292488, 958873404, 963718586, 481659835, 183136868, 593123751, 622015148, 469053734, 211587807, 928091671, 481375722, 612130911, 134707706, 334981252, 784422204, 712253942, 698883770, 390222722, 25478322, 28778175, 349558455, 616616543, 1, 28, 432, 4784, 42229, 314064, 2036108, 11772944, 61710789, 296841956, 322742117, 501368237, 486564198, 208215103, 787564548, 236938424, 301578523, 866593178, 461034739, 153403692, 741061604, 268366308, 41671958, 999969805, 820629183, 540097933, 348143198, 290585123, 709901036, 830657214, 397773343, 205345230, 80836479, 744283025, 767371096, 13280133, 166091858, 688213267, 405245759, 999129285, 957885801, 125598090, 229197648, 232621259, 771781842, 15692966, 623498734, 209019752, 451480479, 405116698, 905232949, 522429827, 160392239, 911337480, 463779522, 870625842, 997849245, 364479050, 834828, 300785526, 10186705, 265101999, 566806573, 614983712, 685595755, 48653250, 344390997, 673637797, 896886255, 108856368, 31386606, 486989879, 489263782, 517653845, 976993581, 117774221, 829510874, 294191687, 233225993, 831800739, 448583977, 657291524, 649603801, 456575978, 536862581, 855051723, 994222346, 302476269, 502749737, 322446053, 790323255, 357338908, 887312147, 181428924, 536100952, 55330164, 160205355, 190454705, 365581727, 201998030, 826748536, 400273437, 624522779, 849319472, 800147953, 80982274, 447705256, 168185200, 97822479, 309878269, 678607548, 912097410, 927785144, 334246635, 662138658, 715198385, 260363473, 461374975, 89468114, 651175074, 575096135, 130470890, 71518840, 879845193, 486812125, 128678982, 647847215, 49005945, 59417027, 550597313, 85275582, 589669875, 488581288, 579391253, 238935007, 307933774, 801626662, 991248834, 831660242, 2289249, 939337934, 170802252, 112167473, 712496239, 45742853, 482400666, 341362938, 957391891, 147812751, 376451585, 832724562, 418101830, 38563919, 274362964, 819817184, 400041713, 313141267, 806456583, 999307614, 670677205, 585839782, 845991536, 831623045, 109161241, 554327240, 822718306, 173814042, 363700239, 22366070, 479904205, 190929878, 554951008, 774006606, 279182950, 109357938, 401823952, 575672540, 860574847, 593910748, 547825741, 217594637, 989467389, 184852185, 331539318, 325720467, 383229710, 654245987, 146654996, 209385163, 560462909, 965812836, 65583448, 508391947, 709539829, 955465325, 214525022, 394005813, 531700924, 773028650, 417539579, 326670161, 406612199, 165245, 699092510, 550837077, 14964582, 527720684, 440459594, 268905155, 297293091, 881879628, 1, 29, 462, 5274, 47935, 366779, 2445008, 14530396, 78259797, 386723841, 770080067, 561338901, 331351593, 839635833, 167817400, 497149119, 881282118, 352201610, 471630724, 181160121, 88806794, 987377178, 289689361, 946592969, 656979867, 594487341, 196240769, 948508749, 810784209, 709855728, 576276359, 518417791, 87667236, 667014934, 181628700, 79050911, 337053925, 373883684, 560120551, 458872893, 815731972, 827954345, 771964062, 380463298, 190074568, 335845313, 308369049, 297128477, 730684746, 742600059, 263592454, 96421517, 206168581, 306386280, 238588046, 136275025, 509837233, 285349782, 467079296, 44733505, 132275281, 829959933, 391862643, 62600608, 253168338, 426879146, 365435454, 91732486, 471304236, 543190875, 798110387, 894371900, 696428631, 750022470, 726550236, 936549828, 542410178, 939184541, 791578453, 983635297, 823881369, 150676558, 585328209, 653882077, 963087655, 950795211, 936066317, 71868369, 440124326, 965151462, 175368387, 40663323, 699428294, 108367130, 332044307, 970432796, 572024201, 885659377, 539317691, 132218646, 139253073, 467726930, 45351751, 297376822, 508633325, 703469419, 746467332, 503668629, 112630766, 930570931, 962347630, 576196343, 698904389, 167199167, 333129737, 608922442, 222067115, 688206452, 802821275, 954540394, 911151138, 906746447, 902608727, 890863920, 307268385, 54404696, 104370759, 495676754, 441341576, 829087999, 88911607, 975336543, 381836343, 298727399, 758323163, 709721214, 146811076, 322114121, 909574264, 955852236, 803216000, 511491931, 157225317, 671670053, 367885171, 612666342, 842261160, 508147005, 345029386, 809990068, 981225972, 241279545, 458275632, 172983843, 48836190, 961296645, 538132589, 271432367, 877708377, 386417805, 815731556, 463571419, 404450924, 113136747, 549319603, 219464194, 220054123, 907114544, 328856175, 265047793, 589592614, 328159953, 809008569, 510434161, 420313068, 107873733, 868895119, 895337042, 156863206, 48004547, 666506430, 727609186, 85858741, 59205240, 78940637, 545962715, 139572749, 421355881, 858507471, 952603331, 401020118, 942925111, 296295597, 997986384, 115737481, 677010850, 282276283, 274892540, 163700485, 118592549, 846472792, 136765224, 236032397, 179431589, 539549211, 214067143, 923131121, 999465547, 232088789, 610013691, 896204760, 478686995, 218989077, 91096939, 221616643, 243944261, 454787573, 542927414, 355318220, 147354818, 482630, 675619041, 634351197, 478341164, 574509037, 738721209, 1, 30, 493, 5796, 54193, 426242, 2919073, 17814512, 98499977, 499582398, 346636279, 286311246, 338970899, 482987014, 740494022, 522312682, 389124982, 438269373, 295660905, 384589942, 269003911, 190728878, 21841107, 394443500, 159301748, 885681179, 869073529, 396029106, 969827087, 16747334, 474716791, 259235367, 753984455, 365768194, 423375006, 957390875, 407261764, 592999097, 928039310, 529328158, 133251022, 533719572, 434981329, 779487889, 212784950, 467080112, 287628298, 91658981, 576061624, 322787361, 682746649, 234833733, 676878118, 220869554, 982232103, 879428014, 742840902, 65876039, 230084790, 68776407, 988541480, 113769367, 288661011, 898604342, 790158821, 811679832, 416532461, 643426286, 357304561, 904850873, 143689492, 643378934, 217587561, 816799579, 741653213, 950522177, 519192837, 195766899, 875531753, 913462122, 931740864, 147485151, 73473743, 881407231, 943949423, 19375017, 95185407, 658198820, 654223830, 78841384, 487272636, 810454297, 156111172, 108214345, 594083015, 721613382, 413639222, 199581479, 219296986, 983776208, 50034813, 434669652, 336761553, 553659069, 443256837, 867959007, 649693919, 829394710, 511124003, 801382432, 809258820, 440312724, 549557631, 57091967, 619973166, 38255131, 989252595, 296849831, 126449228, 992478958, 948085171, 398912012, 308493194, 585304989, 581850817, 704472537, 457658359, 706849064, 974235300, 322942033, 801441410, 806760539, 930211369, 674605925, 140615032, 804334982, 654022727, 747554604, 304695097, 670935186, 973200118, 899755340, 43016718, 33443894, 486649937, 183173093, 28680647, 612676891, 17478829, 208078434, 467131016, 651933212, 464433186, 3993644, 959280435, 310671435, 524438940, 540166082, 143663989, 984026973, 596317769, 299039541, 925611762, 115137245, 238184581, 798462400, 902062936, 499673997, 696053154, 121959061, 376644235, 378356623, 996412950, 115590297, 517087995, 817795384, 731733847, 61225249, 930096903, 292653780, 149516053, 503527083, 233497811, 781589564, 87992011, 514696635, 495015483, 151617728, 478098704, 773499685, 621536652, 787266199, 440325002, 249898342, 747360642, 671517137, 216648293, 686506084, 544204132, 949750238, 249236969, 319054830, 756596931, 233403453, 594672369, 158463779, 809106181, 249481644, 610711719, 262167344, 179138909, 270160113, 278492510, 490828032, 946977816, 803242084, 541036271, 624688984, 204404014, 881539240, 779609382, 561095932, 524976628, 888316278, 139701497, 712146362, 413036824, 810411985, 241441787, 247390036, 695355554, 122993697, 227371919, 399947791, 833892197, 899399938, 781528108, 656359733, 551706967, 845829828, 900357325, 1, 31, 525, 6351, 61037, 493071, 3466221, 21705119, 123102861, 640304911, 83941000, 859775332, 485271727, 929183599, 393442380, 976105677, 287805815, 238271867, 74391877, 765979021, 335546599, 709265303, 808915958, 907593582, 463983041, 147572225, 888153362, 391439968, 221443415, 801779213, 245226914, 866175931, 810047153, 267980729, 805674759, 955321032, 906824500, 367243333, 486256638, 145115859, 530769671, 290945081, 932311137, 51068986, 807551107, 185085629, 261181005, 959829857, 118218336, 295880881, 506261294, 848742193, 936582961, 153400705, 578662225, 341741810, 161659811, 816049772, 839223846, 559301757, 400427189, 216771109, 207016492, 505237766, 795055758, 945605740, 555992642, 907845643, 982951177, 401043526, 597396374, 84431994, 362552441, 746539639, 303946121, 357484364, 893505269, 526515449, 560103044, 121894895, 445706213, 592793631, 713670463, 810676671, 143889731, 392244416, 73126772, 488568958, 542583029, 752584772, 7383345, 155007498, 994039957, 804821801, 379264833, 525210782, 239847467, 126254398, 219331239, 753237922, 434345445, 635807399, 872366121, 133933893, 590603804, 32230684, 70841222, 840236255, 909722819, 689521789, 529248821, 178846494, 980363222, 548654005, 434479841, 697553680, 35011089, 544881135, 260563063, 695816358, 44173506, 726085055, 671716390, 781464159, 450226987, 146813053, 877951734, 991641337, 221699230, 419417817, 794832550, 810418558, 969705412, 219055178, 274301546, 503413612, 695160244, 74090275, 26176299, 695070748, 341801549, 897892431, 470380437, 3467372, 448525308, 439337134, 724845391, 9187155, 585558376, 372261444, 277930003, 34819054, 431482585, 279947765, 492267585, 818516372, 484582901, 390623889, 856573701, 179325546, 611189228, 688765384, 847931848, 534263758, 557397045, 116495491, 85868985, 610969731, 478650084, 585159686, 14772190, 776211983, 474268574, 460744792, 134988124, 912707317, 105964987, 809266690, 785401545, 161419686, 653370610, 499797235, 534961655, 323936668, 802659551, 370287438, 326963010, 342959476, 313044094, 148582386, 976795271, 120954501, 724957759, 860215558, 270001726, 640931921, 833230238, 701256342, 242231076, 286286219, 13632467, 253663042, 129411109, 603714672, 564008356, 523901279, 216864213, 524434304, 182659511, 983267072, 644616701, 707181007, 618980658, 405751838, 571460922, 136629759, 744395053, 539608518, 963053644, 97893406, 866038338, 265757870, 944699732, 964525924, 892464175, 168006507, 562926324, 742708490, 132927348, 526909479, 79557205, 129052432, 157042523, 659309142, 834183171, 802572815, 517259737, 256356803, 353227137, 87135975, 224995979, 596580540, 402931204, 515099940, 793833445, 691900231, 589149123, 114327507, 887760880, 389703467, 830251700, 783657579, 433484966, 412892473, 432995349, 911076886, 112628181, 1, 32, 558, 6940, 68502, 567920, 4095058, 26291268, 152836946, 814626856, 19929138, 508014078, 3627542, 383619686, 178749032, 257695016, 714018516, 472708243, 782289684, 785010736, 673452130, 967313791, 416615851, 594708501, 823838568, 374885539, 520875465, 462873691, 866641568, 110422771, 371334024, 597629306, 954905318, 192386746, 711820060, 202869372, 886359460, 670157944, 884126969, 502946720, 582271977, 402610790, 343533084, 511648372, 517557636, 170605372, 597697292, 829559995, 983984749, 601678152, 265076525, 200313780, 586898347, 936910249, 473920775, 97417050, 844866738, 973357211, 106398807, 531568235, 220592830, 72245680, 709223174, 966562898, 364453034, 204299565, 516186616, 388239153, 70201813, 72763421, 794896998, 14537122, 759848271, 370782607, 723372604, 610938893, 161728308, 212501210, 376508968, 271352258, 323852567, 552136716, 801650724, 615740271, 208656790, 224034222, 747809272, 617340476, 153891047, 285642015, 901118362, 123777425, 16228193, 623027527, 937436377, 60747289, 714381298, 882770713, 15381170, 999192137, 197256049, 480638655, 953137460, 883599778, 148656904, 722191509, 39402136, 582147050, 757441169, 260428827, 253172482, 508174417, 834955862, 157349819, 261175551, 247577251, 264652493, 595186522, 812752039, 875384578, 747313263, 224431706, 462673707, 39074204, 237357876, 896371707, 361524710, 10299862, 761952483, 924315000, 304463541, 831385606, 228637562, 845205390, 599099308, 177524018, 209006125, 256908838, 355221513, 792061054, 713446694, 397486564, 756107839, 527866716, 337624854, 575430320, 456754471, 959728018, 921786900, 102983773, 936936381, 473475121, 131588049, 189268154, 863126769, 700571091, 871530822, 832046604, 609629520, 45186676, 853387560, 464311797, 368430192, 151536782, 691919878, 176735598, 972465597, 804610607, 50289062, 722819065, 20410813, 11987321, 648373171, 889715409, 778512390, 280809979, 767453391, 155472064, 275305459, 296611231, 377220752, 229158487, 259857310, 987705391, 873889855, 448418244, 657467052, 301028637, 400332864, 304525446, 853531448, 201469133, 757430782, 288842043, 292821474, 389580374, 148645279, 450672899, 404696472, 399758661, 549392647, 972607841, 459482261, 344863732, 405989209, 14412475, 913865943, 988039851, 302203080, 293916756, 28383491, 502818531, 791480646, 619991127, 151573496, 311251301, 362738947, 457688580, 884177111, 390413172, 889218635, 530910268, 818241216, 542232757, 765042883, 885001834, 10229128, 574524301, 836418812, 984923781, 235783687, 868003012, 379478756, 832878398, 751487743, 496700139, 587857943, 624473538, 510088706, 778144708, 214176553, 953029206, 646822434, 252787767, 281229254, 401166205, 434753895, 343430684, 941989547, 465870277, 861407908, 387687010, 216509894, 375279811, 453878600, 982073623, 677731113, 95924240, 198468867, 861679672, 204003039, 472066136, 228890861, 880462406, 133638984, 924365283, 274136081, 742318625, 898640542, 85174164, 775817726, 982947180, 716729952, 1, 33, 592, 7564, 76624, 651480, 4814916, 31671996, 188578368, 29248753, 200002145, 508415428, 442411092, 823607844, 339155380, 84465338, 814093820, 347929398, 722645092, 146033429, 312847170, 460125097, 915837300, 530134554, 683613860, 22911398, 950166343, 297700883, 874171812, 779302544, 705201416, 91735442, 764568060, 448540109, 794383951, 50664826, 501387621, 764478731, 392332791, 697065547, 136584719, 904822171, 811342153, 498086442, 66346910, 903864157, 648069920, 294527566, 68277872, 192952288, 465503414, 89641650, 342876181, 975687654, 849073744, 732768838, 299144725, 960087859, 432060633, 521050995, 669642411, 783220798, 964761936, 888496451, 578822675, 774117896, 595815330, 556187991, 328078421, 497539038, 461150544, 593197759, 454579240, 228665398, 675695769, 189021504, 506127036, 683711210, 767254008, 372876392, 950363733, 781425867, 518441353, 618578159, 210702480, 146366158, 211092828, 25645664, 252569415, 768287264, 315751220, 46304131, 875313001, 63062094, 41563387, 521548621, 882111752, 325592507, 674715724, 754661696, 386558110, 154963091, 238088464, 48050421, 639662963, 70331570, 315682289, 290604457, 553625701, 114470501, 286499320, 302628334, 934963054, 90280656, 946037777, 701374947, 21339121, 663053978, 944685826, 452543047, 117230904, 560747251, 199227363, 16627409, 318622953, 147892287, 924956445, 813803967, 785002825, 524657750, 94619872, 228326183, 399365341, 370689535, 675442405, 908504726, 873312142, 624281896, 910865167, 214431914, 356568789, 649815619, 48684312, 203060656, 723151845, 388405201, 798060040, 729614446, 977682164, 533436928, 146813819, 149571082, 895803037, 777214043, 552248021, 204656845, 982800841, 733286978, 63964308, 481147156, 389291330, 76639625, 311176854, 441157810, 671041225, 83215916, 462900391, 792922861, 933493638, 911064426, 640299582, 658369868, 816565473, 95242536, 385493380, 848295064, 737403618, 437312030, 117969370, 718173112, 995019578, 309321859, 756181744, 40101942, 426476878, 702396178, 795715493, 835764511, 743326504, 209546865, 430615231, 826070511, 334341237, 118979238, 371120144, 839568659, 676120384, 72519, 845333099, 357629799, 910834209, 593346831, 104377605, 380654497, 634970517, 115890735, 793059350, 887063630, 651636452, 507749972, 783577804, 143656503, 242083869, 911105370, 970085702, 524972130, 465698950, 325374351, 536364599, 196104291, 139239152, 633851401, 256158579, 919175466, 894613648, 315818683, 5141779, 876022828, 934709255, 681050535, 191918360, 662583345, 207316521, 848780031, 272975543, 702356884, 769886013, 961041057, 6500208, 70262300, 494310602, 739703998, 384177576, 343193798, 693062586, 969762392, 66952659, 685150241, 630304511, 413041585, 515441116, 191001103, 912006289, 473846745, 605301455, 795067847, 856671001, 508821454, 735406667, 258084054, 117733205, 780290039, 23367661, 593944851, 692132515, 4650353, 187487602, 151055135, 898863554, 673507355, 215091232, 603704193, 594167428, 682519378, 496434131, 965159536, 430378180, 248402836, 470772870, 307340881, 347656961, 749714755, 122062081, 558277910, 169666679, 941915597, 277380477, 270070849, 652088255, 549544085, 1, 34, 627, 8224, 85440, 744480, 5635892, 37957128, 231322416, 291965329, 678229698, 199102832, 733159273, 432255582, 825398987, 945721657, 530531857, 605903605, 198451639, 405128341, 881104650, 95712824, 87475937, 88052462, 854657880, 671362129, 345256719, 279913923, 405600244, 791623773, 184158289, 548244621, 559931899, 811302745, 822463013, 829884052, 612803610, 114370483, 717655175, 250670751, 158660853, 996989593, 922821653, 403693850, 640224917, 726696528, 558324649, 504260316, 457498775, 235424755, 214797729, 595578763, 703649058, 668639597, 273743575, 830864733, 8621856, 152359528, 351252345, 54682531, 631863641, 533130514, 548187372, 212107229, 690348600, 269650465, 644636821, 588449397, 716956418, 569059993, 571818753, 620732748, 238441683, 628780105, 73251606, 77232245, 265685085, 860541096, 181038883, 995121568, 787161997, 984175916, 994855981, 70309595, 279951259, 412871815, 881913054, 268261177, 575207129, 196951994, 610045829, 705950877, 200402175, 179100085, 912730914, 795237101, 264189519, 756871237, 840795855, 477498958, 568161700, 101820158, 478938140, 546807900, 824972458, 320572966, 375535061, 712736750, 146215080, 296045377, 892271196, 198915619, 973312163, 292266224, 766955048, 774760742, 724672108, 189810671, 590576941, 955913056, 705860403, 956268133, 120026477, 977289531, 897970234, 594373646, 802624855, 16139526, 294245189, 661099173, 505327457, 687552139, 570417673, 288750674, 928298666, 124243321, 103493234, 782666425, 810561902, 479140046, 567654010, 66398299, 87173858, 171094018, 401077961, 201022453, 649177770, 751032860, 458665510, 583069945, 3741921, 644139368, 777863779, 427938859, 574083500, 968708036, 5259009, 14753514, 566158894, 428971413, 29779639, 601893398, 934948155, 463945886, 442386091, 787098075, 294593703, 467511028, 998601384, 749411810, 495421040, 283658473, 287441865, 687819162, 964614928, 353638623, 648210867, 238886215, 893364457, 158958124, 29345292, 800368429, 595552294, 572640574, 913495958, 705720935, 850127566, 83220185, 799386246, 848828465, 335228800, 498492912, 819731260, 972790229, 191002130, 289923062, 997108332, 479589354, 13686350, 377632380, 915241611, 38445376, 115515812, 312111610, 862313776, 36444206, 491509332, 899038496, 494299749, 577210085, 925017398, 377889538, 129014425, 544007299, 134491550, 77644047, 150186363, 549177782, 243194000, 889811949, 476414356, 302027816, 934223010, 116351600, 936035078, 728736728, 99057293, 233685532, 715949090, 484999785, 527817757, 40017975, 403976200, 963752121, 230480821, 165554215, 501580240, 480519751, 374582722, 588438105, 13652788, 835399525, 909982574, 63720437, 165170490, 768431894, 385829327, 268804006, 950180874, 398363435, 512876602, 149304949, 858796870, 305796565, 80654592, 209088881, 365995652, 741417209, 580938286, 849913699, 209592153, 430983500, 292682916, 89781822, 346251985, 899920810, 490814818, 319818650, 865676138, 199552930, 49606030, 396988194, 289382805, 394082926, 680976370, 125444750, 312554820, 11884810, 730982055, 36906819, 144996838, 532313029, 339360681, 509568859, 763509787, 79118993, 930179491, 756170211, 627420026, 161269793, 542072728, 498021200, 392693531, 523036960, 919765468, 367278574, 755839168, 466305341, 613534367, 534169086, 166110829, 107021592, 280650539, 268761091, 590645300, 269909358, 234042842, 1, 35, 663, 8921, 94988, 847688, 6568888, 45268120, 282195928, 611807809, 518705216, 990050297, 271051698, 122408000, 405189613, 94926808, 864141322, 53735275, 24011733, 736554738, 929218491, 904644261, 780020466, 504939462, 734736582, 905177688, 612557341, 964587741, 714487014, 841745335, 939266470, 221175663, 553510265, 427922711, 816845808, 551876447, 104782423, 432788437, 75343637, 98990584, 780296494, 401590023, 184896774, 39759619, 46187357, 134251301, 342702573, 517720, 358976055, 583636644, 962541900, 167548822, 161325057, 550357824, 277594189, 165080443, 231182951, 735855208, 908711807, 571176463, 42569340, 237272417, 790920442, 624258522, 720842250, 768667158, 451444080, 122083868, 366641147, 308868590, 806102171, 616667978, 212552319, 508058403, 321794596, 570313528, 460066496, 737582233, 710064955, 691296552, 63281621, 675218599, 955697061, 110510427, 512018248, 153536802, 745040214, 175960352, 594730127, 864516601, 686994354, 671193730, 758082482, 651219990, 268055455, 209604272, 794711886, 922988292, 233697499, 855180879, 757331520, 952855529, 712373324, 501054908, 610479660, 988305583, 359797155, 981016202, 392046260, 222705767, 339379031, 255395660, 760704862, 824907580, 377018926, 100950434, 568292199, 345612839, 702169410, 76425882, 316244660, 633878521, 345805531, 43908232, 498746978, 171201976, 618174067, 828038701, 451921110, 452033897, 911744318, 64098066, 83924105, 595571257, 147937863, 948006101, 514496555, 77289879, 282007238, 421799065, 804334778, 765393189, 193008022, 263503242, 355816072, 278012511, 227861525, 902054870, 618486736, 979710805, 971590402, 61042704, 664850817, 113175896, 488535341, 617582794, 612947413, 45804546, 259073867, 263038734, 265569066, 162645795, 60875191, 359494871, 979749311, 139358127, 29529290, 309151363, 279422923, 345089768, 87598058, 700337527, 479652910, 994907927, 933976635, 324751070, 167729179, 810904540, 230096199, 33195878, 559883815, 674302503, 158162721, 997344757, 974400760, 476723636, 933671908, 372458552, 487353300, 603836216, 903251923, 461631785, 620155186, 664707969, 139328434, 135802315, 547850780, 544085832, 243757336, 714792500, 277247444, 736724545, 7257213, 104433298, 33077964, 133546300, 658470668, 407613385, 15549086, 409602732, 220607605, 154437658, 434924060, 212726357, 432662346, 953726155, 55947205, 221865215, 896738564, 702917595, 219549259, 784888336, 998968443, 737927890, 111474776, 479544893, 204531672, 722344756, 339644359, 296335713, 172390948, 145219000, 740849986, 175518952, 876047366, 775536223, 909308844, 333180421, 96764559, 528034987, 396799645, 413114766, 622993858, 563074288, 710510893, 900874806, 315196225, 993816000, 623166550, 642968249, 328645521, 844280596, 556521945, 272458659, 580772239, 284457451, 186994948, 909094031, 935768265, 319893231, 114481887, 109302906, 586737223, 466388545, 717893242, 342269015, 164207650, 394855609, 330099455, 836592042, 939058426, 541984626, 852636994, 524042858, 358495217, 921118657, 464191254, 284341637, 363378706, 679058686, 917272314, 562488937, 105215359, 614330571, 404183151, 365378837, 280141835, 594380252, 79371576, 739360814, 210010442, 10232401, 449147207, 97531383, 696215921, 900156881, 51327507, 224992261, 946786023, 685932368, 729503576, 741723150, 479111191, 872812474, 454570174, 217639787, 553029674, 745481673, 194164134, 241094015, 672191097, 520725696, 177728245, 485102929, 511421076, 349030122, 157631252, 431267952, 813510823, 604978728, 799539100, 871169236, 265066919, 191499414, 52282294, 1, 36, 700, 9656, 105307, 961912, 7625652, 53738944, 342470612, 999200441, 797070294, 375863958, 9523173, 166271514, 481765400, 879554808, 535680694, 467340394, 413500052, 692064693, 580959888, 369347871, 169821810, 621921924, 137911737, 940784828, 741570244, 905517670, 551817302, 657369119, 721648393, 536831850, 500879720, 726253305, 296162041, 891225164, 880747817, 182180719, 544050763, 654393489, 357200480, 356889637, 635049309, 374948412, 486169649, 407475615, 51228607, 535369936, 325305756, 74215114, 944988254, 919680639, 647644667, 526651696, 763479161, 278201627, 103508412, 387580497, 561661113, 38190290, 310583115, 569811056, 351262691, 985051203, 403138813, 643132429, 289980808, 570569544, 550559442, 934893929, 352045239, 810200946, 61218795, 42358563, 89293505, 506603831, 400595820, 117891860, 469015294, 166372283, 320554017, 155147268, 955469333, 896730515, 826039051, 931193995, 36098122, 893366407, 522834450, 917130400, 759016216, 23584371, 48884561, 844352920, 604253909, 886656394, 548946691, 688504947, 972899398, 721435398, 409845929, 399680456, 284950632, 796741351, 217452678, 611033399, 592790059, 219084711, 504058472, 277505825, 120276345, 694287126, 35416589, 305976723, 447309020, 969824889, 565684997, 62139306, 857693940, 901163636, 262850397, 927594387, 721909425, 958991660, 471789360, 260033992, 544270783, 877013007, 153311613, 85679796, 660447085, 213261352, 954007371, 8266647, 75417194, 28241545, 733410215, 579803150, 41901427, 876245480, 900022334, 813145019, 668096269, 73987267, 175135030, 724217744, 139403302, 77167168, 775504145, 397863476, 816272710, 221129133, 242347768, 885383757, 728565085, 947647994, 605379205, 598139075, 269419404, 178994132, 603450690, 652850980, 19254430, 182635911, 57268581, 239936865, 878358438, 515315850, 141611162, 665647032, 700517198, 807335907, 965806030, 897617342, 773532343, 924389029, 419741954, 420757062, 581633294, 179995348, 34733596, 923518220, 731757774, 573741822, 531242380, 813544540, 336821038, 442738016, 551572674, 470067223, 638102335, 989538200, 956007535, 613954394, 401563904, 103519975, 569290006, 144046622, 689996849, 638589501, 358099514, 725282594, 691632053, 702244532, 284031792, 473014945, 465414316, 116886234, 142777936, 342518645, 138051544, 347505254, 57716395, 939744642, 114873890, 359397343, 671360195, 724489266, 683013222, 345781236, 550104449, 877003874, 63443231, 224660360, 658626409, 133687251, 933261032, 273131705, 48202694, 144323990, 559827621, 779609382, 930553156, 35267489, 493151974, 645090534, 517431516, 368634145, 540405134, 215255527, 144656993, 549192120, 659960465, 217236722, 742258783, 538378955, 211409043, 760044403, 389330065, 692548510, 583181570, 627949137, 829194932, 234693932, 651493437, 707321269, 828284674, 652751037, 873736576, 267300299, 729754896, 429920674, 875733754, 60888792, 225478637, 39002446, 407176220, 761384762, 131879783, 661443680, 51638267, 568172852, 186052558, 637968267, 556455031, 313451921, 238551452, 644714578, 449541818, 640800540, 923965193, 38909678, 41940756, 338485997, 888949941, 526610135, 48150535, 778944981, 480892059, 874500608, 900322190, 973783674, 468787609, 618167632, 913754856, 327797543, 845404908, 752246622, 831422464, 484541178, 501948673, 647306990, 882577308, 771072569, 171273117, 620085552, 385025714, 126556571, 472404266, 664907284, 284895728, 860747643, 285481155, 480968189, 426457284, 579997870, 253315436, 264967992, 325506073, 407074927, 289125366, 710111895, 168902913, 39893459, 264014099, 335462311, 284068808, 624620216, 265346008, 330183605, 301153063, 136165951, 223572391, 416076696, 791322793, 440956632, 812128221, 56870528, 529001955, 157225171, 153110824, 659760559, 934444871, 1, 37, 738, 10430, 116437, 1088001, 8818820, 63517016, 413577336, 466132154, 602224077, 950429493, 571044537, 948550192, 759622519, 360792951, 40404471, 549575252, 331339348, 353289303, 642561133, 959520386, 811439523, 113998222, 306747368, 686402540, 608623079, 625536502, 102898449, 513583096, 310389938, 861964034, 144673299, 459932354, 368865341, 656127608, 909171212, 807159815, 446679967, 582385365, 827063804, 980667706, 264330272, 600794253, 740948802, 906942889, 945728377, 18846332, 985664112, 7701519, 115050801, 870345183, 606442987, 443069595, 817056595, 621418778, 690512206, 255049968, 161633922, 402904753, 372549674, 317848199, 779510849, 454579621, 366999138, 955388684, 940196190, 710141532, 289889641, 400266971, 473006189, 518001144, 203532149, 277752196, 73653399, 957077834, 580796815, 797359407, 33679102, 974181950, 229170666, 221016673, 753153481, 718492334, 480056326, 134801483, 829292600, 87160542, 624566954, 157188714, 912350324, 248797376, 864861712, 311625650, 564724833, 638897879, 211767349, 670618766, 182357348, 406247054, 335828971, 235855014, 766599169, 873180801, 943988159, 797515463, 949064434, 37355164, 366387587, 992037332, 39085136, 457008562, 710738441, 147115812, 245127944, 221285308, 44913339, 750687382, 166494925, 487773254, 2533400, 294773545, 964749926, 838352064, 354747747, 983055334, 906311260, 773970452, 136280712, 732037766, 304757958, 868694356, 9717274, 686595153, 845171773, 715645486, 457517675, 868876321, 257821804, 398717354, 952878758, 459394839, 735151005, 982831573, 597714383, 483469574, 396276440, 147004054, 275175512, 449695021, 280047682, 322443740, 657859781, 236891682, 338855034, 771308208, 208042945, 611383416, 470020781, 959351211, 871193372, 314812327, 417008584, 157794928, 30304137, 772193806, 92880268, 735754383, 725090032, 678769251, 695572650, 713627047, 220917673, 996272940, 711499227, 615337951, 732510553, 265860373, 10346269, 946167168, 327969286, 691646116, 588894836, 556718107, 891256057, 29035235, 193826291, 413628097, 951441661, 812044940, 432676044, 866499015, 139084375, 351784477, 900166473, 781089061, 914118385, 818686834, 857340116, 329139077, 237478891, 284468211, 215304591, 458481845, 227432873, 865995208, 554027168, 463893384, 221077016, 374577314, 119759917, 360383422, 704486222, 404678036, 137104816, 809074680, 755219457, 826569646, 867839827, 768754773, 89100960, 257194726, 724398193, 973188469, 858913715, 18463743, 680309520, 450458743, 140048366, 764912130, 371007014, 456635116, 735728421, 778688084, 152973997, 434969799, 574794869, 212648988, 728361716, 542931287, 302379989, 751579729, 92390154, 220181191, 407743441, 315151252, 520426045, 407908622, 679231575, 395003916, 794034847, 347654216, 68808817, 829211530, 81601558, 162714123, 30761100, 394951130, 268715057, 283612447, 241955302, 623210420, 275963878, 159211117, 252162685, 595441437, 529655660, 437222092, 841111836, 179960886, 135660761, 917237477, 768051317, 444580903, 506791801, 487181239, 875489229, 680194597, 205928376, 680445786, 683783933, 969592088, 132367844, 396994570, 832926454, 630581401, 505495558, 385734337, 641541057, 95095471, 989574773, 911275608, 518514268, 282262989, 419271827, 469001628, 420271862, 947083037, 407529572, 59976989, 434008630, 863717239, 945875935, 75676474, 215313835, 250745830, 87811894, 264747800, 37018493, 98597371, 710706515, 142785594, 391940962, 336466122, 341268838, 21508490, 413865364, 232101532, 92701632, 8053527, 412757119, 757312194, 403681966, 949009531, 880975038, 37050684, 272465075, 678404684, 193438246, 672480427, 700064004, 142628578, 802581416, 279140871, 973655892, 800905741, 598005728, 935768930, 668573394, 207197197, 649003003, 270174246, 76144766, 315632510, 875459369, 359185050, 528086919, 473525359, 758981160, 249109513, 189948776, 344668617, 795917722, 549344159, 348920520, 486734532, 302843834, 285724416, 810790165, 350603652, 574459989, 873908008, 1, 38, 777, 11244, 128419, 1226846, 10161959, 74764168, 497121432, 26344483, 38234873, 423642505, 376339808, 863392989, 917340710, 353019266, 355701734, 828153534, 204362640, 374924405, 607928554, 963790885, 940721850, 687219775, 764705852, 876861874, 763291630, 981930457, 551085656, 980270580, 505906881, 983294521, 135354674, 135665519, 630173290, 212355830, 143623144, 227056594, 817242891, 163435465, 418550307, 731605596, 289566443, 285968813, 433396374, 290335437, 260134359, 257166798, 296375223, 99595679, 459082068, 507135523, 972388714, 133158519, 975205558, 982374421, 644050428, 996778111, 162109063, 746906113, 514292299, 926426755, 356009260, 196659267, 409916170, 325494529, 655002543, 558511285, 36446396, 471095084, 174722764, 671116976, 160891233, 868903396, 304037581, 23612943, 337881011, 234387037, 370561646, 356075504, 698718914, 535181667, 514726084, 815242029, 608023573, 448544035, 835833664, 991058290, 399256230, 20531824, 669361826, 539724566, 760387110, 830813942, 547045707, 178050500, 929198630, 6813905, 110412371, 858816899, 809729618, 833864785, 232951975, 485491061, 613385270, 553071180, 627954610, 952757220, 692906182, 748961577, 662247263, 52513186, 149763764, 145530822, 33882391, 453364543, 997405166, 992558694, 759602854, 84367345, 100239977, 854081961, 858205595, 486024240, 91555639, 177882871, 949083392, 519037398, 556513157, 228484413, 492836072, 589348909, 196163508, 266626335, 11245627, 157404436, 270481031, 638406640, 490889097, 527976504, 370488458, 823400678, 322868722, 206357234, 647142926, 768625346, 265191551, 148038615, 363341916, 267722164, 893118504, 738977503, 565582757, 762106365, 849369394, 766495732, 13155357, 515888816, 523640060, 647203814, 437352666, 546684558, 961386555, 7614498, 893885274, 936701598, 428062192, 113231261, 402917050, 409965843, 165984892, 799921270, 659405770, 509144023, 774701607, 842603658, 487390464, 251731862, 581859608, 922860080, 258383681, 201597752, 292594441, 460903867, 638298912, 848020590, 765105850, 965506327, 844776867, 575276415, 85481014, 653985938, 197424999, 197600210, 989591463, 112466859, 918937916, 878289962, 30252094, 561367106, 701604983, 794157139, 205106586, 358551581, 218730442, 820317821, 718077344, 742273426, 343977802, 723940137, 91227055, 889419899, 835334285, 445942872, 874169472, 806494972, 841559090, 34902341, 936247116, 742348345, 932764662, 776531786, 136341990, 609226011, 962126351, 692609037, 492230872, 512261831, 61424189, 202712100, 557188069, 23267751, 10862209, 780311892, 698216821, 610626474, 445698906, 548927052, 791636623, 278469086, 802570473, 843652647, 214889050, 950325814, 545811188, 732525066, 799299048, 547938769, 119233118, 836166054, 515368215, 821018309, 703809789, 385697728, 474302192, 326687407, 701322950, 753939342, 860741461, 608860184, 481069405, 497217661, 107822505, 538149776, 65872865, 267685484, 630211463, 833714775, 127007356, 988488267, 704390393, 326686679, 330510067, 968474337, 860095258, 865223840, 3530159, 602833824, 943838253, 510792598, 862215682, 804647558, 57277705, 379631476, 611335785, 827032941, 500396827, 166974973, 950996383, 97277257, 336237474, 527425945, 836169765, 13569792, 45600126, 103702022, 589110361, 158793934, 917834123, 750227633, 450511448, 228174293, 380815071, 984828008, 35225572, 19924799, 316530723, 169463852, 11894443, 83625994, 27918722, 725825514, 510537357, 901592447, 560692763, 386943274, 409576331, 409681305, 19743037, 901841314, 504205848, 287987501, 95070522, 999713439, 52172335, 458657276, 716446234, 960325619, 967217606, 29400294, 323715881, 571473809, 542099425, 838958945, 826022366, 215456133, 111542899, 27057122, 264098733, 414451664, 367598279, 660361161, 317432327, 788309656, 482969647, 453723335, 307123116, 46250346, 156036134, 550671015, 501877998, 918162544, 672414507, 744250791, 519150731, 449335541, 717241257, 798831268, 772517138, 286300330, 910111510, 66350225, 850058429, 996528049, 454249733, 463645138, 33673728, 195487971, 700828817, 25012182, 447505308, 968790402, 312778627, 684898658, 698549052, 965513947, 825161447, 410399245, 428579579, 669192144, 82412074, 1, 39, 817, 12099, 141295, 1379381, 11669611, 87657665, 594899060, 695536795, 226472285, 640458905, 794561570, 378189352, 472728269, 218438573, 56516519, 255055733, 845027144, 588332091, 652544873, 575593478, 251899261, 421780632, 446749115, 397384403, 967249876, 562965804, 307548860, 910064219, 267557957, 532097834, 694036707, 378870548, 124206593, 109699395, 5415029, 722948552, 875697847, 694452268, 7553293, 132421363, 106964105, 391245927, 870340375, 243365738, 69805673, 199865008, 75486973, 171179760, 109991897, 220793643, 513746719, 106419838, 540171765, 580499245, 759007158, 982900537, 645687882, 590392656, 601803737, 221575615, 697448067, 153409333, 368742411, 593478736, 779784392, 983542304, 533669091, 167997680, 729893362, 841704349, 760614624, 47743042, 998724205, 972938209, 77600320, 536850090, 695359058, 769331095, 966134679, 528777379, 695035445, 387545073, 911151592, 242062595, 521446824, 889535341, 920252167, 112865832, 806555197, 118151259, 625842139, 701618487, 790273468, 694977537, 572862214, 473466414, 246109368, 48621359, 353657541, 554932622, 499105369, 867797665, 487345603, 842033962, 519557065, 245850790, 335288378, 782811146, 892240358, 338051309, 826545456, 41171254, 334148733, 152569170, 144665017, 941279118, 897754414, 89241104, 416864510, 41530804, 299074740, 73588196, 959211062, 109470038, 500259918, 366443802, 403320596, 183957534, 992196343, 652194487, 652679636, 980112362, 896443763, 694053263, 85474084, 793481845, 36502549, 113761902, 13660255, 295744749, 768030597, 559676644, 267907464, 329732897, 34721556, 481917917, 470669881, 496023609, 35319413, 426881953, 436183525, 539581676, 797395436, 949513087, 636400441, 684066319, 283217124, 456809507, 742722246, 708837224, 1825110, 845476655, 721485134, 509524702, 571748192, 313097600, 164720049, 83489702, 463694600, 122519767, 438333196, 350973050, 742760174, 292313656, 699166885, 733491013, 480543050, 245749577, 741817620, 207993307, 244579067, 622422144, 604751887, 899189402, 151409381, 217727618, 880477312, 214663719, 394263729, 196688383, 548030201, 726215545, 464673145, 261250632, 625458514, 838784252, 982491280, 700533618, 585918514, 160625577, 639912412, 329107337, 639996475, 820595096, 822718095, 278815123, 496262265, 918547360, 8027724, 726754416, 823448457, 260321413, 863184482, 650858805, 276099402, 685460415, 954079520, 733965175, 676833996, 368637623, 143549481, 304621819, 472579474, 749596748, 116386311, 410243381, 633945382, 411647917, 177570608, 616578162, 767744928, 61290651, 523112125, 276619822, 15151789, 253528389, 167816966, 891846580, 541892511, 341041750, 391023167, 293092921, 243156326, 622723871, 473135257, 726189187, 379573236, 555335821, 257038714, 482079083, 723871307, 606515981, 65251208, 632383753, 147352575, 594192641, 924833549, 483314326, 808069004, 770319259, 427864560, 25642674, 464671587, 569308215, 637300329, 923466624, 23057035, 86870702, 983746124, 846059215, 574808201, 554549209, 446310553, 959681948, 778636627, 211592095, 516682914, 291911580, 587928798, 427680003, 894209596, 866648165, 679666232, 460484096, 854394115, 982195268, 822495481, 835383529, 431162040, 830468499, 195346596, 57036658, 866149457, 860543178, 818146210, 279107618, 892401239, 225036974, 868558986, 685134666, 744469605, 156127522, 187537334, 788919638, 909025900, 672187019, 217419201, 384265406, 616374282, 378322214, 141913342, 501653295, 461070473, 25985020, 589549638, 109433868, 888240019, 931367280, 762349235, 234613827, 765084315, 611038359, 758764450, 286873014, 382512476, 382119459, 20294058, 943700532, 211933192, 58390954, 180966724, 929698288, 805610393, 509211182, 866583662, 775212548, 88368846, 726939816, 185342247, 229877142, 705155204, 200856219, 36832958, 610458570, 660966337, 749737121, 592806565, 894272325, 480779946, 649154472, 88597955, 74084666, 744113332, 528684751, 282107891, 100372245, 756922141, 58776739, 981772435, 924634098, 951039927, 397719622, 577729727, 762973087, 736969640, 674672356, 297937804, 986319572, 149411109, 496025335, 118765897, 173573997, 13186371, 696131467, 139811703, 497652080, 238358226, 252091863, 126575962, 416549513, 112043953, 769546766, 210139961, 218718185, 975953506, 930028805, 845629302, 57030776, 852433935, 836915594, 400219298, 622051773, 829969111, 114603161, 10751254, 909008878, 579282117, 214070865, 563200757, 1, 40, 858, 12996, 155108, 1546584, 13357338, 102391268, 708914679, 491589996, 307979410, 602522471, 317222127, 290284759, 54099411, 989042041, 349750818, 106531062, 706143382, 63807262, 819412921, 144007031, 937903432, 671633208, 144280187, 535961584, 391683158, 665684992, 173615217, 173957993, 353557533, 689224661, 70346145, 249590014, 418977958, 826283746, 394602103, 916349862, 513826761, 491750575, 183159109, 757685121, 418341803, 274891227, 642914114, 790796259, 588464975, 740365449, 551222753, 10565934, 35820801, 515689568, 211177017, 828019707, 68961130, 155306993, 295844962, 698696703, 264483577, 967049520, 615265667, 559761896, 719262960, 509462378, 575657367, 591920899, 676732702, 723371825, 327050158, 311506131, 94078284, 608080285, 992236405, 137506625, 399044419, 458634324, 553334522, 801149022, 685520978, 446537546, 993927587, 293142441, 349812890, 364132070, 129851348, 857298051, 877404263, 877505804, 63808796, 43779853, 597054006, 757518688, 847719064, 814336009, 295491019, 566317327, 427355879, 99632937, 271930495, 211594531, 907085661, 370381473, 40651392, 893659649, 363630034, 486697292, 957988008, 762036357, 927839193, 855832860, 336383816, 307639758, 266751066, 682795763, 757933830, 702637096, 416587519, 241670221, 803239702, 991067388, 753770489, 69318095, 379601638, 829408102, 918333643, 833524181, 647446668, 999853061, 600717076, 736359930, 166694847, 912637361, 883248816, 334184966, 360770954, 907814459, 571070899, 760625736, 543003305, 12232839, 27415041, 235755079, 155935992, 895456358, 299525687, 387663753, 430722193, 845849975, 389897647, 157165043, 232374231, 709459451, 819494807, 873294798, 982307907, 723241456, 529916420, 190269000, 832006535, 157577121, 119818595, 751958343, 818604698, 923214476, 455357809, 664208514, 204222119, 358021985, 507909159, 532713722, 447934290, 550255949, 9030523, 204809569, 704696131, 798537153, 779574805, 146334295, 422444856, 763243391, 968318292, 409596303, 730176788, 661449533, 145680243, 291092743, 406566554, 840725280, 859336604, 385485264, 540592314, 491573347, 430591599, 799102625, 349645352, 953856191, 685505744, 968883032, 548153198, 991972402, 298640488, 335784052, 560792641, 200482497, 534424478, 835919822, 256133832, 789502694, 815463653, 367192054, 711296060, 505894941, 749371649, 586599852, 478956964, 771301542, 936596369, 641013477, 895880622, 275251735, 709512313, 675062513, 900057226, 864601515, 604121575, 213439255, 718556713, 352300658, 293209273, 62461535, 212741657, 925233457, 601757735, 357273411, 900952265, 337965737, 654516053, 138964736, 683012438, 388413281, 151113816, 328964247, 191920444, 84786019, 179152386, 346561188, 643354711, 718267295, 169193229, 252223726, 887596939, 657097686, 142103925, 40078284, 150004901, 459569297, 459199105, 789641065, 6481222, 858687076, 375816137, 147145108, 520309635, 748217920, 667457550, 716254093, 186260954, 725808394, 626037945, 743543562, 764478177, 601933842, 797462265, 777370200, 654651513, 156072819, 707272486, 178868661, 27986290, 925976600, 457000898, 540704905, 843382395, 769084631, 760118502, 476552208, 749317409, 710185045, 964800796, 516878606, 266237510, 913933501, 813693982, 336046538, 762072594, 997287607, 756174558, 615699332, 325935068, 478725181, 294206110, 71125626, 862744505, 369229533, 687983312, 908265361, 496504119, 960935105, 69879109, 315010091, 778995602, 757128123, 249975621, 699329744, 984761141, 255696873, 966070938, 214893935, 551564463, 316442626, 532269369, 314110968, 128028415, 969165598, 561496103, 817486578, 282697706, 480617072, 509205119, 834540584, 277705122, 660874354, 778117470, 366056531, 831243822, 903068403, 672944646, 441340373, 340680954, 617276976, 849516577, 560088434, 230800586, 10428026, 372559113, 922230949, 889642650, 244184042, 533938488, 841639506, 817920213, 336934324, 44823033, 565545678, 701086145, 241957483, 114182239, 850726147, 526783422, 115816117, 835376982, 659266467, 815849396, 168028335, 255187925, 748491938, 622185783, 663040863, 743392515, 163408177, 383060357, 31556416, 794030948, 934245344, 258437764, 379321408, 40236316, 660469577, 655665845, 690942361, 375378322, 568352979, 602028119, 317437606, 657543398, 100015852, 252684947, 481051042, 964341166, 522946308, 280791483, 467949044, 475945690, 972019230, 462068105, 580258224, 819125286, 65219413, 675919204, 938373431, 246074242, 416112669, 990084376, 992206586, 174382581, 694468435, 670357482, 52707698, 430228891, 194064984, 374269653, 873105421, 89789806, 360326019, 422866288, 247972613, 990139142, 766813630, 25619403, 929658745, 91230876, 1, 41, 900, 13936, 169902, 1729478, 15241768, 119176344, 841399673, 434809990, 446105964, 492649140, 758977149, 206041682, 323715565, 660084286, 595902939, 912996958, 734408694, 639760787, 253066665, 208103163, 518638879, 141246298, 316067064, 932295902, 638352197, 835906694, 518593201, 772224592, 710767801, 155069328, 87760296, 888628863, 85616127, 159719113, 852745152, 116208329, 603162784, 598162586, 214665773, 928212607, 364268988, 422947444, 91651894, 294508512, 306449339, 29129368, 721764444, 23720919, 155935808, 134434641, 906918132, 581645037, 673925534, 656820458, 712140580, 940311261, 639783029, 193680127, 625191701, 485391283, 454129733, 912047676, 531795443, 151893083, 16212124, 506754047, 491882623, 143293012, 25311790, 265858487, 730580376, 281408346, 313354998, 904477185, 246774679, 76212745, 790588368, 952519623, 156839403, 194467618, 872887052, 91963369, 534129628, 238356180, 632320800, 58443419, 722943306, 618550091, 33518175, 519583410, 960079192, 538023159, 305123951, 486152058, 294482726, 518323725, 455607677, 182021187, 748135143, 512410493, 35362801, 719659644, 317014598, 528329960, 583008290, 443175574, 659178079, 174647583, 349497845, 577399146, 818913619, 271472027, 656817275, 494680790, 969710982, 229444476, 267631925, 175671131, 35511369, 58752774, 135202754, 944159958, 464206230, 475819996, 314325811, 754861491, 276808552, 810159244, 91192489, 626570800, 590621471, 514780234, 305537247, 801654104, 149383516, 787215362, 114530579, 859617326, 613074050, 468568467, 919259772, 617744284, 340905322, 985953212, 372028816, 217079653, 938494776, 284906842, 769978385, 515786223, 285120775, 375534381, 675385916, 665832700, 133450834, 3874364, 408375526, 770616302, 276273159, 413928636, 723794836, 198571707, 678091222, 296508406, 529916658, 588863591, 413257244, 498474249, 915935032, 120501359, 836927142, 230121084, 774509032, 870826787, 489996192, 917057075, 196187219, 383821852, 922336284, 22274995, 748507616, 607632780, 183109949, 339998525, 507933598, 698781318, 498085612, 803731847, 473820207, 901546035, 302928184, 865394080, 114078163, 2199878, 779942965, 594445523, 91527221, 272107811, 718335802, 365412741, 52329171, 414520032, 494974650, 300177708, 811610962, 146810674, 337728819, 506402762, 403329973, 694340600, 766854981, 757139989, 188368338, 788752320, 918847437, 928046733, 527551285, 479184799, 517252899, 712149490, 791491255, 238449676, 667119615, 757940899, 445679476, 734062646, 326185889, 40504124, 623294475, 807102585, 697275776, 960233124, 90479243, 277423126, 459856976, 523164613, 283246190, 353589088, 214300387, 783487356, 692462518, 267488040, 851918218, 799153667, 810257248, 109085516, 633189413, 670646041, 913414538, 526057886, 701571781, 823895555, 366072317, 141394361, 832809290, 464577360, 305577012, 512815120, 121404516, 195457318, 321946163, 309097012, 239601477, 94799504, 314416433, 43085740, 639634392, 892727867, 559091131, 668748148, 422889784, 711508368, 676630033, 634668710, 364293294, 844937242, 751071408, 322260215, 891789141, 187899827, 511558264, 521391391, 670781806, 509672700, 51147255, 62331255, 681097643, 668432081, 698715101, 46454740, 726474418, 934462337, 72103891, 408373632, 957100449, 670661469, 786800623, 834620545, 287400489, 490496888, 497846381, 189806313, 912940390, 809020495, 703284720, 835793884, 605744360, 923348658, 214377202, 697918809, 343995053, 445012242, 544883273, 475774494, 73159748, 664916820, 945806189, 388033609, 184443581, 891139166, 132967061, 662232592, 630310273, 296941879, 926467100, 732662520, 755030683, 373067237, 200501225, 132039597, 621016442, 864116597, 199168443, 229224627, 19895297, 392227721, 512572983, 888183257, 954225811, 362992884, 408318299, 664465052, 828120392, 703374891, 61248349, 16358204, 241119413, 30565637, 838212406, 921697699, 543334430, 89858526, 273185879, 355471309, 304528048, 507574008, 476038937, 789196651, 57644735, 932966132, 292240565, 284284800, 198355642, 844613937, 375170024, 881957600, 108981244, 644631978, 730251746, 563646094, 15703371, 891969119, 462467018, 842418885, 184776107, 20489508, 525173823, 93913531, 199936707, 49296883, 500271791, 9386940, 42793104, 102301079, 299925062, 242848544, 157270543, 567750735, 512260765, 540910896, 473863432, 123756576, 867793612, 940752336, 189701376, 338838501, 163690216, 120916067, 790468763, 680974009, 939542025, 299064055, 752326705, 668302564, 775312490, 929999123, 713601128, 593704708, 595301628, 539445680, 220384571, 492539730, 572951883, 264745653, 946510661, 751486844, 372815432, 445849920, 481560920, 887629330, 46438187, 433046906, 550746520, 68280122, 549536967, 98170304, 942092421, 657076175, 85959544, 736296914, 244774210, 196059783, 968298850, 183375217, 810099519, 413635020, 636120983, 396309504, 740465895, 371532101, 1, 42, 943, 14920, 185722, 1929132, 17340642, 138243024, 994832181, 548192008, 829424358, 702470585, 488681655, 275370643, 835638795, 810867407, 286977068, 950047225, 83539435, 44629372, 288790619, 507410843, 264046736, 483012816, 672138691, 875194556, 651203850, 66911617, 918075656, 674825734, 94581776, 415282344, 303997379, 819537616, 622429217, 698967413, 751254549, 420414807, 687830513, 601402264, 434289505, 724948167, 754889253, 808542135, 995391960, 178813332, 724416372, 177739106, 814105099, 753597104, 45856871, 272275296, 786414287, 511285559, 160720229, 317562390, 790336119, 868224061, 359611251, 78736463, 773457035, 927802445, 421722380, 116775238, 364696053, 502866895, 626441652, 490807991, 713262576, 797949369, 598695934, 260170588, 82830001, 494545919, 272206045, 443643728, 598266021, 33015507, 884148700, 307476402, 959867411, 216334812, 800291904, 985570368, 488188448, 107147695, 538136243, 662412600, 979298525, 134498654, 226734918, 727004323, 749341953, 119616289, 344235011, 179701806, 771727176, 867138213, 462181714, 886155872, 120844409, 637609736, 732957723, 950929297, 917858187, 787591285, 658307576, 752393246, 363474545, 410621001, 994736846, 177814531, 780475306, 862888709, 592093607, 579502147, 557845688, 288775481, 603183203, 577960148, 788283409, 673824051, 683888139, 877184660, 633236685, 114600324, 443874806, 243845462, 737247494, 816215602, 301818289, 678209727, 613605938, 858234475, 818583083, 638002191, 955539556, 166659792, 402119583, 136117938, 121601666, 755992562, 47984728, 295575049, 499852111, 307179145, 332974068, 315732357, 716712867, 640162541, 867854182, 934376752, 313718034, 59903781, 946384843, 119557570, 525136020, 151571916, 798992199, 641098837, 260839275, 993458171, 824535499, 355644177, 761912070, 816737774, 16159145, 269418274, 606453921, 360745230, 8968332, 697762673, 987763777, 660889863, 735951723, 644168107, 694447061, 112348183, 530007620, 3042837, 764274326, 848173528, 194620935, 635775962, 259196720, 713828904, 940082694, 457694335, 838811079, 742877821, 825043434, 999682813, 323541591, 50872352, 337477908, 513975090, 485543671, 991738379, 437900643, 771900426, 686428428, 563411325, 914169111, 935692665, 43568184, 490175371, 749564693, 101137943, 245839802, 603981104, 626386341, 386920859, 413292672, 913439917, 70347116, 434898910, 144090153, 824132212, 891175519, 132402569, 347193520, 969072546, 16729602, 608672301, 618817500, 911982521, 688615529, 732174336, 500282116, 497352932, 456415575, 878875953, 316115544, 915703538, 598465482, 596140294, 730305232, 164832432, 897815573, 166896959, 324516472, 764718824, 566396641, 914517008, 874306816, 779763109, 852306547, 611269114, 292511571, 915381300, 758955270, 257373679, 74625589, 121789415, 230596845, 205840454, 916544901, 23902587, 416402779, 293269031, 510816400, 975368660, 955188220, 72244504, 561311434, 137072009, 127537010, 860723336, 883260674, 394382836, 913512596, 497775666, 206616201, 483790701, 11643758, 543373789, 107216374, 536706614, 345207484, 197739695, 416959310, 802020491, 883579389, 155472766, 707726533, 878636875, 137339984, 387604391, 170286771, 862464509, 93116703, 698306089, 277231574, 157624181, 518482505, 545923209, 301838767, 429107456, 65466197, 400869145, 603396151, 201146053, 29560436, 908247428, 740900666, 645622178, 468181946, 182006817, 585006092, 39427009, 901513909, 575103140, 643739693, 969005418, 413112711, 121940507, 949419798, 274176335, 533655948, 73448571, 447893873, 303200166, 406062958, 327948494, 399154885, 680966803, 676784794, 346165530, 118434942, 634041854, 219847494, 927409557, 731595298, 204066166, 484721091, 397391612, 62697528, 613046235, 363210072, 588627148, 359818291, 176675393, 710790103, 31891420, 193284227, 13322649, 80677012, 364175866, 156203486, 303397217, 540753075, 969185318, 762928705, 479974322, 873609278, 714679223, 243389411, 893917661, 730412727, 540295939, 380888528, 199480073, 111615382, 501213077, 699982545, 83674978, 340471893, 589623231, 135448371, 354059110, 416125008, 490338358, 869847423, 644581498, 153365962, 261322947, 680966984, 400282844, 542955010, 604680600, 412088220, 680278649, 139286485, 860834305, 469429775, 280658323, 253030904, 2560916, 10309871, 297479762, 823144855, 871982081, 47058346, 963847165, 382927224, 356584190, 324565827, 306141977, 910279795, 453817674, 601981427, 979339306, 222338413, 904561649, 382529080, 408856660, 854658577, 411827225, 670817056, 827144476, 223389693, 471934610, 930635535, 587441381, 722797748, 95690794, 663628478, 287716698, 646651719, 701670514, 288321331, 90367689, 303151955, 540716833, 449495113, 614473847, 768187147, 779428778, 859329178, 317839203, 24311574, 208713726, 534909824, 569617669, 779723332, 951823587, 262620278, 508684571, 644816282, 124674019, 369884532, 146396384, 993989514, 828097325, 353947367, 356630001, 483119775, 36683277, 829372562, 480348153, 416969202, 237164413, 917166508, 673670902, 955993972, 550159722, 115253791, 571208381, 883450110, 234414978, 338605160, 465632072, 975880238, 1, 43, 987, 15949, 202614, 2146662, 19672862, 159841410, 171958174, 857707214, 674952199, 863564473, 694487987, 218927913, 150857334, 64522123, 242512102, 726888439, 233627107, 811786714, 114239005, 343074532, 372330107, 720689358, 467711835, 904517093, 48140523, 445520536, 151023837, 477389409, 167654505, 524330326, 826025786, 750662832, 873751815, 63739722, 191556854, 667326112, 50500515, 441625511, 782830742, 400734038, 564497630, 921910383, 845548941, 368028935, 749018447, 103585045, 796556849, 628596101, 868979841, 539520158, 627354569, 90231323, 417433082, 56768496, 355579497, 422451590, 886349503, 72956900, 803725461, 415871073, 683643384, 621063238, 193330057, 325926450, 277754812, 24871409, 448472012, 886190243, 823962291, 441987145, 894908057, 837390023, 862747763, 91512877, 722912649, 93349481, 545810047, 913016979, 515556016, 298546360, 734212089, 844284728, 136068973, 71028614, 122223407, 751306630, 44843394, 423748616, 386401231, 812571458, 811253207, 883210298, 108253088, 777750730, 94398075, 357510258, 341016668, 444595182, 421469474, 846006439, 697364303, 430219357, 145159, 329923811, 555736286, 145037472, 50858159, 758063180, 409311835, 199515197, 849732459, 429458586, 110831608, 601311986, 405029768, 899721594, 362036575, 3616348, 447767827, 718164293, 455022502, 154627334, 632024645, 923207902, 841801838, 418932384, 595460287, 460605434, 188513457, 767682601, 51793196, 194981425, 929803954, 504733978, 22197692, 870666331, 333136663, 819520200, 530915500, 599537526, 53266589, 48676597, 387019415, 413134249, 89916173, 988538195, 741237674, 580557472, 340811443, 13472882, 840030352, 781975641, 296220934, 702357371, 942050407, 935085214, 845987731, 799577627, 872670633, 692587304, 440284632, 702895036, 10589510, 109084537, 901549736, 680965380, 523560865, 14608855, 766098800, 955736031, 229070295, 918139336, 762087315, 15060087, 769624318, 210516326, 269537431, 932448778, 651446512, 367308406, 624037144, 927670291, 415521073, 854675140, 947034643, 395133007, 858104556, 792426709, 918444166, 282314711, 96653546, 423079321, 469451942, 792999037, 308400615, 330587501, 691818222, 53917678, 568461122, 362577365, 775464857, 904714011, 845440210, 795470521, 568880508, 666239878, 183860147, 125507811, 545400921, 401495311, 3467092, 430876347, 332849310, 96436924, 957680475, 836934713, 150232592, 891109199, 995835861, 145792868, 255284669, 853681633, 801676454, 45857933, 127560794, 137690320, 534209092, 436059291, 890838261, 134212816, 302504982, 936257832, 761720727, 269396963, 28197218, 59083210, 947207164, 442972791, 384169121, 488722025, 351406087, 443097712, 82956552, 698141640, 145942108, 188889308, 734290094, 387705377, 912805029, 973822420, 47485510, 507370861, 221674431, 786661915, 91335607, 856760661, 173031704, 864904090, 599152735, 495185408, 938099393, 556362344, 990758140, 995900803, 254599934, 462199704, 5008078, 665636661, 527028350, 642386127, 1829553, 551952980, 424017355, 108488740, 701380336, 806666866, 700141562, 59441909, 362171728, 894757457, 445400929, 773238426, 127546419, 723395394, 338826564, 332919619, 340737249, 850054615, 184058121, 13063831, 278558952, 698063140, 498777528, 72607237, 345269132, 902279995, 183690503, 772520236, 708689187, 233896476, 458831695, 230994551, 41124197, 206351350, 689101399, 262700029, 620939252, 892377787, 428085255, 694339277, 213848040, 916329377, 192795757, 474268014, 561285670, 220016093, 638297144, 193877561, 647642810, 64716523, 5417153, 709160560, 438820650, 471896153, 456049785, 424945489, 102312939, 179871925, 155527933, 66018018, 519349428, 575834851, 366155295, 196027859, 709388961, 444696414, 108229719, 111474967, 169464130, 765045351, 916818004, 674916990, 958919968, 932259128, 849009441, 829390390, 846317162, 253991616, 482990034, 163822353, 775754269, 532037321, 49173712, 212326050, 301906174, 678424573, 534302771, 375782334, 160287870, 855370313, 341617592, 25457804, 708941176, 246832732, 903916100, 546588049, 96029971, 706821232, 940560978, 101534792, 337492719, 856837601, 613769045, 707646199, 812028723, 616833643, 679800396, 535428679, 224426630, 413895724, 784683428, 431644219, 111092914, 661756720, 639659700, 41894591, 68359952, 43802473, 952730000, 823133424, 376059765, 707785553, 822330735, 771301262, 948220958, 908479296, 864547297, 515908783, 27167717, 175015260, 401476125, 721945851, 298498970, 707819205, 838011772, 889483594, 356594984, 693435347, 967781679, 401435494, 355846180, 333596320, 628919505, 303558980, 984974994, 113643042, 89409518, 612893129, 122412730, 114900098, 810658251, 247580260, 945287301, 609126629, 492005778, 772356444, 361927818, 440145503, 858752994, 174471327, 210890472, 769016792, 638211867, 546015263, 377533141, 892710683, 705066724, 412035898, 913706912, 989583745, 102815427, 296051463, 435828877, 627348761, 994079761, 369313875, 909339708, 172995194, 816793393, 474860389, 821690532, 962160124, 246051373, 970475428, 561698902, 165844443, 708639335, 918973613, 861542417, 207950600, 197794802, 563223285, 448456804, 787570186, 926930606, 566070711, 279041721, 162328562, 287318056, 191225488, 14318341, 585550504, 409974535, 697728497, 891226405, 200433586, 381575055, 638337683, 483277973, 755030264, 867834356, 962849947, 821535631, 1, 44, 1032, 17024, 220625, 2383232, 22258540, 184242832, 375813872, 392612893, 231706087, 882424931, 687132034, 689650073, 577977876, 303878988, 24310937, 406963663, 625468735, 582435950, 41660062, 421950986, 98962940, 938709884, 758565048, 969234571, 703952131, 900436492, 658647225, 285611947, 399326780, 419454732, 205387170, 983950227, 49990302, 189001672, 62673927, 586296391, 184361166, 506353667, 438069708, 256171907, 825943859, 951340167, 368115756, 522855639, 198647246, 263328246, 450011807, 434855284, 725807775, 648411666, 18383140, 128787399, 387148373, 905324825, 158891954, 656234845, 213026076, 490012707, 365468167, 200221292, 298615515, 290107567, 35072337, 317672326, 60118064, 676291945, 898619095, 494511021, 35193707, 681989460, 255539191, 6318676, 181981289, 309123618, 769843578, 942743189, 29734288, 954472400, 463236670, 747980714, 175643037, 260101113, 77874147, 589524374, 710018290, 567729062, 854908844, 767838566, 521233813, 535397022, 395450772, 519565978, 430844324, 691804767, 750969410, 915664434, 335442962, 327801393, 599337662, 151524696, 372580414, 756807473, 202845724, 578628778, 324772867, 495203100, 594805038, 176866440, 134364432, 797477913, 981614510, 128692174, 938852792, 42148884, 122641852, 370944239, 473851910, 935488807, 532851475, 689984371, 438315593, 696398812, 66001022, 428174065, 54501471, 80878480, 666016821, 47295976, 813797397, 317765605, 714997505, 258919731, 82884010, 661027522, 582655484, 361252385, 24311003, 432884688, 368733632, 23821090, 792526029, 846601436, 536812192, 29313630, 382435159, 426147993, 517181759, 645690342, 270896281, 775661220, 283600768, 240876557, 135665693, 104458079, 616729602, 497103691, 828815240, 86098789, 998656307, 754065783, 488969594, 91503702, 52278308, 883359011, 733253122, 448869387, 985543203, 116773170, 582006344, 860482711, 481797421, 498040658, 240829616, 836032529, 195942841, 508465042, 970760583, 262117458, 515914406, 802808161, 784332475, 374122343, 146224696, 841597534, 586439935, 244148601, 788204315, 767547799, 776362337, 510076278, 624681830, 364806405, 36907700, 539421266, 800828005, 512242954, 899834647, 163376162, 50294413, 18654970, 84289561, 55576943, 421249957, 34930346, 752291330, 162276973, 265235612, 648593820, 174309283, 472188614, 715911113, 367773012, 121970433, 269868616, 883985007, 980070897, 514347496, 412293057, 574601560, 116830355, 45453500, 562859501, 189078677, 827602581, 712444490, 316586780, 733065979, 840949184, 60074648, 135398686, 424428452, 321968689, 410040315, 273128858, 471407472, 574966766, 873880166, 875045586, 51088331, 163730111, 878321231, 726127318, 966070068, 992549896, 363335253, 89848987, 723352311, 66759579, 406269326, 227087300, 150259572, 36586234, 121181736, 671327424, 433664784, 948164313, 657988535, 451431758, 352880293, 341991927, 179834471, 17796695, 709446365, 576526708, 534876965, 620591563, 749402589, 628280366, 213414310, 982746106, 780180633, 458647121, 527146575, 210950823, 363805011, 571210392, 912463620, 153315485, 532024632, 427468951, 230879114, 869803861, 964025520, 480715223, 895116735, 766188327, 419338263, 475074013, 158183698, 899486620, 551866464, 830407504, 385674668, 305150124, 25769566, 438519248, 46473036, 427624180, 723264512, 651472006, 264633252, 457374493, 476392005, 982968243, 594462543, 141658727, 489344824, 433530156, 442633667, 193279091, 506366676, 618868695, 731227096, 902261819, 499005142, 38842574, 647293009, 470120821, 963932040, 826530559, 427769181, 52186234, 243569284, 806914289, 77294303, 605077946, 125786816, 193185124, 669741115, 146483601, 421911450, 244025223, 607708016, 920909811, 503255382, 458139691, 962827176, 614853461, 60315827, 350564197, 429760397, 252570002, 854719144, 336843776, 342192419, 596659989, 924243516, 172320579, 980212083, 387574794, 749118912, 796421442, 338721201, 731277700, 423355068, 842226704, 398877706, 643899462, 276311394, 413568057, 530987554, 558156380, 825270018, 71652153, 764304967, 575174245, 41877959, 189656159, 729954858, 472722511, 759829544, 285982254, 921037034, 543320666, 873711613, 829723375, 146980729, 88768980, 242470712, 9284436, 325379730, 426922557, 253585643, 473459335, 496125795, 212116723, 579959160, 525505189, 681915634, 797942363, 691505794, 454823298, 342255990, 994255712, 284908161, 275004161, 935102263, 472107098, 948357256, 856671615, 528973823, 649773881, 963952149, 308388016, 911396221, 251193820, 721175020, 199750213, 907595892, 491208059, 66513541, 911357998, 28185931, 408941602, 745821213, 601730782, 8869191, 260152446, 11616084, 492782894, 282010506, 115926945, 586669273, 760307966, 135350671, 730510115, 701832702, 230080848, 284697593, 182609947, 968668397, 822892958, 20031466, 582030222, 113170973, 44631330, 117449096, 742186715, 393019551, 475653487, 44400405, 854169605, 417464027, 638137059, 767027912, 156446839, 993857936, 340495049, 620457258, 138844665, 409760846, 178352112, 82788960, 388732194, 649306589, 798058368, 662337136, 564354859, 463324080, 651997437, 151329929, 798760314, 140393196, 82249686, 534814725, 624568021, 130746531, 950081340, 74895509, 582830295, 80288213, 896322580, 930247101, 961634195, 343840503, 151542664, 791653321, 891526646, 512046490, 292522561, 321986893, 483787584, 926080170, 410378864, 504638099, 532986681, 138953386, 701001827, 64586773, 800287681, 592917926, 845148767, 612516645, 103437292, 360749745, 802262044, 905182790, 741928176, 827192105, 608668686, 275550867, 759837767, 768468707, 652063776, 969103143, 1, 45, 1078, 18146, 239803, 2640055, 25119048, 211741156, 609749448, 185787670, 784612981, 979654374, 245960280, 15201333, 958496287, 21110097, 315107827, 742613444, 350112648, 551346765, 22689059, 646342016, 52427180, 113726997, 20972491, 531552248, 493279562, 92962089, 319571072, 658193556, 921146440, 975234478, 32484025, 175484024, 620442122, 566033382, 228886883, 301912152, 137109958, 37427138, 531183271, 684452057, 239066445, 806400806, 345167706, 766401402, 659593100, 342864185, 793254425, 754419464, 829307575, 253460669, 788296808, 455700810, 203460090, 299960617, 672027544, 662169751, 130171479, 226661975, 16040291, 641167104, 11608362, 92735361, 828424038, 151425031, 757058935, 838944903, 705030989, 271605017, 832315720, 525711262, 695893337, 524834613, 616761109, 89325780, 498691877, 390082387, 413410547, 86170624, 733987779, 857386717, 121183471, 378540433, 791481061, 602874536, 895775257, 706223069, 9499, 916233199, 610175789, 305910126, 402086898, 380865911, 987929263, 784720236, 752249361, 533065111, 750214951, 512527924, 120069833, 497034065, 691332267, 542878776, 324018841, 841280375, 368737196, 213532423, 972352910, 856518833, 695976280, 832491001, 482258020, 288928023, 37469870, 669147935, 728824530, 312167670, 98462828, 664815478, 37466991, 488559701, 805407681, 555656112, 449333572, 115257333, 422614443, 217564969, 709154128, 523463461, 73425486, 892488653, 72758100, 139084611, 245397266, 356349189, 258341975, 374070936, 726599734, 907199192, 145474167, 868900328, 80767170, 435742131, 604761267, 550372021, 238314098, 858506407, 406280874, 734533546, 294613351, 569709112, 578499728, 811514468, 971780315, 806793934, 105431100, 109183449, 48863833, 577768093, 679710969, 415227663, 41263734, 575857153, 381654592, 178237376, 962188807, 96401085, 816699360, 379978, 698529453, 815682387, 657011537, 324418972, 693645417, 573047105, 308103161, 882958960, 454854080, 319280881, 638681315, 366562235, 558670399, 767575020, 418970310, 599121706, 533764150, 589341596, 935247125, 342450103, 752510984, 17885861, 270962366, 936052758, 754048953, 578853463, 395299411, 975776432, 660809842, 714104917, 664542262, 888472526, 460099640, 981638523, 92874960, 177231620, 389704303, 815325394, 892076514, 810821143, 435904186, 382196425, 459031152, 355917826, 128881343, 657597142, 768648132, 489510758, 615223177, 785945817, 514595120, 566588750, 607013232, 187911920, 428934627, 690400146, 385480557, 274884476, 214574226, 202705516, 78809920, 768678876, 104566183, 54811645, 783466377, 78714677, 225394661, 571378521, 194681502, 425310485, 768219090, 304793231, 206900396, 615627160, 652872143, 605935098, 888495311, 608958308, 684600222, 150382009, 670451269, 632074742, 29926906, 676412361, 727588975, 541140282, 152873820, 396851079, 644404346, 44361987, 675992732, 795525664, 898044746, 408945421, 518637916, 428148139, 754863856, 398182352, 901207212, 713356422, 978366083, 314876385, 700685480, 450639991, 507197672, 750335365, 694787156, 659670168, 536065922, 58255852, 874808151, 601680063, 300562698, 308983506, 144763409, 291800793, 77526020, 485403753, 904665596, 240987930, 592380858, 131116194, 318805303, 40941643, 253699630, 655235690, 431599614, 508389196, 766960976, 64307752, 83604788, 642165815, 298107337, 143184667, 782909601, 97135064, 800759539, 594114128, 462420032, 946857620, 578998109, 847963761, 556321528, 57391815, 681855904, 181815656, 486333346, 837072759, 524567487, 328595763, 549915998, 810586503, 921107919, 625157836, 520890292, 832156974, 502972509, 844559735, 189855766, 821823028, 625190873, 310510259, 495827691, 683011136, 462720297, 218315456, 558392392, 789434995, 973556645, 730884239, 996176654, 617108310, 869866261, 672230385, 823462275, 454316955, 569646417, 836576125, 486906178, 189726176, 941091111, 447563926, 715506888, 259006307, 152570437, 178255829, 705545293, 756368978, 655390691, 445318929, 656847742, 582354283, 964611397, 757172000, 601301680, 424348696, 51484783, 19240319, 282677827, 308226295, 848392338, 155829926, 371112122, 224524783, 972970693, 890401898, 186586738, 229535528, 744395297, 436751188, 287103606, 767393594, 221149011, 725319915, 148703291, 142739608, 565503173, 66967587, 579759051, 568848401, 146971072, 400042251, 42796974, 930117091, 516575412, 958322295, 49672443, 25502320, 669481138, 837449618, 7837933, 569472200, 125364493, 253977071, 938687542, 347213905, 923213402, 374713215, 103889249, 423021360, 42560340, 446498368, 893011213, 263552847, 473020638, 594960497, 638188472, 306243047, 631678307, 460262893, 114330448, 196301356, 120279822, 408786998, 213927614, 687965452, 221650209, 761159253, 159653422, 237951119, 705996510, 183076481, 962207888, 939920456, 729428244, 527536009, 933629825, 48104537, 426892607, 222940406, 156477133, 294062878, 856995315, 562470362, 935041969, 210948751, 968306167, 842365144, 520781012, 542464204, 753086923, 742421303, 62000597, 644679235, 71406991, 633199433, 272647461, 452692051, 412108892, 971466694, 51102980, 982720545, 17172841, 800141833, 835541670, 112517201, 389287762, 451060806, 667438631, 372888210, 71363616, 925222882, 974951293, 516878304, 717488009, 957226897, 42671831, 558776576, 623171604, 305500795, 631070922, 102790598, 482941055, 578335399, 805101814, 173951677, 379242816, 368922629, 730730546, 873191134, 654555294, 282999571, 122452789, 92227034, 843713012, 807240125, 801145367, 399481174, 81195926, 292593849, 487745170, 77737545, 120468361, 275563695, 294725580, 329691567, 323060707, 128192468, 940264172, 278390124, 237020514, 693096287, 868976326, 357620751, 777387506, 600499325, 283061659, 552760619, 551343042, 374674126, 67456147, 355451755, 309520773, 188033652, 438124708, 963234900, 524570431, 966112342, 609641134, 592345761, 1, 46, 1125, 19316, 260197, 2918394, 28277069, 242654144, 877454212, 274093151, 658806941, 733787098, 12686768, 373279778, 972151771, 700803085, 323660829, 529034010, 15342046, 14519348, 617205005, 151932388, 986173050, 673700068, 544467810, 964286681, 515278420, 556139518, 340574896, 558301369, 203169010, 995039572, 456888812, 641435231, 165153057, 140522292, 660622205, 195293121, 536816710, 963078287, 7389104, 204944482, 754195920, 468292992, 782743724, 983001140, 866703245, 496885028, 44229335, 385957410, 278539952, 468949573, 420982388, 313452346, 869856814, 98935497, 204399132, 112520568, 660616311, 229799510, 228233497, 492491671, 631417681, 54933646, 149425728, 621332861, 339088208, 164640489, 629238436, 824895721, 154091091, 876001533, 408513031, 998443240, 581987593, 639413342, 564182232, 919538600, 946772636, 882410774, 972663920, 656083562, 92818, 266781815, 775781699, 746031288, 222736672, 245153398, 853395663, 612580130, 998160370, 644539418, 268757618, 522753001, 961290581, 775849265, 167666621, 207332842, 699178165, 754169098, 895892786, 110804927, 209717022, 224332021, 783584762, 168756823, 846734143, 820517435, 567375827, 214226237, 514413130, 94334242, 56417678, 452070622, 302779049, 643793464, 45275321, 465081583, 721848633, 905142006, 304646178, 594655979, 909007937, 734286949, 886228757, 175346016, 613908391, 543890160, 182181133, 880150750, 840065256, 833202286, 948664835, 99995047, 986587901, 143761895, 873393215, 472341142, 369663112, 813013714, 860504625, 731747262, 545041246, 583231233, 427381591, 37913038, 537312918, 219404202, 592801409, 727962123, 878247573, 121527391, 62101177, 856133295, 688561557, 4927109, 639161755, 216890863, 944378755, 396352437, 878653962, 905668778, 386987830, 935008847, 899701147, 100650401, 955831377, 336099358, 325599961, 655390214, 368725260, 410912881, 868037904, 255016544, 51552711, 320078126, 868474642, 332377928, 241406268, 35418479, 170587950, 775390874, 598922434, 616742075, 563583865, 362204509, 606438997, 894815935, 49721736, 43588534, 841088924, 703571407, 258771291, 525460849, 233015242, 491199815, 325653075, 858892862, 519655123, 115437087, 727491564, 149427446, 582972761, 204458210, 871579136, 737982490, 129452738, 424878982, 856725917, 336920826, 730532856, 841738688, 738232572, 913319995, 816486040, 235770118, 427698004, 930569686, 569011751, 212446463, 508105319, 803897811, 496189040, 948372030, 432798655, 784691260, 809769369, 691850475, 577558004, 62715847, 947764060, 196109904, 506172286, 447735266, 980867772, 417186123, 46557919, 986790130, 277584037, 822619391, 621076591, 388367593, 68342324, 236699370, 119970164, 657351210, 878868802, 794459312, 436412351, 290870119, 503296346, 564802634, 58773734, 218770767, 842309450, 694735121, 712067611, 605426442, 634737321, 598847809, 189964014, 104895974, 463967300, 12836011, 374171101, 422839429, 769990513, 562838372, 23465799, 935303296, 758855803, 832260567, 373886738, 362866660, 831747060, 745193763, 842521525, 971131364, 323409153, 328965945, 810807795, 987986960, 514599613, 697337301, 518676386, 255182547, 320862033, 438306682, 656059329, 246817307, 296427451, 518314128, 212813255, 401599307, 322632262, 651271379, 102975853, 978392574, 171788197, 425477753, 865141598, 200230496, 352371432, 128877128, 483645145, 487174027, 207964600, 565016864, 366179929, 769999162, 980709292, 279413092, 778963675, 322935221, 775556840, 152203885, 621120920, 754303914, 144652778, 603456104, 397495432, 911648885, 161631342, 183072379, 436197254, 410415743, 654211646, 998944149, 660332881, 659092994, 407158213, 993390015, 62237745, 342306369, 807083806, 460112259, 598009122, 34231667, 354435262, 237881432, 155417941, 495370397, 996923439, 566380833, 854227389, 702509945, 42544433, 284265702, 294553519, 149363293, 27077251, 84953964, 442875086, 52560456, 900402134, 145229989, 73758817, 191009440, 854994962, 638721915, 122661714, 185868970, 77283521, 869275152, 18655948, 313026284, 709600476, 473812539, 310414874, 881320952, 952459523, 248120422, 525865505, 878780555, 987277088, 840681160, 676792790, 412115993, 140030918, 974129475, 721196483, 656805079, 905290349, 47935904, 451920705, 209356056, 551066765, 377150442, 379611973, 957219941, 151470005, 815021467, 645207971, 427463516, 863082600, 325313522, 124436219, 624577057, 614877838, 455973640, 851822937, 25478672, 694724523, 841056623, 311625157, 733217559, 234679922, 488590424, 672460808, 393534712, 496209755, 929085969, 673429468, 675205481, 477828672, 541309112, 421475544, 478494486, 773959869, 620756099, 817295158, 343366608, 474968096, 138789669, 1261477, 581929663, 193727536, 890932863, 10823177, 566850894, 774883564, 16714666, 326523886, 969386350, 297903394, 330603328, 602435368, 640131734, 422205271, 722651837, 536164302, 931111157, 119137488, 728875089, 985577117, 985476890, 17918009, 917723365, 472997173, 89115107, 916366434, 502538821, 230961609, 303908854, 617061492, 736625515, 131713887, 339453221, 738950163, 633262610, 426758031, 238112917, 779917917, 838020550, 66019448, 650675847, 778117049, 610691432, 213274580, 385410347, 146924004, 364868172, 467790003, 719723336, 134820272, 752419541, 477278067, 249134595, 704095466, 475445405, 736299900, 879265925, 152926089, 845846141, 495967193, 279498385, 571884448, 188818617, 160584873, 477296264, 718325160, 376134972, 29944771, 994040918, 900529668, 502667072, 63109761, 493032874, 781301515, 461834757, 82343644, 481132313, 514447042, 33858163, 779555233, 748165656, 15592733, 72424287, 572256728, 868353288, 210902382, 873738113, 462082508, 116372507, 317994063, 320661573, 43412947, 698165915, 782179405, 544478699, 376533191, 591100852, 669522818, 718785967, 689856669, 868867194, 692259782, 326169003, 372530014, 278822874, 245059471, 536750832, 337386716, 351509954, 600150419, 771930319, 812137400, 268506281, 52663290, 576040882, 250206016, 182636529, 238498760, 83748189, 556944302, 408365242, 877381661, 687598532, 206936328, 93325077, 375585930, 311118119, 840250578, 1, 47, 1173, 20535, 281857, 3219563, 31756649, 277324867, 182983217, 698763572, 224340727, 130185913, 938338213, 457596872, 500667258, 726272186, 242531386, 490324006, 697265581, 186365736, 123707347, 149163288, 89978475, 985283339, 584841356, 785509005, 693590689, 256394211, 919078587, 671307265, 271140497, 146527772, 508423202, 678732983, 767147115, 418422439, 470469749, 411147184, 246424306, 580998273, 228726677, 964726100, 955513349, 444565758, 668191949, 622619432, 792082487, 929348032, 601983375, 875985614, 424117930, 730694027, 740975250, 920167707, 500437835, 690210005, 493329701, 913508192, 695611331, 515433292, 682059417, 760833644, 299135864, 144219873, 937695856, 872711671, 176916492, 348891212, 334587033, 49595521, 749704350, 806067034, 773327860, 183297942, 590517602, 642228939, 275941227, 305722242, 165986509, 644370063, 71211109, 994092320, 193064301, 728492690, 76982066, 397536959, 240992716, 459846893, 745186728, 715105963, 864528752, 8495685, 753272988, 61740216, 691254120, 133693721, 536597663, 806042634, 964981978, 37162518, 164112239, 637759779, 841824460, 829311498, 573961610, 622092127, 856298148, 23010232, 90428839, 608194623, 46765621, 381935126, 362962166, 452925715, 585602790, 768818647, 88708532, 942042803, 418311021, 521378251, 499003594, 126819649, 281499536, 951375086, 146412815, 883657287, 598780576, 163659546, 959278876, 560517421, 665346319, 929162776, 164983787, 77699826, 451232846, 342897676, 483260356, 399557298, 954841649, 593150358, 617703430, 292815034, 3827776, 631211917, 629217856, 387782790, 117795063, 964508694, 824603912, 347867132, 217932218, 808071571, 466159291, 919428338, 306867765, 310085680, 347929669, 103137973, 445637697, 645585557, 573817817, 596387955, 672995733, 578127218, 402908135, 115353766, 244018895, 365778204, 555835033, 188328988, 247770780, 214263457, 844226086, 575129810, 998900133, 642186262, 886066131, 9933705, 609621463, 398319031, 223920768, 209742125, 519163806, 74615456, 814536291, 217678251, 205417278, 306418059, 464475526, 330591049, 614947407, 841330174, 17421893, 462387593, 572435987, 550253368, 393354277, 125715312, 124567536, 533400012, 599797708, 528236566, 670562226, 867851657, 488086533, 312725786, 238592338, 37063455, 385067665, 487783197, 118051898, 700641656, 71282753, 435781034, 103306472, 894876554, 845215295, 848516, 105817111, 455104275, 971250603, 659938256, 173306291, 702024160, 716038595, 487118454, 170680030, 880373959, 881689085, 153725278, 74926408, 143593976, 537712434, 635112688, 530810156, 750175992, 211491335, 495469862, 938874667, 906814766, 530322450, 654580872, 345961757, 642596517, 63791230, 944154048, 670877958, 937127089, 186748489, 915912734, 209561832, 276486399, 229476817, 558761321, 226557040, 227364465, 312169979, 745218623, 741668605, 732242764, 141121784, 862165956, 612899824, 26577011, 945385273, 251793938, 946782241, 731260038, 244678083, 406380914, 904932224, 539791264, 681567161, 903979395, 522313639, 307479666, 592336384, 274405785, 808155145, 116439879, 610551965, 466693001, 783212908, 356926408, 441684284, 460337698, 929744044, 6376955, 718008169, 946348344, 771828366, 973818233, 895371075, 977137826, 380169268, 772257849, 31334848, 472603919, 411133545, 814229722, 268412684, 269984826, 925865608, 465876593, 90547760, 192297128, 107314233, 564985934, 624177562, 939350415, 164843750, 127698384, 375467125, 733175906, 272735725, 449176665, 148653187, 981408173, 518395662, 539465581, 376426572, 523018009, 244326749, 117372211, 788925566, 998562683, 66998700, 958836224, 912519308, 243826028, 372775429, 817271079, 249393258, 980817911, 290157076, 803249202, 54296904, 967950499, 259586185, 891527285, 197070576, 229312354, 227197980, 799697366, 938796541, 780082061, 90937344, 484280959, 41280132, 365255061, 357940368, 463355056, 931322797, 484716584, 549219150, 927360223, 836260928, 974511964, 168938341, 138740543, 617041490, 552137623, 940491117, 311751083, 797191757, 581186247, 747525174, 464341615, 45074367, 877273095, 118604361, 820377975, 651223472, 330450797, 299712101, 798402816, 155978336, 76119913, 279749437, 94544299, 576902970, 337821847, 762491092, 205421212, 628488971, 912880168, 293200919, 74345429, 106904237, 117214135, 997309646, 440117215, 601730010, 44099662, 275878624, 579837056, 734358196, 740396992, 105320711, 497734455, 593389397, 892951024, 375888233, 469355971, 904918031, 759963217, 159920933, 656339936, 82028185, 635763012, 494109863, 887577439, 747214684, 51704021, 870514178, 310168296, 344440919, 671389360, 63636271, 867520663, 253359253, 809561479, 515218518, 735486509, 595414813, 855063768, 809133514, 296905455, 403829884, 13706060, 521945271, 406722813, 508410711, 177195219, 735377028, 927006199, 631467156, 561281245, 747357347, 2938426, 465345595, 461810717, 851331500, 936133185, 709629669, 764183492, 336958888, 999734612, 886346709, 929391292, 283117585, 489898780, 493902211, 377860665, 233672406, 313970515, 130449778, 925311516, 829665465, 27964512, 47478431, 502231137, 77997958, 450616449, 231073347, 922519036, 577962078, 74763491, 840109600, 825429573, 325716083, 462423227, 684091307, 610980133, 146344297, 230702558, 840583842, 568780809, 837872774, 467777629, 918753619, 868791683, 692922864, 937076083, 487643358, 553595896, 717484731, 882361644, 739294901, 547711612, 781629368, 821302751, 368923697, 499416921, 374122329, 146178192, 867117817, 743635071, 435195107, 43377741, 23687167, 878990481, 99110158, 262344925, 137035868, 292609610, 625408058, 171070693, 281506530, 350758492, 515834894, 237732608, 828774443, 840832942, 431386878, 857791323, 291378943, 894741249, 559570546, 881728336, 216217018, 497590589, 210577047, 706853900, 528807154, 595327246, 243687205, 679896105, 276389715, 520651743, 981854062, 782051052, 628779694, 482906971, 308000266, 98460224, 329039027, 663453182, 866909422, 358447817, 756042580, 103701857, 530184673, 82157052, 864831037, 833622836, 129557279, 680891914, 903510655, 223117879, 584910098, 872789802, 683398377, 818673921, 424793316, 162530200, 461191009, 233747923, 764377859, 866276050, 20068038, 599500015, 419525268, 504837656, 702339633, 161478719, 731429464, 9977417, 955013204, 944736389, 868359658, 303235910, 570685307, 762022093, 973456873, 491776893, 191155949, 1, 48, 1222, 21804, 304834, 3544928, 35583250, 316123172, 530785426, 505824986, 901343166, 615485588, 789348648, 698747334, 657848248, 964586458, 476943547, 698458295, 801769019, 257736525, 542576587, 933572174, 9542546, 488292838, 779820677, 404677231, 568188493, 931045218, 340825658, 205993974, 185959269, 78058729, 445883053, 431770274, 625502333, 180277174, 804167964, 894493650, 995189957, 934651928, 779076648, 286076285, 196236261, 433504295, 796345349, 46608071, 262327913, 615865530, 569486410, 232121371, 86175778, 154003167, 455565337, 592635041, 449778081, 946011559, 315342730, 523152035, 660192808, 984322053, 918448908, 362530845, 976500024, 826353996, 979299043, 20455239, 106430716, 169990095, 856925551, 339927417, 872925000, 454748405, 844111855, 778706572, 953334777, 367875579, 54603227, 952723870, 746089521, 114899675, 378338080, 515017450, 901556480, 75514717, 118586517, 750778341, 164215503, 398032943, 932771419, 175973529, 371281707, 414155738, 136305212, 176477492, 529591042, 473449712, 104580388, 917944592, 711611694, 275529831, 657391663, 618370464, 182199238, 863262145, 671572410, 926093081, 964697471, 20599847, 886336884, 976845790, 332330830, 936899217, 469444206, 333826539, 382006323, 404644652, 86283892, 711449573, 711524895, 240243757, 137744674, 52585102, 502954368, 568353873, 424768720, 673699213, 453807002, 277591996, 614231800, 858886730, 933633627, 855960053, 795294602, 320736325, 160050137, 741837408, 875372187, 933116510, 439299086, 339530899, 998809886, 988163112, 414204450, 626581582, 425958595, 547450689, 257877182, 25212376, 487090639, 693248108, 736165691, 261048117, 530252319, 667332870, 224234420, 283256778, 493030047, 381167115, 959191937, 567700201, 408470930, 456733167, 877572444, 640070139, 177231251, 53889209, 630925282, 764167042, 903138510, 822950867, 161878067, 741376139, 620673064, 828400388, 989198090, 398235498, 335164252, 650259410, 895482301, 288920533, 986020511, 960531109, 692510577, 743863232, 159848129, 639142915, 658806616, 286815941, 569150064, 996156909, 474086872, 377428234, 108191201, 968576455, 934066962, 520785392, 648351310, 322768543, 500047228, 717012630, 366640002, 617370336, 747113890, 647615517, 420668064, 485924194, 28548015, 242698362, 20265134, 481161073, 780894508, 716872330, 925052871, 809234518, 209608950, 454869307, 42621234, 266915957, 548835092, 11648368, 200676498, 803279760, 609790836, 522043768, 787672824, 264643232, 571421826, 762085826, 854807719, 119023111, 660310435, 945098645, 838260736, 592383406, 728604232, 586121308, 18945549, 62079587, 8000021, 137221342, 936745518, 867913927, 937623778, 183088542, 624248829, 606106136, 815005922, 728188591, 164502140, 885086995, 646575964, 60630781, 250914884, 619961376, 835493684, 1794097, 350786557, 222634027, 605402916, 871984975, 140157610, 784428245, 701028584, 784157139, 199990301, 49282014, 806191394, 544636448, 696393844, 625422532, 306981977, 200109353, 819880255, 622554727, 966234587, 1715755, 884432882, 186517679, 414057470, 559202957, 356291776, 440462056, 76496043, 54502936, 82793754, 693820485, 333532789, 139408482, 538301356, 908601203, 663844984, 277481039, 494620179, 126148065, 101563902, 543304970, 40138848, 255494176, 250466774, 181548534, 183041503, 553027506, 468172977, 571880068, 685135214, 70030015, 431414252, 965377675, 285528459, 577690235, 3039911, 424468115, 149219671, 315258608, 442938842, 340124780, 620577523, 697442435, 606981307, 195766252, 513624332, 160814831, 144529981, 626344971, 929525101, 167384034, 985564306, 757660450, 674490248, 404160553, 218780132, 253152109, 588527766, 276135385, 293545669, 229980166, 406532593, 544661736, 944987368, 74067610, 979465423, 367319108, 691015763, 308068787, 270297211, 892899529, 571121326, 682341094, 508186314, 992592910, 570463576, 551864557, 443417375, 102996223, 180706669, 66278518, 547390018, 97982020, 377733797, 642211092, 809569594, 442856622, 912786312, 563198351, 549331531, 576357131, 891027263, 77805689, 816522985, 731749256, 313952972, 411776160, 795006290, 22615421, 348238413, 716260746, 223962550, 78670864, 47765882, 267128253, 587371111, 927656165, 192469863, 806624234, 136996971, 759497678, 646978177, 833527505, 472805550, 754214240, 960030895, 232746388, 490616131, 420542303, 904038549, 210637836, 74285318, 144447351, 742135765, 244372617, 87595635, 852731251, 594678505, 794681848, 228154101, 363702627, 673985808, 239196945, 836249623, 602064792, 462168907, 430511049, 331217937, 84426505, 529390112, 953694258, 768941491, 296949641, 617567965, 759210871, 554347066, 314959464, 855978152, 459336095, 416019714, 554419893, 643616814, 307318600, 193723511, 342506504, 737708842, 961578294, 644413804, 283651295, 449519877, 262823100, 438065978, 195660179, 15479674, 929627357, 712657286, 867475048, 618979059, 615899609, 290553872, 46585860, 675146342, 899293157, 138576244, 932939832, 413352510, 228638502, 577046541, 52412367, 271101119, 704058715, 716195674, 113738084, 976781966, 417637854, 201849275, 137988263, 703452509, 833173534, 774723430, 98520292, 647910333, 702073064, 101667724, 93613248, 4773372, 993672667, 598539625, 298728331, 547262186, 609550837, 42278975, 203431476, 764589375, 791435299, 273439277, 15186943, 247517820, 332116413, 672582410, 88991345, 573172714, 370502342, 495515460, 486357723, 529038430, 112617630, 9655079, 54905538, 630913486, 94540925, 694069860, 101033114, 601510215, 405093272, 877399916, 606786230, 712700446, 365826653, 440611748, 222502187, 628732942, 260127071, 415183336, 331627148, 603111841, 484627861, 252203062, 603610758, 918118836, 775502591, 558836403, 458735214, 903545723, 229008632, 239177179, 70767308, 751925156, 652119146, 980361868, 450630793, 63075950, 714904102, 795480239, 196855664, 446357279, 343343138, 751184330, 353543327, 265335039, 291055365, 141693974, 952501609, 772988967, 982806649, 295006336, 142133453, 389243658, 551050114, 837354729, 288032982, 926886748, 940810321, 996269340, 544323652, 123254721, 449847916, 164321665, 408440169, 540527971, 235735087, 384560805, 888470688, 711171300, 414716347, 219479361, 559050803, 610845133, 321258507, 296543705, 253557800, 771631909, 466270561, 966519146, 100544233, 474799959, 147649345, 956135303, 808272257, 279282920, 472357219, 422709994, 530025514, 999788009, 64593897, 709199531, 479060735, 311654131, 943520011, 427742758, 799287390, 782392773, 191335024, 830990096, 336010037, 237942831, 237453992, 695887098, 398366572, 529644737, 344086296, 862051533, 684436865, 317549101, 968659087, 366641438, 1, 49, 1272, 23124, 329180, 3895908, 39783804, 359447204, 925733384, 746545659, 165655001, 158091124, 719304162, 111160209, 171158550, 935012406, 874008903, 988755604, 608336289, 351327718, 211049418, 970686245, 441380023, 920727544, 396494781, 218114186, 934368772, 753990221, 203263446, 488226646, 946324350, 642441651, 816607227, 122420091, 629716118, 498106515, 488881569, 100763230, 814241373, 430998026, 986590664, 188596813, 238499794, 887765759, 719310391, 819612870, 840885905, 584773429, 811468143, 396065785, 368868801, 299761844, 617462619, 308704442, 206242421, 833439007, 106715469, 970135543, 972244832, 66232618, 207050932, 577078708, 955731123, 103929249, 632790957, 297717977, 280927805, 856143814, 140717794, 889342899, 570959166, 553036683, 311778062, 833874032, 321035571, 629235909, 60666525, 19636232, 889773198, 837811568, 283828621, 499062871, 459250525, 468391935, 389843786, 80632526, 462481073, 859711240, 66143264, 831825780, 518914304, 998480225, 496960804, 480385724, 483317701, 923742113, 771054094, 630267330, 478946945, 527928962, 674723787, 882998613, 123711144, 324674723, 964132061, 961988031, 65215295, 858250635, 924300325, 577545014, 241841560, 172586320, 726876085, 210684082, 897202470, 742850020, 161301259, 120853804, 344539574, 836860211, 667275920, 72688787, 930704832, 179668299, 861726583, 168665810, 834696469, 672920894, 419563732, 302874180, 454615268, 934181182, 119694911, 779976833, 216225187, 244379028, 586838513, 942544272, 397970796, 155525782, 435250288, 609294947, 697035870, 790138207, 313089121, 451259481, 904475234, 15500998, 428233316, 352796372, 805867626, 355791012, 191743365, 390372515, 86113794, 224579645, 34292553, 472538607, 244805809, 799547326, 350596592, 550928379, 248605526, 858957317, 809083222, 418025439, 717379009, 843111164, 748566980, 795763411, 344249103, 246799165, 468081584, 533360568, 97839725, 814208152, 370784820, 149643652, 648814350, 586462723, 179226570, 323415874, 413399345, 830824722, 901264775, 785155020, 673315179, 883230707, 320461657, 209574161, 896187167, 641537195, 580708044, 615201169, 907420567, 226969633, 44823693, 653925850, 618905940, 556249274, 683808190, 595045606, 406684866, 817926872, 498013040, 741888764, 255307898, 750076370, 226664326, 45791371, 138249186, 182084615, 925519009, 32002450, 507648904, 36302093, 164244320, 134446595, 176304234, 443232913, 204696272, 377207389, 330407781, 317016375, 255990328, 346121343, 776903928, 865285835, 180645765, 94169320, 523805568, 66571932, 958229276, 706032441, 157122799, 174128102, 265560802, 960871567, 814597354, 840895548, 702037, 848074074, 17426708, 276377856, 55696613, 206160180, 32721003, 453495162, 587538197, 204676036, 610254246, 936113705, 842825687, 202272844, 145230437, 624393323, 739106533, 700708897, 523328161, 691038973, 656087189, 213848962, 927815456, 921255504, 609475698, 113463094, 529085932, 807792149, 579407091, 163833313, 694176222, 471399591, 346973697, 718259544, 297359882, 892552532, 451373341, 120883534, 8029910, 624607649, 606649877, 815313728, 231664869, 673443919, 615486405, 94571095, 110823650, 950289120, 646876432, 928906934, 684469503, 297251947, 919054473, 285157267, 967739040, 274416446, 465229888, 656873003, 825576691, 53305194, 539107135, 609069516, 669008004, 585520763, 526072937, 91836656, 101778461, 538228891, 424599066, 719851020, 234795290, 701214554, 914481398, 497763115, 504286064, 212679726, 409710596, 134500525, 154608785, 554889670, 267547678, 851784437, 749366191, 681515762, 587313005, 604179607, 297539881, 51380469, 30897443, 988568867, 430543091, 168358864, 325894509, 131217074, 122226126, 289735266, 2541560, 697428098, 339809826, 339814711, 568813016, 256466301, 865405619, 710940331, 7424767, 660900037, 729644940, 444, 450105203, 690939247, 459755659, 92556107, 42398758, 782901298, 483436309, 73995240, 784415989, 602791285, 655683750, 744368335, 684929720, 939318197, 1937536, 94209990, 544006669, 195169186, 297173575, 151918090, 559870646, 425964491, 818978660, 571568643, 60393204, 415731654, 547756555, 991386612, 383053326, 997830526, 963081859, 107336308, 898219937, 906988404, 550036125, 981857264, 691293427, 481189647, 501756531, 316529056, 476096058, 168221459, 165690115, 553028411, 960794528, 453386272, 963889156, 71983103, 494867184, 462967097, 635240847, 989817132, 23786457, 968645733, 163475174, 884798755, 971346358, 8231228, 947835970, 751371876, 21594745, 702982989, 997528759, 30899466, 874470660, 839706683, 64336797, 183002010, 415355406, 851375333, 802315034, 662347966, 459017349, 83113197, 807783874, 686211775, 665742332, 548408223, 38712773, 947065654, 224142524, 544199777, 554457822, 161813447, 59932464, 324817969, 826816639, 159675767, 610260222, 802832692, 962264291, 230527850, 654881259, 493134625, 56109407, 491401533, 163680598, 892934948, 889185132, 78662275, 741528574, 616484511, 204394884, 120980232, 4959172, 884202370, 468625389, 987185268, 797914336, 292935354, 542176515, 965256954, 25044127, 701524209, 669825969, 264620823, 983915826, 463815578, 325409981, 142164710, 946513145, 626025918, 890502327, 456729879, 921471703, 889764153, 10834930, 550258959, 888111963, 456661896, 560525119, 254574198, 379302005, 359197537, 748972811, 432885247, 174603143, 495215302, 304225805, 499574, 89067439, 956588800, 479903186, 900293862, 918419160, 874312513, 779518268, 750190343, 34999197, 204187488, 29703716, 310295240, 212734818, 705461990, 880565621, 542764103, 578132976, 871657196, 920555643, 635330221, 603836039, 905337022, 446003049, 531829391, 914627500, 109964459, 793773872, 883594493, 588890899, 761763418, 850946563, 47045637, 406265955, 398330580, 175033998, 98562597, 74022406, 109783010, 888406279, 62923507, 851720727, 920064661, 659715101, 731241623, 740764931, 68490942, 26861674, 832409630, 156628069, 65837301, 277330611, 504531610, 621094682, 513712789, 824543274, 863846088, 522929299, 50674845, 205053841, 391074024, 703020653, 598865065, 977680558, 126857946, 571772915, 596794646, 195429545, 328266420, 36051456, 451216030, 522276964, 948367998, 561406981, 389510759, 585943971, 108053297, 459413669, 288907310, 136029766, 802792879, 520247265, 414339912, 337619243, 597859489, 40005835, 350918, 321070418, 199829979, 141119131, 515535428, 350920730, 314377413, 808898947, 900198037, 799762368, 570476717, 244997759, 402733111, 626061442, 103647198, 938528989, 898060580, 652361018, 641847472, 149112119, 134262079, 887185896, 606038263, 859408453, 950373236, 692335861, 405660442, 565431386, 959094106, 393940636, 423632434, 612413824, 143336067, 663257107, 9730523, 471491852, 112828340, 936303905, 998673093, 55233966, 416039620, 144081002, 565258672, 539355694, 202448366, 14002378, 539019751, 307827209, 288622328, 788194350, 570120788, 965430343, 472467292}; k /= 2; int id = 0; FOR(i, 1, n + 1) { int sum = 0, now = i - 1; FOR(j, 1, i + 1) sum += abs(now), now -= 2; sum /= 2; if (i == n) { id += k; cout << a[id] << endl; return 0; } else id += sum + 1; // debug(id); } return 0; }
// warm heart, wagging tail,and a smile just for you! // ███████████ // ███╬╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬████╬╬╬╬╬╬███ // ███████████ // ██╬╬╬╬╬████╬╬████╬╬╬╬╬██ // █████████╬╬╬╬╬████████████╬╬╬╬╬██╬╬╬╬╬╬███╬╬╬╬╬██ // ████████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬██╬╬╬╬╬╬╬██ // ████╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████████╬╬╬╬╬╬╬╬╬╬╬██ // ███╬╬╬█╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬███╬╬╬╬╬╬╬█████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬████████╬╬╬╬╬██ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬╬╬╬╬███ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬██ // ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬████ // █████████████╬╬╬╬╬╬╬╬██╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬██████ // ████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬██████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████╬╬╬╬╬╬╬███████████╬╬╬╬╬╬╬╬██╬╬╬██╬╬╬██ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████╬╬╬╬╬╬╬╬╬╬╬█╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬██ // ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬▓▓▓▓▓▓╬╬╬████╬╬████╬╬╬╬╬╬╬▓▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬███ // ██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██████▓▓▓▓▓▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓▓▓▓▓▓▓██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██╬╬╬╬█████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████████ // ███╬╬╬╬╬╬╬╬╬╬╬╬╬█████╬╬╬╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬███╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬██ // ██████████████ // ████╬╬╬╬╬╬███████████████████████████╬╬╬╬╬██╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬████ // ███████ █████ // ███████████████████ #include "bits/stdc++.h" using namespace std; #define MOD 1000000007 // #define MOD 998244353 const double EPS = 1e-9; #define INF (1LL << 60) #define D double #define fs first #define sc second #define int long long #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define RFOR(i, a, b) for (int i = (b - 1); i >= (a); --i) #define REP(i, n) FOR(i, 0, (n)) #define RREP(i, n) RFOR(i, 0, (n)) #define ITR(itr, mp) for (auto itr = (mp).begin(); itr != (mp).end(); ++itr) #define RITR(itr, mp) for (auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr) #define range(i, a, b) ((a) <= (i) && (i) < (b)) #define debug(x) cout << #x << " = " << (x) << endl; #define SP << " " << typedef pair<int, int> P; #include <cstdint> template <std::uint_fast64_t Modulus> class modint { using u64 = std::uint_fast64_t; u64 a; public: constexpr modint(const u64 x = 0) noexcept : a(x % Modulus) {} constexpr u64 val() const noexcept { return a; } constexpr modint operator+(const modint rhs) const noexcept { return modint(*this) += rhs; } constexpr modint operator-(const modint rhs) const noexcept { return modint(*this) -= rhs; } constexpr modint operator*(const modint rhs) const noexcept { return modint(*this) *= rhs; } constexpr modint operator/(const modint rhs) const noexcept { return modint(*this) /= rhs; } constexpr bool operator==(const modint rhs) const noexcept { return modint(*this).val() == rhs.val(); } modint &operator+=(const modint rhs) noexcept { a += rhs.a; if (a >= Modulus) { a -= Modulus; } return *this; } modint &operator-=(const modint rhs) noexcept { if (a < rhs.a) { a += Modulus; } a -= rhs.a; return *this; } modint &operator*=(const modint rhs) noexcept { a = a * rhs.a % Modulus; return *this; } modint &operator/=(modint rhs) noexcept { u64 exp = Modulus - 2; while (exp) { if (exp % 2) { *this *= rhs; } rhs *= rhs; exp /= 2; } return *this; } }; using mint = modint<MOD>; typedef vector<mint> vec; typedef vector<vector<mint>> mat; signed main() { ios::sync_with_stdio(false); cin.tie(0); int n, k; cin >> n >> k; if (k % 2) { cout << 0 << endl; return 0; } int a[] = {1, 1, 1, 1, 2, 3, 1, 3, 7, 9, 4, 1, 4, 12, 24, 35, 24, 20, 1, 5, 18, 46, 93, 137, 148, 136, 100, 36, 1, 6, 25, 76, 187, 366, 591, 744, 884, 832, 716, 360, 252, 1, 7, 33, 115, 327, 765, 1523, 2553, 3696, 4852, 5708, 5892, 5452, 4212, 2844, 1764, 576, 1, 8, 42, 164, 524, 1400, 3226, 6436, 11323, 17640, 25472, 33280, 40520, 44240, 45512, 40608, 35496, 25632, 18108, 8064, 5184, 1, 9, 52, 224, 790, 2350, 6072, 13768, 27821, 50461, 83420, 127840, 182256, 242272, 301648, 350864, 382576, 389232, 373536, 332640, 273060, 208548, 136512, 81792, 46656, 14400, 1, 10, 63, 296, 1138, 3708, 10538, 26480, 59673, 121626, 226787, 390144, 628744, 949472, 1355952, 1826464, 2341600, 2833632, 3282464, 3584160, 3765600, 3719664, 3531924, 3093336, 2642364, 2010240, 1508544, 963072, 621504, 259200, 158400, 1, 11, 75, 381, 1582, 5582, 17222, 47194, 116457, 261163, 537459, 1022981, 1817652, 3040352, 4810720, 7230928, 10360160, 14178912, 18577792, 23327872, 28132048, 32571504, 36310464, 38903904, 40028724, 39552156, 37457388, 33941412, 29314944, 24179904, 18835776, 13777344, 9452736, 5716800, 3211200, 1742400, 518400, 1, 12, 88, 480, 2137, 8096, 26860, 79376, 211811, 515308, 1153268, 2391936, 4633331, 8438664, 14557048, 23874176, 37407760, 56117824, 80906752, 112162240, 150052400, 193572736, 241706624, 291576384, 341323776, 386160048, 424359540, 450394992, 464545584, 461528208, 446428476, 413557632, 373573440, 321120000, 268449408, 210332160, 162330624, 112550400, 77788800, 46540800, 28497600, 11404800, 6739200, 1, 13, 102, 594, 2819, 11391, 40344, 127508, 364587, 952559, 2293742, 5126898, 10710633, 21042989, 39117852, 69175664, 116857024, 189256368, 294745440, 442503456, 641759376, 900689616, 225195321, 617201401, 74227554, 586823330, 140227131, 711888699, 274217080, 795069832, 242715461, 585116357, 796764497, 861974465, 769155485, 525176285, 146566301, 650715556, 73773796, 455145195, 828946802, 226153586, 685663993, 216281593, 828705600, 536385600, 309484800, 166924800, 87609600, 25401600, 1, 14, 117, 724, 3645, 15626, 58741, 197280, 600215, 1671266, 4295107, 10259436, 22922995, 48184950, 95816051, 181136304, 327071752, 566117888, 942525072, 513281017, 349163810, 532145419, 154557773, 309226767, 88509354, 563257605, 789064441, 766807654, 474675580, 795689314, 599134613, 627066840, 658988947, 307608398, 337632800, 295701193, 44870369, 150212311, 705302359, 336038622, 452522163, 797367958, 62674553, 57993322, 777736994, 845298906, 452367755, 90655804, 810196653, 976943895, 564798323, 582118351, 994783972, 869862386, 697759993, 660441600, 381024000, 1, 15, 133, 871, 4633, 20979, 83313, 295803, 952299, 2809009, 7656027, 19414457, 46086247, 102967901, 217634463, 437195525, 838372452, 540635289, 722168530, 638311860, 640827391, 196046908, 898688562, 478199884, 793020369, 808862771, 562236075, 94791602, 385333320, 237794527, 197694759, 398043392, 504456766, 579736664, 78137089, 793367253, 961295251, 280517488, 179779783, 947563092, 901772777, 859566930, 199212409, 920781370, 362900807, 735004334, 297264154, 482748036, 653703312, 140400674, 623159781, 320434095, 373194802, 13313867, 205909676, 360223815, 570584277, 68075848, 372652149, 961247580, 23084534, 261139053, 151302323, 715359965, 625702393, 1, 16, 150, 1036, 5802, 27648, 115538, 431844, 1464468, 4554040, 13096378, 35069940, 87969166, 207781760, 464351910, 986188668, 998611836, 879505923, 237509223, 15110629, 621334822, 88677622, 257578542, 963016850, 235638961, 442107823, 429101453, 483004748, 329733855, 718448185, 266304376, 413950543, 256286771, 626720357, 318467482, 59069608, 81901162, 352730851, 104241055, 503595237, 956355036, 534522134, 457799859, 108929893, 887297322, 424614770, 265024591, 876853471, 515703045, 692038809, 210906163, 20070317, 468291405, 145357835, 797577421, 232358134, 747771239, 343859985, 833879609, 78548665, 289896769, 449285934, 313197004, 379603290, 397630660, 609910102, 442642726, 627950853, 722186028, 705163253, 998661511, 771071664, 636940611, 1, 17, 168, 1220, 7172, 35852, 157132, 616084, 2192506, 7159090, 21631676, 60902460, 160707468, 399489140, 939796228, 101060910, 481320121, 151453550, 952463061, 931694473, 957528293, 554162053, 990142499, 644946993, 651797781, 791594351, 556120466, 271969917, 107619398, 710253075, 280526462, 615698879, 99748930, 775178221, 257586036, 645364809, 806795120, 340635512, 801741075, 790520661, 68328385, 331513794, 351728404, 931812262, 91105169, 176869824, 445724501, 370449983, 359815736, 918724628, 869062973, 659791249, 657727222, 395793733, 32692523, 78858425, 151369211, 628504487, 842750087, 152091477, 889718876, 908002421, 944598446, 656459208, 712920845, 47550280, 92244967, 110652620, 951703750, 217822851, 901098263, 655149074, 861896271, 859184013, 992613245, 768042116, 807916959, 335381553, 909568095, 153171069, 827990317, 681893483, 1, 18, 187, 1424, 8764, 45832, 210072, 861400, 3206786, 10957868, 34666130, 102239488, 282743580, 736889224, 817936097, 262532028, 534038590, 412279142, 965109380, 86702267, 846482566, 945052509, 644517943, 548776024, 679330947, 152291502, 882910517, 188127435, 636778925, 902059202, 132531208, 193904122, 893705022, 246193070, 652079051, 958060250, 148697872, 504141990, 371410212, 807466717, 514477363, 565424570, 560794838, 11419155, 215137208, 665710713, 791504234, 359367396, 224050172, 509091270, 125989128, 782600310, 957126038, 667219607, 386301613, 605448653, 296557741, 618019404, 194294675, 222923480, 765962783, 743934970, 24324611, 512643153, 214242880, 286900578, 228877964, 91240846, 430467141, 533029377, 904804693, 373207899, 916503101, 83598539, 560288494, 363356684, 68282446, 152683809, 284461190, 124425011, 167972327, 428909487, 373215034, 420008537, 513304383, 874743039, 487193257, 97337408, 532639641, 184378261, 955976093, 1, 19, 207, 1649, 10600, 57852, 276620, 1183172, 4595034, 16384606, 54107670, 166643130, 481442164, 311240781, 381378831, 288429444, 380463632, 370477330, 171662912, 688513797, 626045604, 789881798, 844990830, 70546834, 230422087, 267733218, 970080423, 75064762, 104073936, 888990608, 393490487, 819401315, 362017415, 197941501, 97730360, 491049732, 790022455, 142301163, 381999002, 81566974, 255547256, 500580164, 503785886, 874661360, 953064009, 357278689, 416715628, 656421867, 311332859, 849655408, 575613107, 850236831, 533549113, 255339339, 611845477, 501164398, 135987981, 672393680, 678611757, 552403430, 470027818, 333312311, 203812034, 929380798, 133842121, 497262544, 839881753, 29703780, 133717366, 249364505, 959337844, 632980495, 72879056, 356819838, 662140760, 182352973, 260787823, 329159184, 423643610, 488600943, 164109163, 8143787, 184454683, 684285006, 693158498, 382122550, 488552031, 777204359, 564238497, 598675373, 603916585, 720234840, 93182262, 238936257, 486420235, 352604922, 958291193, 880928218, 736558676, 163545641, 189347824, 1, 20, 228, 1896, 12703, 72200, 359348, 1599616, 6465450, 23997032, 82508708, 264654080, 796563486, 260832418, 76986106, 528774007, 854313906, 307546108, 722735109, 61004626, 805619536, 18191861, 511411798, 993782454, 401030744, 633897378, 70862649, 96855526, 314416445, 92910833, 135520920, 492052755, 24334887, 643976444, 574388511, 317610455, 122930943, 637889505, 255461238, 950861369, 48876234, 149504663, 198682481, 942670278, 866921314, 563621302, 960474580, 980132644, 624295523, 399490883, 351714973, 945626033, 827908349, 157456205, 481861323, 472454109, 343580291, 683697065, 95059407, 841332348, 464714941, 596887160, 38681949, 757883329, 590303711, 64921694, 730086270, 15240461, 714742087, 32874447, 175996750, 277466516, 788882909, 11880203, 95097385, 778398376, 531252352, 479554466, 557013590, 609738833, 798714176, 859324339, 721484640, 268442938, 861267595, 806087188, 31691029, 950412807, 580575404, 849451646, 691790951, 264837637, 967322620, 365040170, 622467624, 456436788, 658680316, 60575186, 387550026, 215002020, 31349904, 449373833, 559514745, 640364153, 807042078, 450172023, 562637973, 109112418, 545193132, 195217263, 976304283, 1, 21, 250, 2166, 15097, 89189, 461164, 2132144, 8950214, 34503182, 123236828, 410729140, 284813823, 790835929, 594736274, 153822108, 374418504, 157537842, 147846917, 133568389, 483576696, 508616649, 656867821, 84463125, 640047601, 955370715, 182167616, 49108700, 229345632, 795610484, 502493987, 857101031, 142485158, 996679960, 742503997, 723858587, 317526153, 365342533, 250775491, 442738912, 408346120, 881242865, 135363327, 231979623, 347291745, 824934645, 995772018, 164592917, 354883487, 450805745, 963969802, 171006181, 92161176, 169883419, 961669090, 26844445, 393784092, 571606470, 464707158, 34144520, 652396373, 745405475, 202923498, 135935314, 703695236, 776259115, 48310283, 874186699, 219390686, 510394758, 751965065, 418424556, 8781061, 736058807, 674014147, 674780706, 590530540, 4352977, 803825827, 167292329, 541083402, 260679638, 665083995, 939990721, 816665296, 886017767, 669822229, 694816125, 643235536, 937314556, 115942268, 261159535, 687177905, 12245758, 694615643, 977706180, 217949106, 118952653, 898868241, 856650616, 42954342, 330321980, 535121720, 982503521, 719423135, 714354007, 18745970, 333448882, 302037622, 935654015, 778423936, 317991952, 284756555, 504736970, 155871365, 118263505, 797065125, 640838446, 258037348, 34344762, 502389803, 911086550, 1, 22, 273, 2460, 17807, 109158, 585339, 2805752, 12209406, 48792492, 180680070, 624410736, 25734764, 199973794, 977710523, 571365953, 412869707, 328237414, 214863466, 633048751, 257394955, 317735309, 673309005, 193600985, 704135816, 514918834, 650479735, 33606857, 490034801, 698396427, 67986999, 220797055, 218864611, 931163713, 940790978, 675674698, 85542051, 543018292, 61247584, 910803604, 831296179, 923943160, 89478028, 104500393, 161998091, 254912705, 539249258, 547749719, 357852173, 690014841, 206926249, 893887199, 747112232, 382059625, 148865046, 301618706, 260333115, 442306036, 247371284, 782005651, 233300621, 920894203, 317455792, 678639547, 427050277, 482884001, 854060466, 980543322, 860769666, 701293636, 771136168, 670745480, 486701027, 168461356, 848787800, 289825171, 498776317, 33320170, 430165721, 821516580, 115533370, 398776967, 333310602, 563097053, 553134182, 219816464, 216637272, 206027601, 933677337, 925510467, 267639197, 43693887, 486722546, 270929495, 877730912, 261947307, 375318068, 692508932, 989184491, 226696206, 288508969, 739837562, 849035543, 782296408, 273955665, 801085382, 431898190, 935043965, 202752072, 867866169, 151133676, 67940990, 78118516, 742654574, 165553271, 254022475, 668960857, 929973305, 656759571, 877339826, 925206924, 133648890, 623964326, 796176354, 256442424, 844384225, 955053908, 35821657, 33969824, 328610099, 171474448, 265634834, 954990510, 1, 23, 297, 2779, 20859, 132473, 735535, 3649437, 16435370, 67971642, 260491974, 931772466, 129241853, 915880695, 773220207, 21124907, 663657824, 89235883, 562087424, 395633225, 79602143, 818737728, 503346111, 923762587, 810187543, 71950684, 872552891, 722894374, 788701216, 792043650, 839896539, 577542972, 345484502, 350106805, 159630680, 594479078, 806985602, 451202244, 562057157, 345406448, 404888318, 371479292, 122121086, 196184273, 855722413, 625056343, 209132008, 580725504, 234791519, 683270249, 879431955, 820639155, 890517789, 877206124, 780147370, 943542736, 532169988, 134361777, 389279830, 486085405, 212150153, 60309713, 36144061, 220641769, 167907687, 433032241, 672669299, 4840381, 543970499, 860603358, 920463673, 899153827, 269139419, 99866794, 833550296, 732963165, 649634036, 220976898, 948879986, 81746947, 249278044, 943429751, 227240067, 617290217, 857759442, 317672542, 702411387, 392102340, 598392406, 771484657, 20769431, 772211314, 777981688, 103043307, 336611982, 922346108, 46010568, 620920750, 740298345, 143296430, 127113300, 229361025, 452883985, 298773134, 583669967, 430943791, 878469881, 498554889, 377075156, 399618101, 518539100, 610655946, 762624102, 339746521, 193491143, 582788075, 58498274, 139175929, 439487543, 659039143, 969039085, 205473123, 149794944, 735361805, 144310487, 952281582, 885994682, 290034640, 449859219, 870975475, 717604104, 930837761, 466542500, 510501275, 368063612, 61813298, 959329905, 938922014, 660077190, 12025968, 335011033, 657136343, 351072920, 964781583, 196462283, 1, 24, 322, 3124, 24280, 159528, 915834, 4696644, 21857553, 93405656, 369882084, 367190881, 745178532, 541448535, 237690972, 408537702, 191376116, 678513161, 493570976, 397907192, 9101765, 658714208, 122356973, 514532531, 911169029, 6916896, 782796, 910119724, 942560918, 62371227, 773940129, 523667340, 669757203, 42568262, 891666384, 467022993, 486796667, 727294526, 413613585, 787453753, 599953158, 417187968, 359849625, 117069116, 879478181, 12380000, 910899870, 838986319, 102687453, 103327364, 376800830, 429223538, 780159138, 706916356, 587575355, 971169352, 36010810, 483798044, 344462034, 787276711, 359714668, 737585540, 514856433, 506547585, 7966248, 935961, 931790046, 725219981, 437246235, 737823353, 539625329, 101294921, 998345360, 158678756, 14552916, 434899855, 58679632, 771567929, 908041362, 370603042, 958461645, 473954165, 329932246, 645017860, 950250115, 632956030, 39737256, 308287817, 593859369, 848980890, 73354610, 67983312, 794665532, 744501399, 571146358, 79777328, 768540650, 301591668, 87146707, 749547055, 542914952, 113807115, 981646049, 443442346, 689844336, 226785366, 664441023, 644644459, 65534356, 186334852, 433121661, 818953887, 687026114, 344822747, 464015963, 110899493, 294091084, 65199948, 37449794, 719226153, 501099656, 413337315, 725255533, 799293560, 259962068, 954615054, 373654234, 764439094, 914044890, 22085466, 539035590, 698634111, 313016212, 98993468, 941478268, 955683335, 902077766, 420565422, 767959775, 128648986, 355285226, 534029655, 104714136, 932643222, 778200211, 56428536, 225880543, 792355687, 449940761, 181471652, 529937629, 325235521, 6575392, 94094707, 441392085, 37264955, 911557047, 1, 25, 348, 3496, 28098, 190746, 1130768, 5985744, 28747851, 126764795, 517958180, 975500521, 75313899, 914923483, 611051644, 458281681, 932346365, 712529240, 185024083, 463834094, 950836649, 286357381, 871292163, 434939852, 58330077, 629835295, 27932676, 66354549, 10923173, 590226200, 526183672, 176005584, 809584977, 222348292, 260397896, 396327746, 178971085, 774808076, 78650222, 507195902, 144802453, 299847298, 581537053, 724817078, 350425193, 503589319, 654904119, 595937600, 992781673, 82554146, 868891604, 769490422, 119334199, 287573489, 85347169, 118147346, 949694675, 540939467, 927324362, 545027201, 610310429, 769058023, 21423, 262519735, 786795808, 240407039, 428554518, 447092428, 788617633, 367724192, 374279457, 343082569, 856162651, 150954733, 962857235, 700751807, 895999415, 533537747, 537990547, 268357366, 869434038, 633081543, 603452058, 947934680, 987367826, 743179254, 710352935, 835787228, 706586787, 845202323, 238777269, 405136472, 480736674, 155194042, 871452828, 677921910, 616952227, 984554304, 602482844, 894952109, 161534829, 782737895, 850072208, 670793244, 828100052, 222399146, 284700626, 231919567, 306545173, 673216888, 772842480, 314744315, 347738200, 25002680, 730048408, 649455506, 745857274, 196252843, 529935260, 419302767, 276709210, 732855171, 343508231, 624945362, 861002432, 484757974, 367927715, 209929226, 661865936, 531107025, 413469524, 479519565, 741904536, 610072165, 606639245, 934344602, 716197790, 587584177, 185414563, 306822687, 841034662, 971868532, 919896238, 158358640, 773475266, 936203252, 665923149, 911486615, 197651366, 774528535, 82937079, 883806524, 130206852, 774201811, 995994000, 245370199, 842572718, 793423605, 740588350, 687616120, 657690139, 857790226, 37323118, 88399209, 523321086, 117621631, 71036645, 222192424, 788926021, 202125596, 1, 26, 375, 3896, 32342, 226580, 1385350, 7560544, 37426495, 170077814, 716127109, 814596482, 388283574, 187079164, 480126707, 290089727, 38629756, 54115650, 64891257, 901599546, 718222041, 911275669, 323565019, 817912019, 805459451, 803612364, 201797073, 732830955, 80380678, 23464457, 701195891, 272214917, 913862649, 132026200, 669751010, 759341231, 973676755, 794065196, 967438659, 308299894, 10712690, 949669597, 781686555, 88559004, 727530543, 318751597, 278470531, 434911202, 804701133, 324324750, 981099143, 232682614, 987104568, 776649739, 786487389, 442468777, 569068005, 663709268, 881510700, 203686642, 57967683, 568729400, 236001193, 623959074, 703861418, 908672716, 70204475, 867825588, 827103298, 241630317, 362696969, 415618616, 805038660, 598704556, 10082872, 643477587, 415164213, 703084166, 477367476, 20036406, 629980785, 802614294, 952521645, 17601466, 311433959, 830294700, 548394039, 535645146, 521413012, 929141249, 283365227, 727229980, 443388093, 410708269, 286618040, 319768543, 938841603, 93475597, 394693465, 931196821, 495806189, 902879580, 707905623, 303901454, 576396872, 484544924, 486011674, 564305854, 311518869, 856442237, 372745088, 366968335, 813470622, 720542245, 551543931, 596748971, 778551123, 354920979, 984250497, 691689872, 327423759, 52302396, 920309409, 457393341, 162758194, 401889329, 760192486, 361045291, 58998809, 845800809, 8575285, 649668894, 501939170, 542308042, 574502757, 192463535, 690505425, 204738512, 689813836, 483570629, 525148782, 216925832, 952334594, 68584858, 946061868, 229986068, 113082103, 705545851, 563504064, 430610853, 209937938, 608555345, 578039088, 750439353, 944169681, 417934823, 74422181, 960090808, 568355902, 435674968, 894299009, 15861008, 618713868, 509911155, 168869978, 339481775, 369451744, 600513141, 71634326, 781507214, 857107917, 106564183, 736233715, 362800524, 615467708, 519437498, 342065337, 206666492, 505918934, 308299385, 20927738, 106279730, 457391057, 1, 27, 403, 4325, 37042, 267514, 1685106, 9470830, 48268511, 225792189, 978561725, 958557158, 38052071, 919433401, 254995547, 546697380, 704487939, 32839999, 508901654, 551556389, 663564198, 695178769, 814009554, 547143595, 371559020, 945387943, 670094820, 616330760, 976064124, 607380120, 8699769, 998280938, 580008436, 958036252, 912203574, 544195790, 396609897, 954428754, 708902921, 801338681, 431017191, 381717232, 344144422, 131861617, 874277396, 830300192, 596462835, 318671397, 244894238, 904557382, 834593756, 283869037, 697514761, 969250693, 509524190, 913260759, 384371901, 692021356, 509945770, 32685910, 505430483, 907189201, 193340383, 693205397, 603006308, 305262013, 925218957, 968092842, 27052064, 47727228, 477199307, 293774777, 98292616, 663047137, 995897620, 288543890, 998081856, 524487172, 892499155, 556044593, 972323813, 578208602, 933674462, 509188659, 985492681, 986901126, 628028841, 519717277, 311965185, 897395442, 829761538, 9680527, 161715155, 343759581, 402616197, 861303980, 911400557, 358697993, 515548395, 553147014, 892738525, 205604013, 762111690, 442223169, 7841804, 517369986, 84729818, 152655938, 700957258, 898706126, 75157861, 271201265, 543855670, 440588279, 204308612, 236683234, 208667572, 404506592, 809547310, 853106482, 518815458, 16491026, 491832633, 360120645, 923872102, 602086347, 641452842, 18221609, 229080666, 428455406, 569262655, 856993308, 230900297, 490066099, 367669571, 96292417, 52365382, 469261002, 374633464, 900617667, 182287939, 49700390, 796588976, 949085023, 222503562, 658471212, 94278399, 66098044, 72459139, 603916441, 257635815, 234793049, 951525459, 549173423, 938321308, 13662267, 288258509, 65326301, 11071916, 364716823, 929353581, 839483911, 199241395, 29486252, 482468148, 829994735, 370892643, 687560607, 531658704, 568187724, 486108828, 475403750, 227529481, 124500798, 228110006, 56292488, 958873404, 963718586, 481659835, 183136868, 593123751, 622015148, 469053734, 211587807, 928091671, 481375722, 612130911, 134707706, 334981252, 784422204, 712253942, 698883770, 390222722, 25478322, 28778175, 349558455, 616616543, 1, 28, 432, 4784, 42229, 314064, 2036108, 11772944, 61710789, 296841956, 322742117, 501368237, 486564198, 208215103, 787564548, 236938424, 301578523, 866593178, 461034739, 153403692, 741061604, 268366308, 41671958, 999969805, 820629183, 540097933, 348143198, 290585123, 709901036, 830657214, 397773343, 205345230, 80836479, 744283025, 767371096, 13280133, 166091858, 688213267, 405245759, 999129285, 957885801, 125598090, 229197648, 232621259, 771781842, 15692966, 623498734, 209019752, 451480479, 405116698, 905232949, 522429827, 160392239, 911337480, 463779522, 870625842, 997849245, 364479050, 834828, 300785526, 10186705, 265101999, 566806573, 614983712, 685595755, 48653250, 344390997, 673637797, 896886255, 108856368, 31386606, 486989879, 489263782, 517653845, 976993581, 117774221, 829510874, 294191687, 233225993, 831800739, 448583977, 657291524, 649603801, 456575978, 536862581, 855051723, 994222346, 302476269, 502749737, 322446053, 790323255, 357338908, 887312147, 181428924, 536100952, 55330164, 160205355, 190454705, 365581727, 201998030, 826748536, 400273437, 624522779, 849319472, 800147953, 80982274, 447705256, 168185200, 97822479, 309878269, 678607548, 912097410, 927785144, 334246635, 662138658, 715198385, 260363473, 461374975, 89468114, 651175074, 575096135, 130470890, 71518840, 879845193, 486812125, 128678982, 647847215, 49005945, 59417027, 550597313, 85275582, 589669875, 488581288, 579391253, 238935007, 307933774, 801626662, 991248834, 831660242, 2289249, 939337934, 170802252, 112167473, 712496239, 45742853, 482400666, 341362938, 957391891, 147812751, 376451585, 832724562, 418101830, 38563919, 274362964, 819817184, 400041713, 313141267, 806456583, 999307614, 670677205, 585839782, 845991536, 831623045, 109161241, 554327240, 822718306, 173814042, 363700239, 22366070, 479904205, 190929878, 554951008, 774006606, 279182950, 109357938, 401823952, 575672540, 860574847, 593910748, 547825741, 217594637, 989467389, 184852185, 331539318, 325720467, 383229710, 654245987, 146654996, 209385163, 560462909, 965812836, 65583448, 508391947, 709539829, 955465325, 214525022, 394005813, 531700924, 773028650, 417539579, 326670161, 406612199, 165245, 699092510, 550837077, 14964582, 527720684, 440459594, 268905155, 297293091, 881879628, 1, 29, 462, 5274, 47935, 366779, 2445008, 14530396, 78259797, 386723841, 770080067, 561338901, 331351593, 839635833, 167817400, 497149119, 881282118, 352201610, 471630724, 181160121, 88806794, 987377178, 289689361, 946592969, 656979867, 594487341, 196240769, 948508749, 810784209, 709855728, 576276359, 518417791, 87667236, 667014934, 181628700, 79050911, 337053925, 373883684, 560120551, 458872893, 815731972, 827954345, 771964062, 380463298, 190074568, 335845313, 308369049, 297128477, 730684746, 742600059, 263592454, 96421517, 206168581, 306386280, 238588046, 136275025, 509837233, 285349782, 467079296, 44733505, 132275281, 829959933, 391862643, 62600608, 253168338, 426879146, 365435454, 91732486, 471304236, 543190875, 798110387, 894371900, 696428631, 750022470, 726550236, 936549828, 542410178, 939184541, 791578453, 983635297, 823881369, 150676558, 585328209, 653882077, 963087655, 950795211, 936066317, 71868369, 440124326, 965151462, 175368387, 40663323, 699428294, 108367130, 332044307, 970432796, 572024201, 885659377, 539317691, 132218646, 139253073, 467726930, 45351751, 297376822, 508633325, 703469419, 746467332, 503668629, 112630766, 930570931, 962347630, 576196343, 698904389, 167199167, 333129737, 608922442, 222067115, 688206452, 802821275, 954540394, 911151138, 906746447, 902608727, 890863920, 307268385, 54404696, 104370759, 495676754, 441341576, 829087999, 88911607, 975336543, 381836343, 298727399, 758323163, 709721214, 146811076, 322114121, 909574264, 955852236, 803216000, 511491931, 157225317, 671670053, 367885171, 612666342, 842261160, 508147005, 345029386, 809990068, 981225972, 241279545, 458275632, 172983843, 48836190, 961296645, 538132589, 271432367, 877708377, 386417805, 815731556, 463571419, 404450924, 113136747, 549319603, 219464194, 220054123, 907114544, 328856175, 265047793, 589592614, 328159953, 809008569, 510434161, 420313068, 107873733, 868895119, 895337042, 156863206, 48004547, 666506430, 727609186, 85858741, 59205240, 78940637, 545962715, 139572749, 421355881, 858507471, 952603331, 401020118, 942925111, 296295597, 997986384, 115737481, 677010850, 282276283, 274892540, 163700485, 118592549, 846472792, 136765224, 236032397, 179431589, 539549211, 214067143, 923131121, 999465547, 232088789, 610013691, 896204760, 478686995, 218989077, 91096939, 221616643, 243944261, 454787573, 542927414, 355318220, 147354818, 482630, 675619041, 634351197, 478341164, 574509037, 738721209, 1, 30, 493, 5796, 54193, 426242, 2919073, 17814512, 98499977, 499582398, 346636279, 286311246, 338970899, 482987014, 740494022, 522312682, 389124982, 438269373, 295660905, 384589942, 269003911, 190728878, 21841107, 394443500, 159301748, 885681179, 869073529, 396029106, 969827087, 16747334, 474716791, 259235367, 753984455, 365768194, 423375006, 957390875, 407261764, 592999097, 928039310, 529328158, 133251022, 533719572, 434981329, 779487889, 212784950, 467080112, 287628298, 91658981, 576061624, 322787361, 682746649, 234833733, 676878118, 220869554, 982232103, 879428014, 742840902, 65876039, 230084790, 68776407, 988541480, 113769367, 288661011, 898604342, 790158821, 811679832, 416532461, 643426286, 357304561, 904850873, 143689492, 643378934, 217587561, 816799579, 741653213, 950522177, 519192837, 195766899, 875531753, 913462122, 931740864, 147485151, 73473743, 881407231, 943949423, 19375017, 95185407, 658198820, 654223830, 78841384, 487272636, 810454297, 156111172, 108214345, 594083015, 721613382, 413639222, 199581479, 219296986, 983776208, 50034813, 434669652, 336761553, 553659069, 443256837, 867959007, 649693919, 829394710, 511124003, 801382432, 809258820, 440312724, 549557631, 57091967, 619973166, 38255131, 989252595, 296849831, 126449228, 992478958, 948085171, 398912012, 308493194, 585304989, 581850817, 704472537, 457658359, 706849064, 974235300, 322942033, 801441410, 806760539, 930211369, 674605925, 140615032, 804334982, 654022727, 747554604, 304695097, 670935186, 973200118, 899755340, 43016718, 33443894, 486649937, 183173093, 28680647, 612676891, 17478829, 208078434, 467131016, 651933212, 464433186, 3993644, 959280435, 310671435, 524438940, 540166082, 143663989, 984026973, 596317769, 299039541, 925611762, 115137245, 238184581, 798462400, 902062936, 499673997, 696053154, 121959061, 376644235, 378356623, 996412950, 115590297, 517087995, 817795384, 731733847, 61225249, 930096903, 292653780, 149516053, 503527083, 233497811, 781589564, 87992011, 514696635, 495015483, 151617728, 478098704, 773499685, 621536652, 787266199, 440325002, 249898342, 747360642, 671517137, 216648293, 686506084, 544204132, 949750238, 249236969, 319054830, 756596931, 233403453, 594672369, 158463779, 809106181, 249481644, 610711719, 262167344, 179138909, 270160113, 278492510, 490828032, 946977816, 803242084, 541036271, 624688984, 204404014, 881539240, 779609382, 561095932, 524976628, 888316278, 139701497, 712146362, 413036824, 810411985, 241441787, 247390036, 695355554, 122993697, 227371919, 399947791, 833892197, 899399938, 781528108, 656359733, 551706967, 845829828, 900357325, 1, 31, 525, 6351, 61037, 493071, 3466221, 21705119, 123102861, 640304911, 83941000, 859775332, 485271727, 929183599, 393442380, 976105677, 287805815, 238271867, 74391877, 765979021, 335546599, 709265303, 808915958, 907593582, 463983041, 147572225, 888153362, 391439968, 221443415, 801779213, 245226914, 866175931, 810047153, 267980729, 805674759, 955321032, 906824500, 367243333, 486256638, 145115859, 530769671, 290945081, 932311137, 51068986, 807551107, 185085629, 261181005, 959829857, 118218336, 295880881, 506261294, 848742193, 936582961, 153400705, 578662225, 341741810, 161659811, 816049772, 839223846, 559301757, 400427189, 216771109, 207016492, 505237766, 795055758, 945605740, 555992642, 907845643, 982951177, 401043526, 597396374, 84431994, 362552441, 746539639, 303946121, 357484364, 893505269, 526515449, 560103044, 121894895, 445706213, 592793631, 713670463, 810676671, 143889731, 392244416, 73126772, 488568958, 542583029, 752584772, 7383345, 155007498, 994039957, 804821801, 379264833, 525210782, 239847467, 126254398, 219331239, 753237922, 434345445, 635807399, 872366121, 133933893, 590603804, 32230684, 70841222, 840236255, 909722819, 689521789, 529248821, 178846494, 980363222, 548654005, 434479841, 697553680, 35011089, 544881135, 260563063, 695816358, 44173506, 726085055, 671716390, 781464159, 450226987, 146813053, 877951734, 991641337, 221699230, 419417817, 794832550, 810418558, 969705412, 219055178, 274301546, 503413612, 695160244, 74090275, 26176299, 695070748, 341801549, 897892431, 470380437, 3467372, 448525308, 439337134, 724845391, 9187155, 585558376, 372261444, 277930003, 34819054, 431482585, 279947765, 492267585, 818516372, 484582901, 390623889, 856573701, 179325546, 611189228, 688765384, 847931848, 534263758, 557397045, 116495491, 85868985, 610969731, 478650084, 585159686, 14772190, 776211983, 474268574, 460744792, 134988124, 912707317, 105964987, 809266690, 785401545, 161419686, 653370610, 499797235, 534961655, 323936668, 802659551, 370287438, 326963010, 342959476, 313044094, 148582386, 976795271, 120954501, 724957759, 860215558, 270001726, 640931921, 833230238, 701256342, 242231076, 286286219, 13632467, 253663042, 129411109, 603714672, 564008356, 523901279, 216864213, 524434304, 182659511, 983267072, 644616701, 707181007, 618980658, 405751838, 571460922, 136629759, 744395053, 539608518, 963053644, 97893406, 866038338, 265757870, 944699732, 964525924, 892464175, 168006507, 562926324, 742708490, 132927348, 526909479, 79557205, 129052432, 157042523, 659309142, 834183171, 802572815, 517259737, 256356803, 353227137, 87135975, 224995979, 596580540, 402931204, 515099940, 793833445, 691900231, 589149123, 114327507, 887760880, 389703467, 830251700, 783657579, 433484966, 412892473, 432995349, 911076886, 112628181, 1, 32, 558, 6940, 68502, 567920, 4095058, 26291268, 152836946, 814626856, 19929138, 508014078, 3627542, 383619686, 178749032, 257695016, 714018516, 472708243, 782289684, 785010736, 673452130, 967313791, 416615851, 594708501, 823838568, 374885539, 520875465, 462873691, 866641568, 110422771, 371334024, 597629306, 954905318, 192386746, 711820060, 202869372, 886359460, 670157944, 884126969, 502946720, 582271977, 402610790, 343533084, 511648372, 517557636, 170605372, 597697292, 829559995, 983984749, 601678152, 265076525, 200313780, 586898347, 936910249, 473920775, 97417050, 844866738, 973357211, 106398807, 531568235, 220592830, 72245680, 709223174, 966562898, 364453034, 204299565, 516186616, 388239153, 70201813, 72763421, 794896998, 14537122, 759848271, 370782607, 723372604, 610938893, 161728308, 212501210, 376508968, 271352258, 323852567, 552136716, 801650724, 615740271, 208656790, 224034222, 747809272, 617340476, 153891047, 285642015, 901118362, 123777425, 16228193, 623027527, 937436377, 60747289, 714381298, 882770713, 15381170, 999192137, 197256049, 480638655, 953137460, 883599778, 148656904, 722191509, 39402136, 582147050, 757441169, 260428827, 253172482, 508174417, 834955862, 157349819, 261175551, 247577251, 264652493, 595186522, 812752039, 875384578, 747313263, 224431706, 462673707, 39074204, 237357876, 896371707, 361524710, 10299862, 761952483, 924315000, 304463541, 831385606, 228637562, 845205390, 599099308, 177524018, 209006125, 256908838, 355221513, 792061054, 713446694, 397486564, 756107839, 527866716, 337624854, 575430320, 456754471, 959728018, 921786900, 102983773, 936936381, 473475121, 131588049, 189268154, 863126769, 700571091, 871530822, 832046604, 609629520, 45186676, 853387560, 464311797, 368430192, 151536782, 691919878, 176735598, 972465597, 804610607, 50289062, 722819065, 20410813, 11987321, 648373171, 889715409, 778512390, 280809979, 767453391, 155472064, 275305459, 296611231, 377220752, 229158487, 259857310, 987705391, 873889855, 448418244, 657467052, 301028637, 400332864, 304525446, 853531448, 201469133, 757430782, 288842043, 292821474, 389580374, 148645279, 450672899, 404696472, 399758661, 549392647, 972607841, 459482261, 344863732, 405989209, 14412475, 913865943, 988039851, 302203080, 293916756, 28383491, 502818531, 791480646, 619991127, 151573496, 311251301, 362738947, 457688580, 884177111, 390413172, 889218635, 530910268, 818241216, 542232757, 765042883, 885001834, 10229128, 574524301, 836418812, 984923781, 235783687, 868003012, 379478756, 832878398, 751487743, 496700139, 587857943, 624473538, 510088706, 778144708, 214176553, 953029206, 646822434, 252787767, 281229254, 401166205, 434753895, 343430684, 941989547, 465870277, 861407908, 387687010, 216509894, 375279811, 453878600, 982073623, 677731113, 95924240, 198468867, 861679672, 204003039, 472066136, 228890861, 880462406, 133638984, 924365283, 274136081, 742318625, 898640542, 85174164, 775817726, 982947180, 716729952, 1, 33, 592, 7564, 76624, 651480, 4814916, 31671996, 188578368, 29248753, 200002145, 508415428, 442411092, 823607844, 339155380, 84465338, 814093820, 347929398, 722645092, 146033429, 312847170, 460125097, 915837300, 530134554, 683613860, 22911398, 950166343, 297700883, 874171812, 779302544, 705201416, 91735442, 764568060, 448540109, 794383951, 50664826, 501387621, 764478731, 392332791, 697065547, 136584719, 904822171, 811342153, 498086442, 66346910, 903864157, 648069920, 294527566, 68277872, 192952288, 465503414, 89641650, 342876181, 975687654, 849073744, 732768838, 299144725, 960087859, 432060633, 521050995, 669642411, 783220798, 964761936, 888496451, 578822675, 774117896, 595815330, 556187991, 328078421, 497539038, 461150544, 593197759, 454579240, 228665398, 675695769, 189021504, 506127036, 683711210, 767254008, 372876392, 950363733, 781425867, 518441353, 618578159, 210702480, 146366158, 211092828, 25645664, 252569415, 768287264, 315751220, 46304131, 875313001, 63062094, 41563387, 521548621, 882111752, 325592507, 674715724, 754661696, 386558110, 154963091, 238088464, 48050421, 639662963, 70331570, 315682289, 290604457, 553625701, 114470501, 286499320, 302628334, 934963054, 90280656, 946037777, 701374947, 21339121, 663053978, 944685826, 452543047, 117230904, 560747251, 199227363, 16627409, 318622953, 147892287, 924956445, 813803967, 785002825, 524657750, 94619872, 228326183, 399365341, 370689535, 675442405, 908504726, 873312142, 624281896, 910865167, 214431914, 356568789, 649815619, 48684312, 203060656, 723151845, 388405201, 798060040, 729614446, 977682164, 533436928, 146813819, 149571082, 895803037, 777214043, 552248021, 204656845, 982800841, 733286978, 63964308, 481147156, 389291330, 76639625, 311176854, 441157810, 671041225, 83215916, 462900391, 792922861, 933493638, 911064426, 640299582, 658369868, 816565473, 95242536, 385493380, 848295064, 737403618, 437312030, 117969370, 718173112, 995019578, 309321859, 756181744, 40101942, 426476878, 702396178, 795715493, 835764511, 743326504, 209546865, 430615231, 826070511, 334341237, 118979238, 371120144, 839568659, 676120384, 72519, 845333099, 357629799, 910834209, 593346831, 104377605, 380654497, 634970517, 115890735, 793059350, 887063630, 651636452, 507749972, 783577804, 143656503, 242083869, 911105370, 970085702, 524972130, 465698950, 325374351, 536364599, 196104291, 139239152, 633851401, 256158579, 919175466, 894613648, 315818683, 5141779, 876022828, 934709255, 681050535, 191918360, 662583345, 207316521, 848780031, 272975543, 702356884, 769886013, 961041057, 6500208, 70262300, 494310602, 739703998, 384177576, 343193798, 693062586, 969762392, 66952659, 685150241, 630304511, 413041585, 515441116, 191001103, 912006289, 473846745, 605301455, 795067847, 856671001, 508821454, 735406667, 258084054, 117733205, 780290039, 23367661, 593944851, 692132515, 4650353, 187487602, 151055135, 898863554, 673507355, 215091232, 603704193, 594167428, 682519378, 496434131, 965159536, 430378180, 248402836, 470772870, 307340881, 347656961, 749714755, 122062081, 558277910, 169666679, 941915597, 277380477, 270070849, 652088255, 549544085, 1, 34, 627, 8224, 85440, 744480, 5635892, 37957128, 231322416, 291965329, 678229698, 199102832, 733159273, 432255582, 825398987, 945721657, 530531857, 605903605, 198451639, 405128341, 881104650, 95712824, 87475937, 88052462, 854657880, 671362129, 345256719, 279913923, 405600244, 791623773, 184158289, 548244621, 559931899, 811302745, 822463013, 829884052, 612803610, 114370483, 717655175, 250670751, 158660853, 996989593, 922821653, 403693850, 640224917, 726696528, 558324649, 504260316, 457498775, 235424755, 214797729, 595578763, 703649058, 668639597, 273743575, 830864733, 8621856, 152359528, 351252345, 54682531, 631863641, 533130514, 548187372, 212107229, 690348600, 269650465, 644636821, 588449397, 716956418, 569059993, 571818753, 620732748, 238441683, 628780105, 73251606, 77232245, 265685085, 860541096, 181038883, 995121568, 787161997, 984175916, 994855981, 70309595, 279951259, 412871815, 881913054, 268261177, 575207129, 196951994, 610045829, 705950877, 200402175, 179100085, 912730914, 795237101, 264189519, 756871237, 840795855, 477498958, 568161700, 101820158, 478938140, 546807900, 824972458, 320572966, 375535061, 712736750, 146215080, 296045377, 892271196, 198915619, 973312163, 292266224, 766955048, 774760742, 724672108, 189810671, 590576941, 955913056, 705860403, 956268133, 120026477, 977289531, 897970234, 594373646, 802624855, 16139526, 294245189, 661099173, 505327457, 687552139, 570417673, 288750674, 928298666, 124243321, 103493234, 782666425, 810561902, 479140046, 567654010, 66398299, 87173858, 171094018, 401077961, 201022453, 649177770, 751032860, 458665510, 583069945, 3741921, 644139368, 777863779, 427938859, 574083500, 968708036, 5259009, 14753514, 566158894, 428971413, 29779639, 601893398, 934948155, 463945886, 442386091, 787098075, 294593703, 467511028, 998601384, 749411810, 495421040, 283658473, 287441865, 687819162, 964614928, 353638623, 648210867, 238886215, 893364457, 158958124, 29345292, 800368429, 595552294, 572640574, 913495958, 705720935, 850127566, 83220185, 799386246, 848828465, 335228800, 498492912, 819731260, 972790229, 191002130, 289923062, 997108332, 479589354, 13686350, 377632380, 915241611, 38445376, 115515812, 312111610, 862313776, 36444206, 491509332, 899038496, 494299749, 577210085, 925017398, 377889538, 129014425, 544007299, 134491550, 77644047, 150186363, 549177782, 243194000, 889811949, 476414356, 302027816, 934223010, 116351600, 936035078, 728736728, 99057293, 233685532, 715949090, 484999785, 527817757, 40017975, 403976200, 963752121, 230480821, 165554215, 501580240, 480519751, 374582722, 588438105, 13652788, 835399525, 909982574, 63720437, 165170490, 768431894, 385829327, 268804006, 950180874, 398363435, 512876602, 149304949, 858796870, 305796565, 80654592, 209088881, 365995652, 741417209, 580938286, 849913699, 209592153, 430983500, 292682916, 89781822, 346251985, 899920810, 490814818, 319818650, 865676138, 199552930, 49606030, 396988194, 289382805, 394082926, 680976370, 125444750, 312554820, 11884810, 730982055, 36906819, 144996838, 532313029, 339360681, 509568859, 763509787, 79118993, 930179491, 756170211, 627420026, 161269793, 542072728, 498021200, 392693531, 523036960, 919765468, 367278574, 755839168, 466305341, 613534367, 534169086, 166110829, 107021592, 280650539, 268761091, 590645300, 269909358, 234042842, 1, 35, 663, 8921, 94988, 847688, 6568888, 45268120, 282195928, 611807809, 518705216, 990050297, 271051698, 122408000, 405189613, 94926808, 864141322, 53735275, 24011733, 736554738, 929218491, 904644261, 780020466, 504939462, 734736582, 905177688, 612557341, 964587741, 714487014, 841745335, 939266470, 221175663, 553510265, 427922711, 816845808, 551876447, 104782423, 432788437, 75343637, 98990584, 780296494, 401590023, 184896774, 39759619, 46187357, 134251301, 342702573, 517720, 358976055, 583636644, 962541900, 167548822, 161325057, 550357824, 277594189, 165080443, 231182951, 735855208, 908711807, 571176463, 42569340, 237272417, 790920442, 624258522, 720842250, 768667158, 451444080, 122083868, 366641147, 308868590, 806102171, 616667978, 212552319, 508058403, 321794596, 570313528, 460066496, 737582233, 710064955, 691296552, 63281621, 675218599, 955697061, 110510427, 512018248, 153536802, 745040214, 175960352, 594730127, 864516601, 686994354, 671193730, 758082482, 651219990, 268055455, 209604272, 794711886, 922988292, 233697499, 855180879, 757331520, 952855529, 712373324, 501054908, 610479660, 988305583, 359797155, 981016202, 392046260, 222705767, 339379031, 255395660, 760704862, 824907580, 377018926, 100950434, 568292199, 345612839, 702169410, 76425882, 316244660, 633878521, 345805531, 43908232, 498746978, 171201976, 618174067, 828038701, 451921110, 452033897, 911744318, 64098066, 83924105, 595571257, 147937863, 948006101, 514496555, 77289879, 282007238, 421799065, 804334778, 765393189, 193008022, 263503242, 355816072, 278012511, 227861525, 902054870, 618486736, 979710805, 971590402, 61042704, 664850817, 113175896, 488535341, 617582794, 612947413, 45804546, 259073867, 263038734, 265569066, 162645795, 60875191, 359494871, 979749311, 139358127, 29529290, 309151363, 279422923, 345089768, 87598058, 700337527, 479652910, 994907927, 933976635, 324751070, 167729179, 810904540, 230096199, 33195878, 559883815, 674302503, 158162721, 997344757, 974400760, 476723636, 933671908, 372458552, 487353300, 603836216, 903251923, 461631785, 620155186, 664707969, 139328434, 135802315, 547850780, 544085832, 243757336, 714792500, 277247444, 736724545, 7257213, 104433298, 33077964, 133546300, 658470668, 407613385, 15549086, 409602732, 220607605, 154437658, 434924060, 212726357, 432662346, 953726155, 55947205, 221865215, 896738564, 702917595, 219549259, 784888336, 998968443, 737927890, 111474776, 479544893, 204531672, 722344756, 339644359, 296335713, 172390948, 145219000, 740849986, 175518952, 876047366, 775536223, 909308844, 333180421, 96764559, 528034987, 396799645, 413114766, 622993858, 563074288, 710510893, 900874806, 315196225, 993816000, 623166550, 642968249, 328645521, 844280596, 556521945, 272458659, 580772239, 284457451, 186994948, 909094031, 935768265, 319893231, 114481887, 109302906, 586737223, 466388545, 717893242, 342269015, 164207650, 394855609, 330099455, 836592042, 939058426, 541984626, 852636994, 524042858, 358495217, 921118657, 464191254, 284341637, 363378706, 679058686, 917272314, 562488937, 105215359, 614330571, 404183151, 365378837, 280141835, 594380252, 79371576, 739360814, 210010442, 10232401, 449147207, 97531383, 696215921, 900156881, 51327507, 224992261, 946786023, 685932368, 729503576, 741723150, 479111191, 872812474, 454570174, 217639787, 553029674, 745481673, 194164134, 241094015, 672191097, 520725696, 177728245, 485102929, 511421076, 349030122, 157631252, 431267952, 813510823, 604978728, 799539100, 871169236, 265066919, 191499414, 52282294, 1, 36, 700, 9656, 105307, 961912, 7625652, 53738944, 342470612, 999200441, 797070294, 375863958, 9523173, 166271514, 481765400, 879554808, 535680694, 467340394, 413500052, 692064693, 580959888, 369347871, 169821810, 621921924, 137911737, 940784828, 741570244, 905517670, 551817302, 657369119, 721648393, 536831850, 500879720, 726253305, 296162041, 891225164, 880747817, 182180719, 544050763, 654393489, 357200480, 356889637, 635049309, 374948412, 486169649, 407475615, 51228607, 535369936, 325305756, 74215114, 944988254, 919680639, 647644667, 526651696, 763479161, 278201627, 103508412, 387580497, 561661113, 38190290, 310583115, 569811056, 351262691, 985051203, 403138813, 643132429, 289980808, 570569544, 550559442, 934893929, 352045239, 810200946, 61218795, 42358563, 89293505, 506603831, 400595820, 117891860, 469015294, 166372283, 320554017, 155147268, 955469333, 896730515, 826039051, 931193995, 36098122, 893366407, 522834450, 917130400, 759016216, 23584371, 48884561, 844352920, 604253909, 886656394, 548946691, 688504947, 972899398, 721435398, 409845929, 399680456, 284950632, 796741351, 217452678, 611033399, 592790059, 219084711, 504058472, 277505825, 120276345, 694287126, 35416589, 305976723, 447309020, 969824889, 565684997, 62139306, 857693940, 901163636, 262850397, 927594387, 721909425, 958991660, 471789360, 260033992, 544270783, 877013007, 153311613, 85679796, 660447085, 213261352, 954007371, 8266647, 75417194, 28241545, 733410215, 579803150, 41901427, 876245480, 900022334, 813145019, 668096269, 73987267, 175135030, 724217744, 139403302, 77167168, 775504145, 397863476, 816272710, 221129133, 242347768, 885383757, 728565085, 947647994, 605379205, 598139075, 269419404, 178994132, 603450690, 652850980, 19254430, 182635911, 57268581, 239936865, 878358438, 515315850, 141611162, 665647032, 700517198, 807335907, 965806030, 897617342, 773532343, 924389029, 419741954, 420757062, 581633294, 179995348, 34733596, 923518220, 731757774, 573741822, 531242380, 813544540, 336821038, 442738016, 551572674, 470067223, 638102335, 989538200, 956007535, 613954394, 401563904, 103519975, 569290006, 144046622, 689996849, 638589501, 358099514, 725282594, 691632053, 702244532, 284031792, 473014945, 465414316, 116886234, 142777936, 342518645, 138051544, 347505254, 57716395, 939744642, 114873890, 359397343, 671360195, 724489266, 683013222, 345781236, 550104449, 877003874, 63443231, 224660360, 658626409, 133687251, 933261032, 273131705, 48202694, 144323990, 559827621, 779609382, 930553156, 35267489, 493151974, 645090534, 517431516, 368634145, 540405134, 215255527, 144656993, 549192120, 659960465, 217236722, 742258783, 538378955, 211409043, 760044403, 389330065, 692548510, 583181570, 627949137, 829194932, 234693932, 651493437, 707321269, 828284674, 652751037, 873736576, 267300299, 729754896, 429920674, 875733754, 60888792, 225478637, 39002446, 407176220, 761384762, 131879783, 661443680, 51638267, 568172852, 186052558, 637968267, 556455031, 313451921, 238551452, 644714578, 449541818, 640800540, 923965193, 38909678, 41940756, 338485997, 888949941, 526610135, 48150535, 778944981, 480892059, 874500608, 900322190, 973783674, 468787609, 618167632, 913754856, 327797543, 845404908, 752246622, 831422464, 484541178, 501948673, 647306990, 882577308, 771072569, 171273117, 620085552, 385025714, 126556571, 472404266, 664907284, 284895728, 860747643, 285481155, 480968189, 426457284, 579997870, 253315436, 264967992, 325506073, 407074927, 289125366, 710111895, 168902913, 39893459, 264014099, 335462311, 284068808, 624620216, 265346008, 330183605, 301153063, 136165951, 223572391, 416076696, 791322793, 440956632, 812128221, 56870528, 529001955, 157225171, 153110824, 659760559, 934444871, 1, 37, 738, 10430, 116437, 1088001, 8818820, 63517016, 413577336, 466132154, 602224077, 950429493, 571044537, 948550192, 759622519, 360792951, 40404471, 549575252, 331339348, 353289303, 642561133, 959520386, 811439523, 113998222, 306747368, 686402540, 608623079, 625536502, 102898449, 513583096, 310389938, 861964034, 144673299, 459932354, 368865341, 656127608, 909171212, 807159815, 446679967, 582385365, 827063804, 980667706, 264330272, 600794253, 740948802, 906942889, 945728377, 18846332, 985664112, 7701519, 115050801, 870345183, 606442987, 443069595, 817056595, 621418778, 690512206, 255049968, 161633922, 402904753, 372549674, 317848199, 779510849, 454579621, 366999138, 955388684, 940196190, 710141532, 289889641, 400266971, 473006189, 518001144, 203532149, 277752196, 73653399, 957077834, 580796815, 797359407, 33679102, 974181950, 229170666, 221016673, 753153481, 718492334, 480056326, 134801483, 829292600, 87160542, 624566954, 157188714, 912350324, 248797376, 864861712, 311625650, 564724833, 638897879, 211767349, 670618766, 182357348, 406247054, 335828971, 235855014, 766599169, 873180801, 943988159, 797515463, 949064434, 37355164, 366387587, 992037332, 39085136, 457008562, 710738441, 147115812, 245127944, 221285308, 44913339, 750687382, 166494925, 487773254, 2533400, 294773545, 964749926, 838352064, 354747747, 983055334, 906311260, 773970452, 136280712, 732037766, 304757958, 868694356, 9717274, 686595153, 845171773, 715645486, 457517675, 868876321, 257821804, 398717354, 952878758, 459394839, 735151005, 982831573, 597714383, 483469574, 396276440, 147004054, 275175512, 449695021, 280047682, 322443740, 657859781, 236891682, 338855034, 771308208, 208042945, 611383416, 470020781, 959351211, 871193372, 314812327, 417008584, 157794928, 30304137, 772193806, 92880268, 735754383, 725090032, 678769251, 695572650, 713627047, 220917673, 996272940, 711499227, 615337951, 732510553, 265860373, 10346269, 946167168, 327969286, 691646116, 588894836, 556718107, 891256057, 29035235, 193826291, 413628097, 951441661, 812044940, 432676044, 866499015, 139084375, 351784477, 900166473, 781089061, 914118385, 818686834, 857340116, 329139077, 237478891, 284468211, 215304591, 458481845, 227432873, 865995208, 554027168, 463893384, 221077016, 374577314, 119759917, 360383422, 704486222, 404678036, 137104816, 809074680, 755219457, 826569646, 867839827, 768754773, 89100960, 257194726, 724398193, 973188469, 858913715, 18463743, 680309520, 450458743, 140048366, 764912130, 371007014, 456635116, 735728421, 778688084, 152973997, 434969799, 574794869, 212648988, 728361716, 542931287, 302379989, 751579729, 92390154, 220181191, 407743441, 315151252, 520426045, 407908622, 679231575, 395003916, 794034847, 347654216, 68808817, 829211530, 81601558, 162714123, 30761100, 394951130, 268715057, 283612447, 241955302, 623210420, 275963878, 159211117, 252162685, 595441437, 529655660, 437222092, 841111836, 179960886, 135660761, 917237477, 768051317, 444580903, 506791801, 487181239, 875489229, 680194597, 205928376, 680445786, 683783933, 969592088, 132367844, 396994570, 832926454, 630581401, 505495558, 385734337, 641541057, 95095471, 989574773, 911275608, 518514268, 282262989, 419271827, 469001628, 420271862, 947083037, 407529572, 59976989, 434008630, 863717239, 945875935, 75676474, 215313835, 250745830, 87811894, 264747800, 37018493, 98597371, 710706515, 142785594, 391940962, 336466122, 341268838, 21508490, 413865364, 232101532, 92701632, 8053527, 412757119, 757312194, 403681966, 949009531, 880975038, 37050684, 272465075, 678404684, 193438246, 672480427, 700064004, 142628578, 802581416, 279140871, 973655892, 800905741, 598005728, 935768930, 668573394, 207197197, 649003003, 270174246, 76144766, 315632510, 875459369, 359185050, 528086919, 473525359, 758981160, 249109513, 189948776, 344668617, 795917722, 549344159, 348920520, 486734532, 302843834, 285724416, 810790165, 350603652, 574459989, 873908008, 1, 38, 777, 11244, 128419, 1226846, 10161959, 74764168, 497121432, 26344483, 38234873, 423642505, 376339808, 863392989, 917340710, 353019266, 355701734, 828153534, 204362640, 374924405, 607928554, 963790885, 940721850, 687219775, 764705852, 876861874, 763291630, 981930457, 551085656, 980270580, 505906881, 983294521, 135354674, 135665519, 630173290, 212355830, 143623144, 227056594, 817242891, 163435465, 418550307, 731605596, 289566443, 285968813, 433396374, 290335437, 260134359, 257166798, 296375223, 99595679, 459082068, 507135523, 972388714, 133158519, 975205558, 982374421, 644050428, 996778111, 162109063, 746906113, 514292299, 926426755, 356009260, 196659267, 409916170, 325494529, 655002543, 558511285, 36446396, 471095084, 174722764, 671116976, 160891233, 868903396, 304037581, 23612943, 337881011, 234387037, 370561646, 356075504, 698718914, 535181667, 514726084, 815242029, 608023573, 448544035, 835833664, 991058290, 399256230, 20531824, 669361826, 539724566, 760387110, 830813942, 547045707, 178050500, 929198630, 6813905, 110412371, 858816899, 809729618, 833864785, 232951975, 485491061, 613385270, 553071180, 627954610, 952757220, 692906182, 748961577, 662247263, 52513186, 149763764, 145530822, 33882391, 453364543, 997405166, 992558694, 759602854, 84367345, 100239977, 854081961, 858205595, 486024240, 91555639, 177882871, 949083392, 519037398, 556513157, 228484413, 492836072, 589348909, 196163508, 266626335, 11245627, 157404436, 270481031, 638406640, 490889097, 527976504, 370488458, 823400678, 322868722, 206357234, 647142926, 768625346, 265191551, 148038615, 363341916, 267722164, 893118504, 738977503, 565582757, 762106365, 849369394, 766495732, 13155357, 515888816, 523640060, 647203814, 437352666, 546684558, 961386555, 7614498, 893885274, 936701598, 428062192, 113231261, 402917050, 409965843, 165984892, 799921270, 659405770, 509144023, 774701607, 842603658, 487390464, 251731862, 581859608, 922860080, 258383681, 201597752, 292594441, 460903867, 638298912, 848020590, 765105850, 965506327, 844776867, 575276415, 85481014, 653985938, 197424999, 197600210, 989591463, 112466859, 918937916, 878289962, 30252094, 561367106, 701604983, 794157139, 205106586, 358551581, 218730442, 820317821, 718077344, 742273426, 343977802, 723940137, 91227055, 889419899, 835334285, 445942872, 874169472, 806494972, 841559090, 34902341, 936247116, 742348345, 932764662, 776531786, 136341990, 609226011, 962126351, 692609037, 492230872, 512261831, 61424189, 202712100, 557188069, 23267751, 10862209, 780311892, 698216821, 610626474, 445698906, 548927052, 791636623, 278469086, 802570473, 843652647, 214889050, 950325814, 545811188, 732525066, 799299048, 547938769, 119233118, 836166054, 515368215, 821018309, 703809789, 385697728, 474302192, 326687407, 701322950, 753939342, 860741461, 608860184, 481069405, 497217661, 107822505, 538149776, 65872865, 267685484, 630211463, 833714775, 127007356, 988488267, 704390393, 326686679, 330510067, 968474337, 860095258, 865223840, 3530159, 602833824, 943838253, 510792598, 862215682, 804647558, 57277705, 379631476, 611335785, 827032941, 500396827, 166974973, 950996383, 97277257, 336237474, 527425945, 836169765, 13569792, 45600126, 103702022, 589110361, 158793934, 917834123, 750227633, 450511448, 228174293, 380815071, 984828008, 35225572, 19924799, 316530723, 169463852, 11894443, 83625994, 27918722, 725825514, 510537357, 901592447, 560692763, 386943274, 409576331, 409681305, 19743037, 901841314, 504205848, 287987501, 95070522, 999713439, 52172335, 458657276, 716446234, 960325619, 967217606, 29400294, 323715881, 571473809, 542099425, 838958945, 826022366, 215456133, 111542899, 27057122, 264098733, 414451664, 367598279, 660361161, 317432327, 788309656, 482969647, 453723335, 307123116, 46250346, 156036134, 550671015, 501877998, 918162544, 672414507, 744250791, 519150731, 449335541, 717241257, 798831268, 772517138, 286300330, 910111510, 66350225, 850058429, 996528049, 454249733, 463645138, 33673728, 195487971, 700828817, 25012182, 447505308, 968790402, 312778627, 684898658, 698549052, 965513947, 825161447, 410399245, 428579579, 669192144, 82412074, 1, 39, 817, 12099, 141295, 1379381, 11669611, 87657665, 594899060, 695536795, 226472285, 640458905, 794561570, 378189352, 472728269, 218438573, 56516519, 255055733, 845027144, 588332091, 652544873, 575593478, 251899261, 421780632, 446749115, 397384403, 967249876, 562965804, 307548860, 910064219, 267557957, 532097834, 694036707, 378870548, 124206593, 109699395, 5415029, 722948552, 875697847, 694452268, 7553293, 132421363, 106964105, 391245927, 870340375, 243365738, 69805673, 199865008, 75486973, 171179760, 109991897, 220793643, 513746719, 106419838, 540171765, 580499245, 759007158, 982900537, 645687882, 590392656, 601803737, 221575615, 697448067, 153409333, 368742411, 593478736, 779784392, 983542304, 533669091, 167997680, 729893362, 841704349, 760614624, 47743042, 998724205, 972938209, 77600320, 536850090, 695359058, 769331095, 966134679, 528777379, 695035445, 387545073, 911151592, 242062595, 521446824, 889535341, 920252167, 112865832, 806555197, 118151259, 625842139, 701618487, 790273468, 694977537, 572862214, 473466414, 246109368, 48621359, 353657541, 554932622, 499105369, 867797665, 487345603, 842033962, 519557065, 245850790, 335288378, 782811146, 892240358, 338051309, 826545456, 41171254, 334148733, 152569170, 144665017, 941279118, 897754414, 89241104, 416864510, 41530804, 299074740, 73588196, 959211062, 109470038, 500259918, 366443802, 403320596, 183957534, 992196343, 652194487, 652679636, 980112362, 896443763, 694053263, 85474084, 793481845, 36502549, 113761902, 13660255, 295744749, 768030597, 559676644, 267907464, 329732897, 34721556, 481917917, 470669881, 496023609, 35319413, 426881953, 436183525, 539581676, 797395436, 949513087, 636400441, 684066319, 283217124, 456809507, 742722246, 708837224, 1825110, 845476655, 721485134, 509524702, 571748192, 313097600, 164720049, 83489702, 463694600, 122519767, 438333196, 350973050, 742760174, 292313656, 699166885, 733491013, 480543050, 245749577, 741817620, 207993307, 244579067, 622422144, 604751887, 899189402, 151409381, 217727618, 880477312, 214663719, 394263729, 196688383, 548030201, 726215545, 464673145, 261250632, 625458514, 838784252, 982491280, 700533618, 585918514, 160625577, 639912412, 329107337, 639996475, 820595096, 822718095, 278815123, 496262265, 918547360, 8027724, 726754416, 823448457, 260321413, 863184482, 650858805, 276099402, 685460415, 954079520, 733965175, 676833996, 368637623, 143549481, 304621819, 472579474, 749596748, 116386311, 410243381, 633945382, 411647917, 177570608, 616578162, 767744928, 61290651, 523112125, 276619822, 15151789, 253528389, 167816966, 891846580, 541892511, 341041750, 391023167, 293092921, 243156326, 622723871, 473135257, 726189187, 379573236, 555335821, 257038714, 482079083, 723871307, 606515981, 65251208, 632383753, 147352575, 594192641, 924833549, 483314326, 808069004, 770319259, 427864560, 25642674, 464671587, 569308215, 637300329, 923466624, 23057035, 86870702, 983746124, 846059215, 574808201, 554549209, 446310553, 959681948, 778636627, 211592095, 516682914, 291911580, 587928798, 427680003, 894209596, 866648165, 679666232, 460484096, 854394115, 982195268, 822495481, 835383529, 431162040, 830468499, 195346596, 57036658, 866149457, 860543178, 818146210, 279107618, 892401239, 225036974, 868558986, 685134666, 744469605, 156127522, 187537334, 788919638, 909025900, 672187019, 217419201, 384265406, 616374282, 378322214, 141913342, 501653295, 461070473, 25985020, 589549638, 109433868, 888240019, 931367280, 762349235, 234613827, 765084315, 611038359, 758764450, 286873014, 382512476, 382119459, 20294058, 943700532, 211933192, 58390954, 180966724, 929698288, 805610393, 509211182, 866583662, 775212548, 88368846, 726939816, 185342247, 229877142, 705155204, 200856219, 36832958, 610458570, 660966337, 749737121, 592806565, 894272325, 480779946, 649154472, 88597955, 74084666, 744113332, 528684751, 282107891, 100372245, 756922141, 58776739, 981772435, 924634098, 951039927, 397719622, 577729727, 762973087, 736969640, 674672356, 297937804, 986319572, 149411109, 496025335, 118765897, 173573997, 13186371, 696131467, 139811703, 497652080, 238358226, 252091863, 126575962, 416549513, 112043953, 769546766, 210139961, 218718185, 975953506, 930028805, 845629302, 57030776, 852433935, 836915594, 400219298, 622051773, 829969111, 114603161, 10751254, 909008878, 579282117, 214070865, 563200757, 1, 40, 858, 12996, 155108, 1546584, 13357338, 102391268, 708914679, 491589996, 307979410, 602522471, 317222127, 290284759, 54099411, 989042041, 349750818, 106531062, 706143382, 63807262, 819412921, 144007031, 937903432, 671633208, 144280187, 535961584, 391683158, 665684992, 173615217, 173957993, 353557533, 689224661, 70346145, 249590014, 418977958, 826283746, 394602103, 916349862, 513826761, 491750575, 183159109, 757685121, 418341803, 274891227, 642914114, 790796259, 588464975, 740365449, 551222753, 10565934, 35820801, 515689568, 211177017, 828019707, 68961130, 155306993, 295844962, 698696703, 264483577, 967049520, 615265667, 559761896, 719262960, 509462378, 575657367, 591920899, 676732702, 723371825, 327050158, 311506131, 94078284, 608080285, 992236405, 137506625, 399044419, 458634324, 553334522, 801149022, 685520978, 446537546, 993927587, 293142441, 349812890, 364132070, 129851348, 857298051, 877404263, 877505804, 63808796, 43779853, 597054006, 757518688, 847719064, 814336009, 295491019, 566317327, 427355879, 99632937, 271930495, 211594531, 907085661, 370381473, 40651392, 893659649, 363630034, 486697292, 957988008, 762036357, 927839193, 855832860, 336383816, 307639758, 266751066, 682795763, 757933830, 702637096, 416587519, 241670221, 803239702, 991067388, 753770489, 69318095, 379601638, 829408102, 918333643, 833524181, 647446668, 999853061, 600717076, 736359930, 166694847, 912637361, 883248816, 334184966, 360770954, 907814459, 571070899, 760625736, 543003305, 12232839, 27415041, 235755079, 155935992, 895456358, 299525687, 387663753, 430722193, 845849975, 389897647, 157165043, 232374231, 709459451, 819494807, 873294798, 982307907, 723241456, 529916420, 190269000, 832006535, 157577121, 119818595, 751958343, 818604698, 923214476, 455357809, 664208514, 204222119, 358021985, 507909159, 532713722, 447934290, 550255949, 9030523, 204809569, 704696131, 798537153, 779574805, 146334295, 422444856, 763243391, 968318292, 409596303, 730176788, 661449533, 145680243, 291092743, 406566554, 840725280, 859336604, 385485264, 540592314, 491573347, 430591599, 799102625, 349645352, 953856191, 685505744, 968883032, 548153198, 991972402, 298640488, 335784052, 560792641, 200482497, 534424478, 835919822, 256133832, 789502694, 815463653, 367192054, 711296060, 505894941, 749371649, 586599852, 478956964, 771301542, 936596369, 641013477, 895880622, 275251735, 709512313, 675062513, 900057226, 864601515, 604121575, 213439255, 718556713, 352300658, 293209273, 62461535, 212741657, 925233457, 601757735, 357273411, 900952265, 337965737, 654516053, 138964736, 683012438, 388413281, 151113816, 328964247, 191920444, 84786019, 179152386, 346561188, 643354711, 718267295, 169193229, 252223726, 887596939, 657097686, 142103925, 40078284, 150004901, 459569297, 459199105, 789641065, 6481222, 858687076, 375816137, 147145108, 520309635, 748217920, 667457550, 716254093, 186260954, 725808394, 626037945, 743543562, 764478177, 601933842, 797462265, 777370200, 654651513, 156072819, 707272486, 178868661, 27986290, 925976600, 457000898, 540704905, 843382395, 769084631, 760118502, 476552208, 749317409, 710185045, 964800796, 516878606, 266237510, 913933501, 813693982, 336046538, 762072594, 997287607, 756174558, 615699332, 325935068, 478725181, 294206110, 71125626, 862744505, 369229533, 687983312, 908265361, 496504119, 960935105, 69879109, 315010091, 778995602, 757128123, 249975621, 699329744, 984761141, 255696873, 966070938, 214893935, 551564463, 316442626, 532269369, 314110968, 128028415, 969165598, 561496103, 817486578, 282697706, 480617072, 509205119, 834540584, 277705122, 660874354, 778117470, 366056531, 831243822, 903068403, 672944646, 441340373, 340680954, 617276976, 849516577, 560088434, 230800586, 10428026, 372559113, 922230949, 889642650, 244184042, 533938488, 841639506, 817920213, 336934324, 44823033, 565545678, 701086145, 241957483, 114182239, 850726147, 526783422, 115816117, 835376982, 659266467, 815849396, 168028335, 255187925, 748491938, 622185783, 663040863, 743392515, 163408177, 383060357, 31556416, 794030948, 934245344, 258437764, 379321408, 40236316, 660469577, 655665845, 690942361, 375378322, 568352979, 602028119, 317437606, 657543398, 100015852, 252684947, 481051042, 964341166, 522946308, 280791483, 467949044, 475945690, 972019230, 462068105, 580258224, 819125286, 65219413, 675919204, 938373431, 246074242, 416112669, 990084376, 992206586, 174382581, 694468435, 670357482, 52707698, 430228891, 194064984, 374269653, 873105421, 89789806, 360326019, 422866288, 247972613, 990139142, 766813630, 25619403, 929658745, 91230876, 1, 41, 900, 13936, 169902, 1729478, 15241768, 119176344, 841399673, 434809990, 446105964, 492649140, 758977149, 206041682, 323715565, 660084286, 595902939, 912996958, 734408694, 639760787, 253066665, 208103163, 518638879, 141246298, 316067064, 932295902, 638352197, 835906694, 518593201, 772224592, 710767801, 155069328, 87760296, 888628863, 85616127, 159719113, 852745152, 116208329, 603162784, 598162586, 214665773, 928212607, 364268988, 422947444, 91651894, 294508512, 306449339, 29129368, 721764444, 23720919, 155935808, 134434641, 906918132, 581645037, 673925534, 656820458, 712140580, 940311261, 639783029, 193680127, 625191701, 485391283, 454129733, 912047676, 531795443, 151893083, 16212124, 506754047, 491882623, 143293012, 25311790, 265858487, 730580376, 281408346, 313354998, 904477185, 246774679, 76212745, 790588368, 952519623, 156839403, 194467618, 872887052, 91963369, 534129628, 238356180, 632320800, 58443419, 722943306, 618550091, 33518175, 519583410, 960079192, 538023159, 305123951, 486152058, 294482726, 518323725, 455607677, 182021187, 748135143, 512410493, 35362801, 719659644, 317014598, 528329960, 583008290, 443175574, 659178079, 174647583, 349497845, 577399146, 818913619, 271472027, 656817275, 494680790, 969710982, 229444476, 267631925, 175671131, 35511369, 58752774, 135202754, 944159958, 464206230, 475819996, 314325811, 754861491, 276808552, 810159244, 91192489, 626570800, 590621471, 514780234, 305537247, 801654104, 149383516, 787215362, 114530579, 859617326, 613074050, 468568467, 919259772, 617744284, 340905322, 985953212, 372028816, 217079653, 938494776, 284906842, 769978385, 515786223, 285120775, 375534381, 675385916, 665832700, 133450834, 3874364, 408375526, 770616302, 276273159, 413928636, 723794836, 198571707, 678091222, 296508406, 529916658, 588863591, 413257244, 498474249, 915935032, 120501359, 836927142, 230121084, 774509032, 870826787, 489996192, 917057075, 196187219, 383821852, 922336284, 22274995, 748507616, 607632780, 183109949, 339998525, 507933598, 698781318, 498085612, 803731847, 473820207, 901546035, 302928184, 865394080, 114078163, 2199878, 779942965, 594445523, 91527221, 272107811, 718335802, 365412741, 52329171, 414520032, 494974650, 300177708, 811610962, 146810674, 337728819, 506402762, 403329973, 694340600, 766854981, 757139989, 188368338, 788752320, 918847437, 928046733, 527551285, 479184799, 517252899, 712149490, 791491255, 238449676, 667119615, 757940899, 445679476, 734062646, 326185889, 40504124, 623294475, 807102585, 697275776, 960233124, 90479243, 277423126, 459856976, 523164613, 283246190, 353589088, 214300387, 783487356, 692462518, 267488040, 851918218, 799153667, 810257248, 109085516, 633189413, 670646041, 913414538, 526057886, 701571781, 823895555, 366072317, 141394361, 832809290, 464577360, 305577012, 512815120, 121404516, 195457318, 321946163, 309097012, 239601477, 94799504, 314416433, 43085740, 639634392, 892727867, 559091131, 668748148, 422889784, 711508368, 676630033, 634668710, 364293294, 844937242, 751071408, 322260215, 891789141, 187899827, 511558264, 521391391, 670781806, 509672700, 51147255, 62331255, 681097643, 668432081, 698715101, 46454740, 726474418, 934462337, 72103891, 408373632, 957100449, 670661469, 786800623, 834620545, 287400489, 490496888, 497846381, 189806313, 912940390, 809020495, 703284720, 835793884, 605744360, 923348658, 214377202, 697918809, 343995053, 445012242, 544883273, 475774494, 73159748, 664916820, 945806189, 388033609, 184443581, 891139166, 132967061, 662232592, 630310273, 296941879, 926467100, 732662520, 755030683, 373067237, 200501225, 132039597, 621016442, 864116597, 199168443, 229224627, 19895297, 392227721, 512572983, 888183257, 954225811, 362992884, 408318299, 664465052, 828120392, 703374891, 61248349, 16358204, 241119413, 30565637, 838212406, 921697699, 543334430, 89858526, 273185879, 355471309, 304528048, 507574008, 476038937, 789196651, 57644735, 932966132, 292240565, 284284800, 198355642, 844613937, 375170024, 881957600, 108981244, 644631978, 730251746, 563646094, 15703371, 891969119, 462467018, 842418885, 184776107, 20489508, 525173823, 93913531, 199936707, 49296883, 500271791, 9386940, 42793104, 102301079, 299925062, 242848544, 157270543, 567750735, 512260765, 540910896, 473863432, 123756576, 867793612, 940752336, 189701376, 338838501, 163690216, 120916067, 790468763, 680974009, 939542025, 299064055, 752326705, 668302564, 775312490, 929999123, 713601128, 593704708, 595301628, 539445680, 220384571, 492539730, 572951883, 264745653, 946510661, 751486844, 372815432, 445849920, 481560920, 887629330, 46438187, 433046906, 550746520, 68280122, 549536967, 98170304, 942092421, 657076175, 85959544, 736296914, 244774210, 196059783, 968298850, 183375217, 810099519, 413635020, 636120983, 396309504, 740465895, 371532101, 1, 42, 943, 14920, 185722, 1929132, 17340642, 138243024, 994832181, 548192008, 829424358, 702470585, 488681655, 275370643, 835638795, 810867407, 286977068, 950047225, 83539435, 44629372, 288790619, 507410843, 264046736, 483012816, 672138691, 875194556, 651203850, 66911617, 918075656, 674825734, 94581776, 415282344, 303997379, 819537616, 622429217, 698967413, 751254549, 420414807, 687830513, 601402264, 434289505, 724948167, 754889253, 808542135, 995391960, 178813332, 724416372, 177739106, 814105099, 753597104, 45856871, 272275296, 786414287, 511285559, 160720229, 317562390, 790336119, 868224061, 359611251, 78736463, 773457035, 927802445, 421722380, 116775238, 364696053, 502866895, 626441652, 490807991, 713262576, 797949369, 598695934, 260170588, 82830001, 494545919, 272206045, 443643728, 598266021, 33015507, 884148700, 307476402, 959867411, 216334812, 800291904, 985570368, 488188448, 107147695, 538136243, 662412600, 979298525, 134498654, 226734918, 727004323, 749341953, 119616289, 344235011, 179701806, 771727176, 867138213, 462181714, 886155872, 120844409, 637609736, 732957723, 950929297, 917858187, 787591285, 658307576, 752393246, 363474545, 410621001, 994736846, 177814531, 780475306, 862888709, 592093607, 579502147, 557845688, 288775481, 603183203, 577960148, 788283409, 673824051, 683888139, 877184660, 633236685, 114600324, 443874806, 243845462, 737247494, 816215602, 301818289, 678209727, 613605938, 858234475, 818583083, 638002191, 955539556, 166659792, 402119583, 136117938, 121601666, 755992562, 47984728, 295575049, 499852111, 307179145, 332974068, 315732357, 716712867, 640162541, 867854182, 934376752, 313718034, 59903781, 946384843, 119557570, 525136020, 151571916, 798992199, 641098837, 260839275, 993458171, 824535499, 355644177, 761912070, 816737774, 16159145, 269418274, 606453921, 360745230, 8968332, 697762673, 987763777, 660889863, 735951723, 644168107, 694447061, 112348183, 530007620, 3042837, 764274326, 848173528, 194620935, 635775962, 259196720, 713828904, 940082694, 457694335, 838811079, 742877821, 825043434, 999682813, 323541591, 50872352, 337477908, 513975090, 485543671, 991738379, 437900643, 771900426, 686428428, 563411325, 914169111, 935692665, 43568184, 490175371, 749564693, 101137943, 245839802, 603981104, 626386341, 386920859, 413292672, 913439917, 70347116, 434898910, 144090153, 824132212, 891175519, 132402569, 347193520, 969072546, 16729602, 608672301, 618817500, 911982521, 688615529, 732174336, 500282116, 497352932, 456415575, 878875953, 316115544, 915703538, 598465482, 596140294, 730305232, 164832432, 897815573, 166896959, 324516472, 764718824, 566396641, 914517008, 874306816, 779763109, 852306547, 611269114, 292511571, 915381300, 758955270, 257373679, 74625589, 121789415, 230596845, 205840454, 916544901, 23902587, 416402779, 293269031, 510816400, 975368660, 955188220, 72244504, 561311434, 137072009, 127537010, 860723336, 883260674, 394382836, 913512596, 497775666, 206616201, 483790701, 11643758, 543373789, 107216374, 536706614, 345207484, 197739695, 416959310, 802020491, 883579389, 155472766, 707726533, 878636875, 137339984, 387604391, 170286771, 862464509, 93116703, 698306089, 277231574, 157624181, 518482505, 545923209, 301838767, 429107456, 65466197, 400869145, 603396151, 201146053, 29560436, 908247428, 740900666, 645622178, 468181946, 182006817, 585006092, 39427009, 901513909, 575103140, 643739693, 969005418, 413112711, 121940507, 949419798, 274176335, 533655948, 73448571, 447893873, 303200166, 406062958, 327948494, 399154885, 680966803, 676784794, 346165530, 118434942, 634041854, 219847494, 927409557, 731595298, 204066166, 484721091, 397391612, 62697528, 613046235, 363210072, 588627148, 359818291, 176675393, 710790103, 31891420, 193284227, 13322649, 80677012, 364175866, 156203486, 303397217, 540753075, 969185318, 762928705, 479974322, 873609278, 714679223, 243389411, 893917661, 730412727, 540295939, 380888528, 199480073, 111615382, 501213077, 699982545, 83674978, 340471893, 589623231, 135448371, 354059110, 416125008, 490338358, 869847423, 644581498, 153365962, 261322947, 680966984, 400282844, 542955010, 604680600, 412088220, 680278649, 139286485, 860834305, 469429775, 280658323, 253030904, 2560916, 10309871, 297479762, 823144855, 871982081, 47058346, 963847165, 382927224, 356584190, 324565827, 306141977, 910279795, 453817674, 601981427, 979339306, 222338413, 904561649, 382529080, 408856660, 854658577, 411827225, 670817056, 827144476, 223389693, 471934610, 930635535, 587441381, 722797748, 95690794, 663628478, 287716698, 646651719, 701670514, 288321331, 90367689, 303151955, 540716833, 449495113, 614473847, 768187147, 779428778, 859329178, 317839203, 24311574, 208713726, 534909824, 569617669, 779723332, 951823587, 262620278, 508684571, 644816282, 124674019, 369884532, 146396384, 993989514, 828097325, 353947367, 356630001, 483119775, 36683277, 829372562, 480348153, 416969202, 237164413, 917166508, 673670902, 955993972, 550159722, 115253791, 571208381, 883450110, 234414978, 338605160, 465632072, 975880238, 1, 43, 987, 15949, 202614, 2146662, 19672862, 159841410, 171958174, 857707214, 674952199, 863564473, 694487987, 218927913, 150857334, 64522123, 242512102, 726888439, 233627107, 811786714, 114239005, 343074532, 372330107, 720689358, 467711835, 904517093, 48140523, 445520536, 151023837, 477389409, 167654505, 524330326, 826025786, 750662832, 873751815, 63739722, 191556854, 667326112, 50500515, 441625511, 782830742, 400734038, 564497630, 921910383, 845548941, 368028935, 749018447, 103585045, 796556849, 628596101, 868979841, 539520158, 627354569, 90231323, 417433082, 56768496, 355579497, 422451590, 886349503, 72956900, 803725461, 415871073, 683643384, 621063238, 193330057, 325926450, 277754812, 24871409, 448472012, 886190243, 823962291, 441987145, 894908057, 837390023, 862747763, 91512877, 722912649, 93349481, 545810047, 913016979, 515556016, 298546360, 734212089, 844284728, 136068973, 71028614, 122223407, 751306630, 44843394, 423748616, 386401231, 812571458, 811253207, 883210298, 108253088, 777750730, 94398075, 357510258, 341016668, 444595182, 421469474, 846006439, 697364303, 430219357, 145159, 329923811, 555736286, 145037472, 50858159, 758063180, 409311835, 199515197, 849732459, 429458586, 110831608, 601311986, 405029768, 899721594, 362036575, 3616348, 447767827, 718164293, 455022502, 154627334, 632024645, 923207902, 841801838, 418932384, 595460287, 460605434, 188513457, 767682601, 51793196, 194981425, 929803954, 504733978, 22197692, 870666331, 333136663, 819520200, 530915500, 599537526, 53266589, 48676597, 387019415, 413134249, 89916173, 988538195, 741237674, 580557472, 340811443, 13472882, 840030352, 781975641, 296220934, 702357371, 942050407, 935085214, 845987731, 799577627, 872670633, 692587304, 440284632, 702895036, 10589510, 109084537, 901549736, 680965380, 523560865, 14608855, 766098800, 955736031, 229070295, 918139336, 762087315, 15060087, 769624318, 210516326, 269537431, 932448778, 651446512, 367308406, 624037144, 927670291, 415521073, 854675140, 947034643, 395133007, 858104556, 792426709, 918444166, 282314711, 96653546, 423079321, 469451942, 792999037, 308400615, 330587501, 691818222, 53917678, 568461122, 362577365, 775464857, 904714011, 845440210, 795470521, 568880508, 666239878, 183860147, 125507811, 545400921, 401495311, 3467092, 430876347, 332849310, 96436924, 957680475, 836934713, 150232592, 891109199, 995835861, 145792868, 255284669, 853681633, 801676454, 45857933, 127560794, 137690320, 534209092, 436059291, 890838261, 134212816, 302504982, 936257832, 761720727, 269396963, 28197218, 59083210, 947207164, 442972791, 384169121, 488722025, 351406087, 443097712, 82956552, 698141640, 145942108, 188889308, 734290094, 387705377, 912805029, 973822420, 47485510, 507370861, 221674431, 786661915, 91335607, 856760661, 173031704, 864904090, 599152735, 495185408, 938099393, 556362344, 990758140, 995900803, 254599934, 462199704, 5008078, 665636661, 527028350, 642386127, 1829553, 551952980, 424017355, 108488740, 701380336, 806666866, 700141562, 59441909, 362171728, 894757457, 445400929, 773238426, 127546419, 723395394, 338826564, 332919619, 340737249, 850054615, 184058121, 13063831, 278558952, 698063140, 498777528, 72607237, 345269132, 902279995, 183690503, 772520236, 708689187, 233896476, 458831695, 230994551, 41124197, 206351350, 689101399, 262700029, 620939252, 892377787, 428085255, 694339277, 213848040, 916329377, 192795757, 474268014, 561285670, 220016093, 638297144, 193877561, 647642810, 64716523, 5417153, 709160560, 438820650, 471896153, 456049785, 424945489, 102312939, 179871925, 155527933, 66018018, 519349428, 575834851, 366155295, 196027859, 709388961, 444696414, 108229719, 111474967, 169464130, 765045351, 916818004, 674916990, 958919968, 932259128, 849009441, 829390390, 846317162, 253991616, 482990034, 163822353, 775754269, 532037321, 49173712, 212326050, 301906174, 678424573, 534302771, 375782334, 160287870, 855370313, 341617592, 25457804, 708941176, 246832732, 903916100, 546588049, 96029971, 706821232, 940560978, 101534792, 337492719, 856837601, 613769045, 707646199, 812028723, 616833643, 679800396, 535428679, 224426630, 413895724, 784683428, 431644219, 111092914, 661756720, 639659700, 41894591, 68359952, 43802473, 952730000, 823133424, 376059765, 707785553, 822330735, 771301262, 948220958, 908479296, 864547297, 515908783, 27167717, 175015260, 401476125, 721945851, 298498970, 707819205, 838011772, 889483594, 356594984, 693435347, 967781679, 401435494, 355846180, 333596320, 628919505, 303558980, 984974994, 113643042, 89409518, 612893129, 122412730, 114900098, 810658251, 247580260, 945287301, 609126629, 492005778, 772356444, 361927818, 440145503, 858752994, 174471327, 210890472, 769016792, 638211867, 546015263, 377533141, 892710683, 705066724, 412035898, 913706912, 989583745, 102815427, 296051463, 435828877, 627348761, 994079761, 369313875, 909339708, 172995194, 816793393, 474860389, 821690532, 962160124, 246051373, 970475428, 561698902, 165844443, 708639335, 918973613, 861542417, 207950600, 197794802, 563223285, 448456804, 787570186, 926930606, 566070711, 279041721, 162328562, 287318056, 191225488, 14318341, 585550504, 409974535, 697728497, 891226405, 200433586, 381575055, 638337683, 483277973, 755030264, 867834356, 962849947, 821535631, 1, 44, 1032, 17024, 220625, 2383232, 22258540, 184242832, 375813872, 392612893, 231706087, 882424931, 687132034, 689650073, 577977876, 303878988, 24310937, 406963663, 625468735, 582435950, 41660062, 421950986, 98962940, 938709884, 758565048, 969234571, 703952131, 900436492, 658647225, 285611947, 399326780, 419454732, 205387170, 983950227, 49990302, 189001672, 62673927, 586296391, 184361166, 506353667, 438069708, 256171907, 825943859, 951340167, 368115756, 522855639, 198647246, 263328246, 450011807, 434855284, 725807775, 648411666, 18383140, 128787399, 387148373, 905324825, 158891954, 656234845, 213026076, 490012707, 365468167, 200221292, 298615515, 290107567, 35072337, 317672326, 60118064, 676291945, 898619095, 494511021, 35193707, 681989460, 255539191, 6318676, 181981289, 309123618, 769843578, 942743189, 29734288, 954472400, 463236670, 747980714, 175643037, 260101113, 77874147, 589524374, 710018290, 567729062, 854908844, 767838566, 521233813, 535397022, 395450772, 519565978, 430844324, 691804767, 750969410, 915664434, 335442962, 327801393, 599337662, 151524696, 372580414, 756807473, 202845724, 578628778, 324772867, 495203100, 594805038, 176866440, 134364432, 797477913, 981614510, 128692174, 938852792, 42148884, 122641852, 370944239, 473851910, 935488807, 532851475, 689984371, 438315593, 696398812, 66001022, 428174065, 54501471, 80878480, 666016821, 47295976, 813797397, 317765605, 714997505, 258919731, 82884010, 661027522, 582655484, 361252385, 24311003, 432884688, 368733632, 23821090, 792526029, 846601436, 536812192, 29313630, 382435159, 426147993, 517181759, 645690342, 270896281, 775661220, 283600768, 240876557, 135665693, 104458079, 616729602, 497103691, 828815240, 86098789, 998656307, 754065783, 488969594, 91503702, 52278308, 883359011, 733253122, 448869387, 985543203, 116773170, 582006344, 860482711, 481797421, 498040658, 240829616, 836032529, 195942841, 508465042, 970760583, 262117458, 515914406, 802808161, 784332475, 374122343, 146224696, 841597534, 586439935, 244148601, 788204315, 767547799, 776362337, 510076278, 624681830, 364806405, 36907700, 539421266, 800828005, 512242954, 899834647, 163376162, 50294413, 18654970, 84289561, 55576943, 421249957, 34930346, 752291330, 162276973, 265235612, 648593820, 174309283, 472188614, 715911113, 367773012, 121970433, 269868616, 883985007, 980070897, 514347496, 412293057, 574601560, 116830355, 45453500, 562859501, 189078677, 827602581, 712444490, 316586780, 733065979, 840949184, 60074648, 135398686, 424428452, 321968689, 410040315, 273128858, 471407472, 574966766, 873880166, 875045586, 51088331, 163730111, 878321231, 726127318, 966070068, 992549896, 363335253, 89848987, 723352311, 66759579, 406269326, 227087300, 150259572, 36586234, 121181736, 671327424, 433664784, 948164313, 657988535, 451431758, 352880293, 341991927, 179834471, 17796695, 709446365, 576526708, 534876965, 620591563, 749402589, 628280366, 213414310, 982746106, 780180633, 458647121, 527146575, 210950823, 363805011, 571210392, 912463620, 153315485, 532024632, 427468951, 230879114, 869803861, 964025520, 480715223, 895116735, 766188327, 419338263, 475074013, 158183698, 899486620, 551866464, 830407504, 385674668, 305150124, 25769566, 438519248, 46473036, 427624180, 723264512, 651472006, 264633252, 457374493, 476392005, 982968243, 594462543, 141658727, 489344824, 433530156, 442633667, 193279091, 506366676, 618868695, 731227096, 902261819, 499005142, 38842574, 647293009, 470120821, 963932040, 826530559, 427769181, 52186234, 243569284, 806914289, 77294303, 605077946, 125786816, 193185124, 669741115, 146483601, 421911450, 244025223, 607708016, 920909811, 503255382, 458139691, 962827176, 614853461, 60315827, 350564197, 429760397, 252570002, 854719144, 336843776, 342192419, 596659989, 924243516, 172320579, 980212083, 387574794, 749118912, 796421442, 338721201, 731277700, 423355068, 842226704, 398877706, 643899462, 276311394, 413568057, 530987554, 558156380, 825270018, 71652153, 764304967, 575174245, 41877959, 189656159, 729954858, 472722511, 759829544, 285982254, 921037034, 543320666, 873711613, 829723375, 146980729, 88768980, 242470712, 9284436, 325379730, 426922557, 253585643, 473459335, 496125795, 212116723, 579959160, 525505189, 681915634, 797942363, 691505794, 454823298, 342255990, 994255712, 284908161, 275004161, 935102263, 472107098, 948357256, 856671615, 528973823, 649773881, 963952149, 308388016, 911396221, 251193820, 721175020, 199750213, 907595892, 491208059, 66513541, 911357998, 28185931, 408941602, 745821213, 601730782, 8869191, 260152446, 11616084, 492782894, 282010506, 115926945, 586669273, 760307966, 135350671, 730510115, 701832702, 230080848, 284697593, 182609947, 968668397, 822892958, 20031466, 582030222, 113170973, 44631330, 117449096, 742186715, 393019551, 475653487, 44400405, 854169605, 417464027, 638137059, 767027912, 156446839, 993857936, 340495049, 620457258, 138844665, 409760846, 178352112, 82788960, 388732194, 649306589, 798058368, 662337136, 564354859, 463324080, 651997437, 151329929, 798760314, 140393196, 82249686, 534814725, 624568021, 130746531, 950081340, 74895509, 582830295, 80288213, 896322580, 930247101, 961634195, 343840503, 151542664, 791653321, 891526646, 512046490, 292522561, 321986893, 483787584, 926080170, 410378864, 504638099, 532986681, 138953386, 701001827, 64586773, 800287681, 592917926, 845148767, 612516645, 103437292, 360749745, 802262044, 905182790, 741928176, 827192105, 608668686, 275550867, 759837767, 768468707, 652063776, 969103143, 1, 45, 1078, 18146, 239803, 2640055, 25119048, 211741156, 609749448, 185787670, 784612981, 979654374, 245960280, 15201333, 958496287, 21110097, 315107827, 742613444, 350112648, 551346765, 22689059, 646342016, 52427180, 113726997, 20972491, 531552248, 493279562, 92962089, 319571072, 658193556, 921146440, 975234478, 32484025, 175484024, 620442122, 566033382, 228886883, 301912152, 137109958, 37427138, 531183271, 684452057, 239066445, 806400806, 345167706, 766401402, 659593100, 342864185, 793254425, 754419464, 829307575, 253460669, 788296808, 455700810, 203460090, 299960617, 672027544, 662169751, 130171479, 226661975, 16040291, 641167104, 11608362, 92735361, 828424038, 151425031, 757058935, 838944903, 705030989, 271605017, 832315720, 525711262, 695893337, 524834613, 616761109, 89325780, 498691877, 390082387, 413410547, 86170624, 733987779, 857386717, 121183471, 378540433, 791481061, 602874536, 895775257, 706223069, 9499, 916233199, 610175789, 305910126, 402086898, 380865911, 987929263, 784720236, 752249361, 533065111, 750214951, 512527924, 120069833, 497034065, 691332267, 542878776, 324018841, 841280375, 368737196, 213532423, 972352910, 856518833, 695976280, 832491001, 482258020, 288928023, 37469870, 669147935, 728824530, 312167670, 98462828, 664815478, 37466991, 488559701, 805407681, 555656112, 449333572, 115257333, 422614443, 217564969, 709154128, 523463461, 73425486, 892488653, 72758100, 139084611, 245397266, 356349189, 258341975, 374070936, 726599734, 907199192, 145474167, 868900328, 80767170, 435742131, 604761267, 550372021, 238314098, 858506407, 406280874, 734533546, 294613351, 569709112, 578499728, 811514468, 971780315, 806793934, 105431100, 109183449, 48863833, 577768093, 679710969, 415227663, 41263734, 575857153, 381654592, 178237376, 962188807, 96401085, 816699360, 379978, 698529453, 815682387, 657011537, 324418972, 693645417, 573047105, 308103161, 882958960, 454854080, 319280881, 638681315, 366562235, 558670399, 767575020, 418970310, 599121706, 533764150, 589341596, 935247125, 342450103, 752510984, 17885861, 270962366, 936052758, 754048953, 578853463, 395299411, 975776432, 660809842, 714104917, 664542262, 888472526, 460099640, 981638523, 92874960, 177231620, 389704303, 815325394, 892076514, 810821143, 435904186, 382196425, 459031152, 355917826, 128881343, 657597142, 768648132, 489510758, 615223177, 785945817, 514595120, 566588750, 607013232, 187911920, 428934627, 690400146, 385480557, 274884476, 214574226, 202705516, 78809920, 768678876, 104566183, 54811645, 783466377, 78714677, 225394661, 571378521, 194681502, 425310485, 768219090, 304793231, 206900396, 615627160, 652872143, 605935098, 888495311, 608958308, 684600222, 150382009, 670451269, 632074742, 29926906, 676412361, 727588975, 541140282, 152873820, 396851079, 644404346, 44361987, 675992732, 795525664, 898044746, 408945421, 518637916, 428148139, 754863856, 398182352, 901207212, 713356422, 978366083, 314876385, 700685480, 450639991, 507197672, 750335365, 694787156, 659670168, 536065922, 58255852, 874808151, 601680063, 300562698, 308983506, 144763409, 291800793, 77526020, 485403753, 904665596, 240987930, 592380858, 131116194, 318805303, 40941643, 253699630, 655235690, 431599614, 508389196, 766960976, 64307752, 83604788, 642165815, 298107337, 143184667, 782909601, 97135064, 800759539, 594114128, 462420032, 946857620, 578998109, 847963761, 556321528, 57391815, 681855904, 181815656, 486333346, 837072759, 524567487, 328595763, 549915998, 810586503, 921107919, 625157836, 520890292, 832156974, 502972509, 844559735, 189855766, 821823028, 625190873, 310510259, 495827691, 683011136, 462720297, 218315456, 558392392, 789434995, 973556645, 730884239, 996176654, 617108310, 869866261, 672230385, 823462275, 454316955, 569646417, 836576125, 486906178, 189726176, 941091111, 447563926, 715506888, 259006307, 152570437, 178255829, 705545293, 756368978, 655390691, 445318929, 656847742, 582354283, 964611397, 757172000, 601301680, 424348696, 51484783, 19240319, 282677827, 308226295, 848392338, 155829926, 371112122, 224524783, 972970693, 890401898, 186586738, 229535528, 744395297, 436751188, 287103606, 767393594, 221149011, 725319915, 148703291, 142739608, 565503173, 66967587, 579759051, 568848401, 146971072, 400042251, 42796974, 930117091, 516575412, 958322295, 49672443, 25502320, 669481138, 837449618, 7837933, 569472200, 125364493, 253977071, 938687542, 347213905, 923213402, 374713215, 103889249, 423021360, 42560340, 446498368, 893011213, 263552847, 473020638, 594960497, 638188472, 306243047, 631678307, 460262893, 114330448, 196301356, 120279822, 408786998, 213927614, 687965452, 221650209, 761159253, 159653422, 237951119, 705996510, 183076481, 962207888, 939920456, 729428244, 527536009, 933629825, 48104537, 426892607, 222940406, 156477133, 294062878, 856995315, 562470362, 935041969, 210948751, 968306167, 842365144, 520781012, 542464204, 753086923, 742421303, 62000597, 644679235, 71406991, 633199433, 272647461, 452692051, 412108892, 971466694, 51102980, 982720545, 17172841, 800141833, 835541670, 112517201, 389287762, 451060806, 667438631, 372888210, 71363616, 925222882, 974951293, 516878304, 717488009, 957226897, 42671831, 558776576, 623171604, 305500795, 631070922, 102790598, 482941055, 578335399, 805101814, 173951677, 379242816, 368922629, 730730546, 873191134, 654555294, 282999571, 122452789, 92227034, 843713012, 807240125, 801145367, 399481174, 81195926, 292593849, 487745170, 77737545, 120468361, 275563695, 294725580, 329691567, 323060707, 128192468, 940264172, 278390124, 237020514, 693096287, 868976326, 357620751, 777387506, 600499325, 283061659, 552760619, 551343042, 374674126, 67456147, 355451755, 309520773, 188033652, 438124708, 963234900, 524570431, 966112342, 609641134, 592345761, 1, 46, 1125, 19316, 260197, 2918394, 28277069, 242654144, 877454212, 274093151, 658806941, 733787098, 12686768, 373279778, 972151771, 700803085, 323660829, 529034010, 15342046, 14519348, 617205005, 151932388, 986173050, 673700068, 544467810, 964286681, 515278420, 556139518, 340574896, 558301369, 203169010, 995039572, 456888812, 641435231, 165153057, 140522292, 660622205, 195293121, 536816710, 963078287, 7389104, 204944482, 754195920, 468292992, 782743724, 983001140, 866703245, 496885028, 44229335, 385957410, 278539952, 468949573, 420982388, 313452346, 869856814, 98935497, 204399132, 112520568, 660616311, 229799510, 228233497, 492491671, 631417681, 54933646, 149425728, 621332861, 339088208, 164640489, 629238436, 824895721, 154091091, 876001533, 408513031, 998443240, 581987593, 639413342, 564182232, 919538600, 946772636, 882410774, 972663920, 656083562, 92818, 266781815, 775781699, 746031288, 222736672, 245153398, 853395663, 612580130, 998160370, 644539418, 268757618, 522753001, 961290581, 775849265, 167666621, 207332842, 699178165, 754169098, 895892786, 110804927, 209717022, 224332021, 783584762, 168756823, 846734143, 820517435, 567375827, 214226237, 514413130, 94334242, 56417678, 452070622, 302779049, 643793464, 45275321, 465081583, 721848633, 905142006, 304646178, 594655979, 909007937, 734286949, 886228757, 175346016, 613908391, 543890160, 182181133, 880150750, 840065256, 833202286, 948664835, 99995047, 986587901, 143761895, 873393215, 472341142, 369663112, 813013714, 860504625, 731747262, 545041246, 583231233, 427381591, 37913038, 537312918, 219404202, 592801409, 727962123, 878247573, 121527391, 62101177, 856133295, 688561557, 4927109, 639161755, 216890863, 944378755, 396352437, 878653962, 905668778, 386987830, 935008847, 899701147, 100650401, 955831377, 336099358, 325599961, 655390214, 368725260, 410912881, 868037904, 255016544, 51552711, 320078126, 868474642, 332377928, 241406268, 35418479, 170587950, 775390874, 598922434, 616742075, 563583865, 362204509, 606438997, 894815935, 49721736, 43588534, 841088924, 703571407, 258771291, 525460849, 233015242, 491199815, 325653075, 858892862, 519655123, 115437087, 727491564, 149427446, 582972761, 204458210, 871579136, 737982490, 129452738, 424878982, 856725917, 336920826, 730532856, 841738688, 738232572, 913319995, 816486040, 235770118, 427698004, 930569686, 569011751, 212446463, 508105319, 803897811, 496189040, 948372030, 432798655, 784691260, 809769369, 691850475, 577558004, 62715847, 947764060, 196109904, 506172286, 447735266, 980867772, 417186123, 46557919, 986790130, 277584037, 822619391, 621076591, 388367593, 68342324, 236699370, 119970164, 657351210, 878868802, 794459312, 436412351, 290870119, 503296346, 564802634, 58773734, 218770767, 842309450, 694735121, 712067611, 605426442, 634737321, 598847809, 189964014, 104895974, 463967300, 12836011, 374171101, 422839429, 769990513, 562838372, 23465799, 935303296, 758855803, 832260567, 373886738, 362866660, 831747060, 745193763, 842521525, 971131364, 323409153, 328965945, 810807795, 987986960, 514599613, 697337301, 518676386, 255182547, 320862033, 438306682, 656059329, 246817307, 296427451, 518314128, 212813255, 401599307, 322632262, 651271379, 102975853, 978392574, 171788197, 425477753, 865141598, 200230496, 352371432, 128877128, 483645145, 487174027, 207964600, 565016864, 366179929, 769999162, 980709292, 279413092, 778963675, 322935221, 775556840, 152203885, 621120920, 754303914, 144652778, 603456104, 397495432, 911648885, 161631342, 183072379, 436197254, 410415743, 654211646, 998944149, 660332881, 659092994, 407158213, 993390015, 62237745, 342306369, 807083806, 460112259, 598009122, 34231667, 354435262, 237881432, 155417941, 495370397, 996923439, 566380833, 854227389, 702509945, 42544433, 284265702, 294553519, 149363293, 27077251, 84953964, 442875086, 52560456, 900402134, 145229989, 73758817, 191009440, 854994962, 638721915, 122661714, 185868970, 77283521, 869275152, 18655948, 313026284, 709600476, 473812539, 310414874, 881320952, 952459523, 248120422, 525865505, 878780555, 987277088, 840681160, 676792790, 412115993, 140030918, 974129475, 721196483, 656805079, 905290349, 47935904, 451920705, 209356056, 551066765, 377150442, 379611973, 957219941, 151470005, 815021467, 645207971, 427463516, 863082600, 325313522, 124436219, 624577057, 614877838, 455973640, 851822937, 25478672, 694724523, 841056623, 311625157, 733217559, 234679922, 488590424, 672460808, 393534712, 496209755, 929085969, 673429468, 675205481, 477828672, 541309112, 421475544, 478494486, 773959869, 620756099, 817295158, 343366608, 474968096, 138789669, 1261477, 581929663, 193727536, 890932863, 10823177, 566850894, 774883564, 16714666, 326523886, 969386350, 297903394, 330603328, 602435368, 640131734, 422205271, 722651837, 536164302, 931111157, 119137488, 728875089, 985577117, 985476890, 17918009, 917723365, 472997173, 89115107, 916366434, 502538821, 230961609, 303908854, 617061492, 736625515, 131713887, 339453221, 738950163, 633262610, 426758031, 238112917, 779917917, 838020550, 66019448, 650675847, 778117049, 610691432, 213274580, 385410347, 146924004, 364868172, 467790003, 719723336, 134820272, 752419541, 477278067, 249134595, 704095466, 475445405, 736299900, 879265925, 152926089, 845846141, 495967193, 279498385, 571884448, 188818617, 160584873, 477296264, 718325160, 376134972, 29944771, 994040918, 900529668, 502667072, 63109761, 493032874, 781301515, 461834757, 82343644, 481132313, 514447042, 33858163, 779555233, 748165656, 15592733, 72424287, 572256728, 868353288, 210902382, 873738113, 462082508, 116372507, 317994063, 320661573, 43412947, 698165915, 782179405, 544478699, 376533191, 591100852, 669522818, 718785967, 689856669, 868867194, 692259782, 326169003, 372530014, 278822874, 245059471, 536750832, 337386716, 351509954, 600150419, 771930319, 812137400, 268506281, 52663290, 576040882, 250206016, 182636529, 238498760, 83748189, 556944302, 408365242, 877381661, 687598532, 206936328, 93325077, 375585930, 311118119, 840250578, 1, 47, 1173, 20535, 281857, 3219563, 31756649, 277324867, 182983217, 698763572, 224340727, 130185913, 938338213, 457596872, 500667258, 726272186, 242531386, 490324006, 697265581, 186365736, 123707347, 149163288, 89978475, 985283339, 584841356, 785509005, 693590689, 256394211, 919078587, 671307265, 271140497, 146527772, 508423202, 678732983, 767147115, 418422439, 470469749, 411147184, 246424306, 580998273, 228726677, 964726100, 955513349, 444565758, 668191949, 622619432, 792082487, 929348032, 601983375, 875985614, 424117930, 730694027, 740975250, 920167707, 500437835, 690210005, 493329701, 913508192, 695611331, 515433292, 682059417, 760833644, 299135864, 144219873, 937695856, 872711671, 176916492, 348891212, 334587033, 49595521, 749704350, 806067034, 773327860, 183297942, 590517602, 642228939, 275941227, 305722242, 165986509, 644370063, 71211109, 994092320, 193064301, 728492690, 76982066, 397536959, 240992716, 459846893, 745186728, 715105963, 864528752, 8495685, 753272988, 61740216, 691254120, 133693721, 536597663, 806042634, 964981978, 37162518, 164112239, 637759779, 841824460, 829311498, 573961610, 622092127, 856298148, 23010232, 90428839, 608194623, 46765621, 381935126, 362962166, 452925715, 585602790, 768818647, 88708532, 942042803, 418311021, 521378251, 499003594, 126819649, 281499536, 951375086, 146412815, 883657287, 598780576, 163659546, 959278876, 560517421, 665346319, 929162776, 164983787, 77699826, 451232846, 342897676, 483260356, 399557298, 954841649, 593150358, 617703430, 292815034, 3827776, 631211917, 629217856, 387782790, 117795063, 964508694, 824603912, 347867132, 217932218, 808071571, 466159291, 919428338, 306867765, 310085680, 347929669, 103137973, 445637697, 645585557, 573817817, 596387955, 672995733, 578127218, 402908135, 115353766, 244018895, 365778204, 555835033, 188328988, 247770780, 214263457, 844226086, 575129810, 998900133, 642186262, 886066131, 9933705, 609621463, 398319031, 223920768, 209742125, 519163806, 74615456, 814536291, 217678251, 205417278, 306418059, 464475526, 330591049, 614947407, 841330174, 17421893, 462387593, 572435987, 550253368, 393354277, 125715312, 124567536, 533400012, 599797708, 528236566, 670562226, 867851657, 488086533, 312725786, 238592338, 37063455, 385067665, 487783197, 118051898, 700641656, 71282753, 435781034, 103306472, 894876554, 845215295, 848516, 105817111, 455104275, 971250603, 659938256, 173306291, 702024160, 716038595, 487118454, 170680030, 880373959, 881689085, 153725278, 74926408, 143593976, 537712434, 635112688, 530810156, 750175992, 211491335, 495469862, 938874667, 906814766, 530322450, 654580872, 345961757, 642596517, 63791230, 944154048, 670877958, 937127089, 186748489, 915912734, 209561832, 276486399, 229476817, 558761321, 226557040, 227364465, 312169979, 745218623, 741668605, 732242764, 141121784, 862165956, 612899824, 26577011, 945385273, 251793938, 946782241, 731260038, 244678083, 406380914, 904932224, 539791264, 681567161, 903979395, 522313639, 307479666, 592336384, 274405785, 808155145, 116439879, 610551965, 466693001, 783212908, 356926408, 441684284, 460337698, 929744044, 6376955, 718008169, 946348344, 771828366, 973818233, 895371075, 977137826, 380169268, 772257849, 31334848, 472603919, 411133545, 814229722, 268412684, 269984826, 925865608, 465876593, 90547760, 192297128, 107314233, 564985934, 624177562, 939350415, 164843750, 127698384, 375467125, 733175906, 272735725, 449176665, 148653187, 981408173, 518395662, 539465581, 376426572, 523018009, 244326749, 117372211, 788925566, 998562683, 66998700, 958836224, 912519308, 243826028, 372775429, 817271079, 249393258, 980817911, 290157076, 803249202, 54296904, 967950499, 259586185, 891527285, 197070576, 229312354, 227197980, 799697366, 938796541, 780082061, 90937344, 484280959, 41280132, 365255061, 357940368, 463355056, 931322797, 484716584, 549219150, 927360223, 836260928, 974511964, 168938341, 138740543, 617041490, 552137623, 940491117, 311751083, 797191757, 581186247, 747525174, 464341615, 45074367, 877273095, 118604361, 820377975, 651223472, 330450797, 299712101, 798402816, 155978336, 76119913, 279749437, 94544299, 576902970, 337821847, 762491092, 205421212, 628488971, 912880168, 293200919, 74345429, 106904237, 117214135, 997309646, 440117215, 601730010, 44099662, 275878624, 579837056, 734358196, 740396992, 105320711, 497734455, 593389397, 892951024, 375888233, 469355971, 904918031, 759963217, 159920933, 656339936, 82028185, 635763012, 494109863, 887577439, 747214684, 51704021, 870514178, 310168296, 344440919, 671389360, 63636271, 867520663, 253359253, 809561479, 515218518, 735486509, 595414813, 855063768, 809133514, 296905455, 403829884, 13706060, 521945271, 406722813, 508410711, 177195219, 735377028, 927006199, 631467156, 561281245, 747357347, 2938426, 465345595, 461810717, 851331500, 936133185, 709629669, 764183492, 336958888, 999734612, 886346709, 929391292, 283117585, 489898780, 493902211, 377860665, 233672406, 313970515, 130449778, 925311516, 829665465, 27964512, 47478431, 502231137, 77997958, 450616449, 231073347, 922519036, 577962078, 74763491, 840109600, 825429573, 325716083, 462423227, 684091307, 610980133, 146344297, 230702558, 840583842, 568780809, 837872774, 467777629, 918753619, 868791683, 692922864, 937076083, 487643358, 553595896, 717484731, 882361644, 739294901, 547711612, 781629368, 821302751, 368923697, 499416921, 374122329, 146178192, 867117817, 743635071, 435195107, 43377741, 23687167, 878990481, 99110158, 262344925, 137035868, 292609610, 625408058, 171070693, 281506530, 350758492, 515834894, 237732608, 828774443, 840832942, 431386878, 857791323, 291378943, 894741249, 559570546, 881728336, 216217018, 497590589, 210577047, 706853900, 528807154, 595327246, 243687205, 679896105, 276389715, 520651743, 981854062, 782051052, 628779694, 482906971, 308000266, 98460224, 329039027, 663453182, 866909422, 358447817, 756042580, 103701857, 530184673, 82157052, 864831037, 833622836, 129557279, 680891914, 903510655, 223117879, 584910098, 872789802, 683398377, 818673921, 424793316, 162530200, 461191009, 233747923, 764377859, 866276050, 20068038, 599500015, 419525268, 504837656, 702339633, 161478719, 731429464, 9977417, 955013204, 944736389, 868359658, 303235910, 570685307, 762022093, 973456873, 491776893, 191155949, 1, 48, 1222, 21804, 304834, 3544928, 35583250, 316123172, 530785426, 505824986, 901343166, 615485588, 789348648, 698747334, 657848248, 964586458, 476943547, 698458295, 801769019, 257736525, 542576587, 933572174, 9542546, 488292838, 779820677, 404677231, 568188493, 931045218, 340825658, 205993974, 185959269, 78058729, 445883053, 431770274, 625502333, 180277174, 804167964, 894493650, 995189957, 934651928, 779076648, 286076285, 196236261, 433504295, 796345349, 46608071, 262327913, 615865530, 569486410, 232121371, 86175778, 154003167, 455565337, 592635041, 449778081, 946011559, 315342730, 523152035, 660192808, 984322053, 918448908, 362530845, 976500024, 826353996, 979299043, 20455239, 106430716, 169990095, 856925551, 339927417, 872925000, 454748405, 844111855, 778706572, 953334777, 367875579, 54603227, 952723870, 746089521, 114899675, 378338080, 515017450, 901556480, 75514717, 118586517, 750778341, 164215503, 398032943, 932771419, 175973529, 371281707, 414155738, 136305212, 176477492, 529591042, 473449712, 104580388, 917944592, 711611694, 275529831, 657391663, 618370464, 182199238, 863262145, 671572410, 926093081, 964697471, 20599847, 886336884, 976845790, 332330830, 936899217, 469444206, 333826539, 382006323, 404644652, 86283892, 711449573, 711524895, 240243757, 137744674, 52585102, 502954368, 568353873, 424768720, 673699213, 453807002, 277591996, 614231800, 858886730, 933633627, 855960053, 795294602, 320736325, 160050137, 741837408, 875372187, 933116510, 439299086, 339530899, 998809886, 988163112, 414204450, 626581582, 425958595, 547450689, 257877182, 25212376, 487090639, 693248108, 736165691, 261048117, 530252319, 667332870, 224234420, 283256778, 493030047, 381167115, 959191937, 567700201, 408470930, 456733167, 877572444, 640070139, 177231251, 53889209, 630925282, 764167042, 903138510, 822950867, 161878067, 741376139, 620673064, 828400388, 989198090, 398235498, 335164252, 650259410, 895482301, 288920533, 986020511, 960531109, 692510577, 743863232, 159848129, 639142915, 658806616, 286815941, 569150064, 996156909, 474086872, 377428234, 108191201, 968576455, 934066962, 520785392, 648351310, 322768543, 500047228, 717012630, 366640002, 617370336, 747113890, 647615517, 420668064, 485924194, 28548015, 242698362, 20265134, 481161073, 780894508, 716872330, 925052871, 809234518, 209608950, 454869307, 42621234, 266915957, 548835092, 11648368, 200676498, 803279760, 609790836, 522043768, 787672824, 264643232, 571421826, 762085826, 854807719, 119023111, 660310435, 945098645, 838260736, 592383406, 728604232, 586121308, 18945549, 62079587, 8000021, 137221342, 936745518, 867913927, 937623778, 183088542, 624248829, 606106136, 815005922, 728188591, 164502140, 885086995, 646575964, 60630781, 250914884, 619961376, 835493684, 1794097, 350786557, 222634027, 605402916, 871984975, 140157610, 784428245, 701028584, 784157139, 199990301, 49282014, 806191394, 544636448, 696393844, 625422532, 306981977, 200109353, 819880255, 622554727, 966234587, 1715755, 884432882, 186517679, 414057470, 559202957, 356291776, 440462056, 76496043, 54502936, 82793754, 693820485, 333532789, 139408482, 538301356, 908601203, 663844984, 277481039, 494620179, 126148065, 101563902, 543304970, 40138848, 255494176, 250466774, 181548534, 183041503, 553027506, 468172977, 571880068, 685135214, 70030015, 431414252, 965377675, 285528459, 577690235, 3039911, 424468115, 149219671, 315258608, 442938842, 340124780, 620577523, 697442435, 606981307, 195766252, 513624332, 160814831, 144529981, 626344971, 929525101, 167384034, 985564306, 757660450, 674490248, 404160553, 218780132, 253152109, 588527766, 276135385, 293545669, 229980166, 406532593, 544661736, 944987368, 74067610, 979465423, 367319108, 691015763, 308068787, 270297211, 892899529, 571121326, 682341094, 508186314, 992592910, 570463576, 551864557, 443417375, 102996223, 180706669, 66278518, 547390018, 97982020, 377733797, 642211092, 809569594, 442856622, 912786312, 563198351, 549331531, 576357131, 891027263, 77805689, 816522985, 731749256, 313952972, 411776160, 795006290, 22615421, 348238413, 716260746, 223962550, 78670864, 47765882, 267128253, 587371111, 927656165, 192469863, 806624234, 136996971, 759497678, 646978177, 833527505, 472805550, 754214240, 960030895, 232746388, 490616131, 420542303, 904038549, 210637836, 74285318, 144447351, 742135765, 244372617, 87595635, 852731251, 594678505, 794681848, 228154101, 363702627, 673985808, 239196945, 836249623, 602064792, 462168907, 430511049, 331217937, 84426505, 529390112, 953694258, 768941491, 296949641, 617567965, 759210871, 554347066, 314959464, 855978152, 459336095, 416019714, 554419893, 643616814, 307318600, 193723511, 342506504, 737708842, 961578294, 644413804, 283651295, 449519877, 262823100, 438065978, 195660179, 15479674, 929627357, 712657286, 867475048, 618979059, 615899609, 290553872, 46585860, 675146342, 899293157, 138576244, 932939832, 413352510, 228638502, 577046541, 52412367, 271101119, 704058715, 716195674, 113738084, 976781966, 417637854, 201849275, 137988263, 703452509, 833173534, 774723430, 98520292, 647910333, 702073064, 101667724, 93613248, 4773372, 993672667, 598539625, 298728331, 547262186, 609550837, 42278975, 203431476, 764589375, 791435299, 273439277, 15186943, 247517820, 332116413, 672582410, 88991345, 573172714, 370502342, 495515460, 486357723, 529038430, 112617630, 9655079, 54905538, 630913486, 94540925, 694069860, 101033114, 601510215, 405093272, 877399916, 606786230, 712700446, 365826653, 440611748, 222502187, 628732942, 260127071, 415183336, 331627148, 603111841, 484627861, 252203062, 603610758, 918118836, 775502591, 558836403, 458735214, 903545723, 229008632, 239177179, 70767308, 751925156, 652119146, 980361868, 450630793, 63075950, 714904102, 795480239, 196855664, 446357279, 343343138, 751184330, 353543327, 265335039, 291055365, 141693974, 952501609, 772988967, 982806649, 295006336, 142133453, 389243658, 551050114, 837354729, 288032982, 926886748, 940810321, 996269340, 544323652, 123254721, 449847916, 164321665, 408440169, 540527971, 235735087, 384560805, 888470688, 711171300, 414716347, 219479361, 559050803, 610845133, 321258507, 296543705, 253557800, 771631909, 466270561, 966519146, 100544233, 474799959, 147649345, 956135303, 808272257, 279282920, 472357219, 422709994, 530025514, 999788009, 64593897, 709199531, 479060735, 311654131, 943520011, 427742758, 799287390, 782392773, 191335024, 830990096, 336010037, 237942831, 237453992, 695887098, 398366572, 529644737, 344086296, 862051533, 684436865, 317549101, 968659087, 366641438, 1, 49, 1272, 23124, 329180, 3895908, 39783804, 359447204, 925733384, 746545659, 165655001, 158091124, 719304162, 111160209, 171158550, 935012406, 874008903, 988755604, 608336289, 351327718, 211049418, 970686245, 441380023, 920727544, 396494781, 218114186, 934368772, 753990221, 203263446, 488226646, 946324350, 642441651, 816607227, 122420091, 629716118, 498106515, 488881569, 100763230, 814241373, 430998026, 986590664, 188596813, 238499794, 887765759, 719310391, 819612870, 840885905, 584773429, 811468143, 396065785, 368868801, 299761844, 617462619, 308704442, 206242421, 833439007, 106715469, 970135543, 972244832, 66232618, 207050932, 577078708, 955731123, 103929249, 632790957, 297717977, 280927805, 856143814, 140717794, 889342899, 570959166, 553036683, 311778062, 833874032, 321035571, 629235909, 60666525, 19636232, 889773198, 837811568, 283828621, 499062871, 459250525, 468391935, 389843786, 80632526, 462481073, 859711240, 66143264, 831825780, 518914304, 998480225, 496960804, 480385724, 483317701, 923742113, 771054094, 630267330, 478946945, 527928962, 674723787, 882998613, 123711144, 324674723, 964132061, 961988031, 65215295, 858250635, 924300325, 577545014, 241841560, 172586320, 726876085, 210684082, 897202470, 742850020, 161301259, 120853804, 344539574, 836860211, 667275920, 72688787, 930704832, 179668299, 861726583, 168665810, 834696469, 672920894, 419563732, 302874180, 454615268, 934181182, 119694911, 779976833, 216225187, 244379028, 586838513, 942544272, 397970796, 155525782, 435250288, 609294947, 697035870, 790138207, 313089121, 451259481, 904475234, 15500998, 428233316, 352796372, 805867626, 355791012, 191743365, 390372515, 86113794, 224579645, 34292553, 472538607, 244805809, 799547326, 350596592, 550928379, 248605526, 858957317, 809083222, 418025439, 717379009, 843111164, 748566980, 795763411, 344249103, 246799165, 468081584, 533360568, 97839725, 814208152, 370784820, 149643652, 648814350, 586462723, 179226570, 323415874, 413399345, 830824722, 901264775, 785155020, 673315179, 883230707, 320461657, 209574161, 896187167, 641537195, 580708044, 615201169, 907420567, 226969633, 44823693, 653925850, 618905940, 556249274, 683808190, 595045606, 406684866, 817926872, 498013040, 741888764, 255307898, 750076370, 226664326, 45791371, 138249186, 182084615, 925519009, 32002450, 507648904, 36302093, 164244320, 134446595, 176304234, 443232913, 204696272, 377207389, 330407781, 317016375, 255990328, 346121343, 776903928, 865285835, 180645765, 94169320, 523805568, 66571932, 958229276, 706032441, 157122799, 174128102, 265560802, 960871567, 814597354, 840895548, 702037, 848074074, 17426708, 276377856, 55696613, 206160180, 32721003, 453495162, 587538197, 204676036, 610254246, 936113705, 842825687, 202272844, 145230437, 624393323, 739106533, 700708897, 523328161, 691038973, 656087189, 213848962, 927815456, 921255504, 609475698, 113463094, 529085932, 807792149, 579407091, 163833313, 694176222, 471399591, 346973697, 718259544, 297359882, 892552532, 451373341, 120883534, 8029910, 624607649, 606649877, 815313728, 231664869, 673443919, 615486405, 94571095, 110823650, 950289120, 646876432, 928906934, 684469503, 297251947, 919054473, 285157267, 967739040, 274416446, 465229888, 656873003, 825576691, 53305194, 539107135, 609069516, 669008004, 585520763, 526072937, 91836656, 101778461, 538228891, 424599066, 719851020, 234795290, 701214554, 914481398, 497763115, 504286064, 212679726, 409710596, 134500525, 154608785, 554889670, 267547678, 851784437, 749366191, 681515762, 587313005, 604179607, 297539881, 51380469, 30897443, 988568867, 430543091, 168358864, 325894509, 131217074, 122226126, 289735266, 2541560, 697428098, 339809826, 339814711, 568813016, 256466301, 865405619, 710940331, 7424767, 660900037, 729644940, 444, 450105203, 690939247, 459755659, 92556107, 42398758, 782901298, 483436309, 73995240, 784415989, 602791285, 655683750, 744368335, 684929720, 939318197, 1937536, 94209990, 544006669, 195169186, 297173575, 151918090, 559870646, 425964491, 818978660, 571568643, 60393204, 415731654, 547756555, 991386612, 383053326, 997830526, 963081859, 107336308, 898219937, 906988404, 550036125, 981857264, 691293427, 481189647, 501756531, 316529056, 476096058, 168221459, 165690115, 553028411, 960794528, 453386272, 963889156, 71983103, 494867184, 462967097, 635240847, 989817132, 23786457, 968645733, 163475174, 884798755, 971346358, 8231228, 947835970, 751371876, 21594745, 702982989, 997528759, 30899466, 874470660, 839706683, 64336797, 183002010, 415355406, 851375333, 802315034, 662347966, 459017349, 83113197, 807783874, 686211775, 665742332, 548408223, 38712773, 947065654, 224142524, 544199777, 554457822, 161813447, 59932464, 324817969, 826816639, 159675767, 610260222, 802832692, 962264291, 230527850, 654881259, 493134625, 56109407, 491401533, 163680598, 892934948, 889185132, 78662275, 741528574, 616484511, 204394884, 120980232, 4959172, 884202370, 468625389, 987185268, 797914336, 292935354, 542176515, 965256954, 25044127, 701524209, 669825969, 264620823, 983915826, 463815578, 325409981, 142164710, 946513145, 626025918, 890502327, 456729879, 921471703, 889764153, 10834930, 550258959, 888111963, 456661896, 560525119, 254574198, 379302005, 359197537, 748972811, 432885247, 174603143, 495215302, 304225805, 499574, 89067439, 956588800, 479903186, 900293862, 918419160, 874312513, 779518268, 750190343, 34999197, 204187488, 29703716, 310295240, 212734818, 705461990, 880565621, 542764103, 578132976, 871657196, 920555643, 635330221, 603836039, 905337022, 446003049, 531829391, 914627500, 109964459, 793773872, 883594493, 588890899, 761763418, 850946563, 47045637, 406265955, 398330580, 175033998, 98562597, 74022406, 109783010, 888406279, 62923507, 851720727, 920064661, 659715101, 731241623, 740764931, 68490942, 26861674, 832409630, 156628069, 65837301, 277330611, 504531610, 621094682, 513712789, 824543274, 863846088, 522929299, 50674845, 205053841, 391074024, 703020653, 598865065, 977680558, 126857946, 571772915, 596794646, 195429545, 328266420, 36051456, 451216030, 522276964, 948367998, 561406981, 389510759, 585943971, 108053297, 459413669, 288907310, 136029766, 802792879, 520247265, 414339912, 337619243, 597859489, 40005835, 350918, 321070418, 199829979, 141119131, 515535428, 350920730, 314377413, 808898947, 900198037, 799762368, 570476717, 244997759, 402733111, 626061442, 103647198, 938528989, 898060580, 652361018, 641847472, 149112119, 134262079, 887185896, 606038263, 859408453, 950373236, 692335861, 405660442, 565431386, 959094106, 393940636, 423632434, 612413824, 143336067, 663257107, 9730523, 471491852, 112828340, 936303905, 998673093, 55233966, 416039620, 144081002, 565258672, 539355694, 202448366, 14002378, 539019751, 307827209, 288622328, 788194350, 570120788, 965430343, 472467292}; k /= 2; int id = 0; FOR(i, 1, n + 1) { int sum = 0, now = i - 1; FOR(j, 1, i + 1) sum += abs(now), now -= 2; sum /= 2; if (i == n) { if (k > sum) cout << 0 << endl; else { id += k; cout << a[id] << endl; } return 0; } else id += sum + 1; // debug(id); } return 0; }
replace
1,922
1,924
1,922
1,928
0
p02974
C++
Runtime Error
#include <cstdint> #include <cstdlib> #include <iostream> template <typename T> void fin(T const &t) { std::cout << t << std::endl; exit(0); } // mint int64_t const MOD = 1e9 + 7; template <int64_t Prime> struct mod_int { int64_t v_; mod_int(int64_t x = 0) : v_(x) { normalize(); } void normalize() { ((v_ %= Prime) += Prime) %= Prime; } mod_int operator+=(mod_int const &r) { (v_ += r.v_) %= Prime; return *this; } mod_int operator-=(mod_int const &r) { (v_ += Prime - r.v_) %= Prime; return *this; } mod_int operator*=(mod_int const &r) { (v_ *= r.v_) %= Prime; return *this; } mod_int operator+(mod_int const &r) { mod_int res(*this); return res += r; } mod_int operator-(mod_int const &r) { mod_int res(*this); return res -= r; } mod_int operator*(mod_int const &r) { mod_int res(*this); return res *= r; } mod_int pow(int x) const { int64_t res = 1, v = v_; while (x > 0) { if (x & 1) (res *= v) %= Prime; x /= 2; (v *= v) %= Prime; } return mod_int(res); } mod_int inv() const { return pow(Prime - 2); } }; typedef mod_int<MOD> mint; // optional template <typename T> struct optional { bool valid; T v_; optional() : valid(false) {} optional &operator=(T const &v) { v_ = v; valid = true; return *this; } T &operator*() { return v_; } T const &operator*() const { return v_; } }; int const MAXN = 50; int const MAXK = MAXN * MAXN; optional<mint> dp[MAXN][MAXN][MAXK]; mint calc(int i, int j, int k) { if (dp[i][j][k].valid) return *dp[i][j][k]; mint res; int new_k = k - j - j; if (new_k >= 0 && i >= 1) { if (i - 1 >= j) res += mint(j + j + 1) * calc(i - 1, j, new_k); if (i - 2 >= j) res += mint(j + 1) * (j + 1) * calc(i - 1, j + 1, new_k); if (i >= j && j >= 1) res += calc(i - 1, j - 1, new_k); } return *(dp[i][j][k] = res); } int main() { int n, k; std::cin >> n >> k; dp[0][0][0] = 1; fin(calc(n, 0, k).v_); return 0; }
#include <cstdint> #include <cstdlib> #include <iostream> template <typename T> void fin(T const &t) { std::cout << t << std::endl; exit(0); } // mint int64_t const MOD = 1e9 + 7; template <int64_t Prime> struct mod_int { int64_t v_; mod_int(int64_t x = 0) : v_(x) { normalize(); } void normalize() { ((v_ %= Prime) += Prime) %= Prime; } mod_int operator+=(mod_int const &r) { (v_ += r.v_) %= Prime; return *this; } mod_int operator-=(mod_int const &r) { (v_ += Prime - r.v_) %= Prime; return *this; } mod_int operator*=(mod_int const &r) { (v_ *= r.v_) %= Prime; return *this; } mod_int operator+(mod_int const &r) { mod_int res(*this); return res += r; } mod_int operator-(mod_int const &r) { mod_int res(*this); return res -= r; } mod_int operator*(mod_int const &r) { mod_int res(*this); return res *= r; } mod_int pow(int x) const { int64_t res = 1, v = v_; while (x > 0) { if (x & 1) (res *= v) %= Prime; x /= 2; (v *= v) %= Prime; } return mod_int(res); } mod_int inv() const { return pow(Prime - 2); } }; typedef mod_int<MOD> mint; // optional template <typename T> struct optional { bool valid; T v_; optional() : valid(false) {} optional &operator=(T const &v) { v_ = v; valid = true; return *this; } T &operator*() { return v_; } T const &operator*() const { return v_; } }; int const MAXN = 50; int const MAXK = MAXN * MAXN; optional<mint> dp[MAXN + 1][MAXN + 1][MAXK + 1]; mint calc(int i, int j, int k) { if (dp[i][j][k].valid) return *dp[i][j][k]; mint res; int new_k = k - j - j; if (new_k >= 0 && i >= 1) { if (i - 1 >= j) res += mint(j + j + 1) * calc(i - 1, j, new_k); if (i - 2 >= j) res += mint(j + 1) * (j + 1) * calc(i - 1, j + 1, new_k); if (i >= j && j >= 1) res += calc(i - 1, j - 1, new_k); } return *(dp[i][j][k] = res); } int main() { int n, k; std::cin >> n >> k; dp[0][0][0] = 1; fin(calc(n, 0, k).v_); return 0; }
replace
70
71
70
71
127
/tmp/25238b23-6a43-49c7-a44c-2a70cfc065d4.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
p02974
C++
Runtime Error
#include <bits/stdc++.h> #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; i++) #define FORR(i, n) for (ll i = (ll)n - 1LL; i >= 0LL; i--) #define rep(i, n) FOR(i, 0, n) #define ALL(x) ((x).begin(), (x).end()) using namespace std; using ll = long long; template <typename T> using V = vector<T>; constexpr int Mod = 998244353; constexpr int mod = 1e9 + 7; constexpr ll inf = 1LL << 60; template <typename T> constexpr bool chmax(T &a, const T &b) { if (a >= b) return false; a = b; return true; } template <typename T> constexpr bool chmin(T &a, const T &b) { if (a <= b) return false; a = b; return true; } /*-------------------------------------------*/ template <int M> class ModInt { int x; public: constexpr ModInt() : x(0) {} constexpr ModInt(int64_t y) : x(y >= 0 ? y % M : (M - (-y) % M) % M) {} constexpr ModInt &operator+=(const ModInt &p) { if ((x += p.x) >= M) x -= M; return *this; } constexpr ModInt &operator-=(const ModInt &p) { if ((x += M - p.x) >= M) x -= M; return *this; } constexpr ModInt &operator*=(const ModInt &p) { x = (int)(1LL * x * p.x % M); return *this; } constexpr ModInt &operator/=(const ModInt &p) { *this *= p.inverse(); return *this; } constexpr ModInt operator-() const { return ModInt(-x); } constexpr ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; } constexpr ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; } constexpr ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; } constexpr ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; } constexpr bool operator==(const ModInt &p) const { return x == p.x; } constexpr bool operator!=(const ModInt &p) const { return x != p.x; } constexpr ModInt inverse() const { int a = x, b = M, u = 1, v = 0, t = 0; while (b > 0) { t = a / b; swap(a -= t * b, b); swap(u -= t * v, v); } return ModInt(u); } constexpr ModInt pow(const int64_t &n) const { ModInt ret(1), mul(x); int64_t k = n % (M - 1); if (k < 0) k += M - 1; while (k > 0) { if (k & 1) ret *= mul; mul *= mul; k >>= 1; } return ret; } constexpr friend ostream &operator<<(ostream &os, const ModInt &p) { return os << p.x; } constexpr friend istream &operator>>(istream &is, ModInt &a) { int64_t t = 0; is >> t; a = ModInt(t); return (is); } }; using modint = ModInt<mod>; int main() { cin.tie(0); ios::sync_with_stdio(0); int n, k; cin >> n >> k; V<V<V<modint>>> dp(n + 1, V<V<modint>>(n, V<modint>(k + 1))); dp[0][0][0] = 1; rep(i, n) rep(j, n) FOR(l, j * 2, k + 1) { dp[i + 1][j][l] = dp[i][j][l - 2 * j] * (2 * j + 1); dp[i + 1][j][l] += dp[i][j + 1][l - 2 * j] * (j + 1) * (j + 1); if (j) dp[i + 1][j][l] += dp[i][j - 1][l - 2 * j]; } cout << dp[n][0][k] << endl; return 0; }
#include <bits/stdc++.h> #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; i++) #define FORR(i, n) for (ll i = (ll)n - 1LL; i >= 0LL; i--) #define rep(i, n) FOR(i, 0, n) #define ALL(x) ((x).begin(), (x).end()) using namespace std; using ll = long long; template <typename T> using V = vector<T>; constexpr int Mod = 998244353; constexpr int mod = 1e9 + 7; constexpr ll inf = 1LL << 60; template <typename T> constexpr bool chmax(T &a, const T &b) { if (a >= b) return false; a = b; return true; } template <typename T> constexpr bool chmin(T &a, const T &b) { if (a <= b) return false; a = b; return true; } /*-------------------------------------------*/ template <int M> class ModInt { int x; public: constexpr ModInt() : x(0) {} constexpr ModInt(int64_t y) : x(y >= 0 ? y % M : (M - (-y) % M) % M) {} constexpr ModInt &operator+=(const ModInt &p) { if ((x += p.x) >= M) x -= M; return *this; } constexpr ModInt &operator-=(const ModInt &p) { if ((x += M - p.x) >= M) x -= M; return *this; } constexpr ModInt &operator*=(const ModInt &p) { x = (int)(1LL * x * p.x % M); return *this; } constexpr ModInt &operator/=(const ModInt &p) { *this *= p.inverse(); return *this; } constexpr ModInt operator-() const { return ModInt(-x); } constexpr ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; } constexpr ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; } constexpr ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; } constexpr ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; } constexpr bool operator==(const ModInt &p) const { return x == p.x; } constexpr bool operator!=(const ModInt &p) const { return x != p.x; } constexpr ModInt inverse() const { int a = x, b = M, u = 1, v = 0, t = 0; while (b > 0) { t = a / b; swap(a -= t * b, b); swap(u -= t * v, v); } return ModInt(u); } constexpr ModInt pow(const int64_t &n) const { ModInt ret(1), mul(x); int64_t k = n % (M - 1); if (k < 0) k += M - 1; while (k > 0) { if (k & 1) ret *= mul; mul *= mul; k >>= 1; } return ret; } constexpr friend ostream &operator<<(ostream &os, const ModInt &p) { return os << p.x; } constexpr friend istream &operator>>(istream &is, ModInt &a) { int64_t t = 0; is >> t; a = ModInt(t); return (is); } }; using modint = ModInt<mod>; int main() { cin.tie(0); ios::sync_with_stdio(0); int n, k; cin >> n >> k; V<V<V<modint>>> dp(n + 1, V<V<modint>>(n + 1, V<modint>(k + 1))); dp[0][0][0] = 1; rep(i, n) rep(j, n) FOR(l, j * 2, k + 1) { dp[i + 1][j][l] = dp[i][j][l - 2 * j] * (2 * j + 1); dp[i + 1][j][l] += dp[i][j + 1][l - 2 * j] * (j + 1) * (j + 1); if (j) dp[i + 1][j][l] += dp[i][j - 1][l - 2 * j]; } cout << dp[n][0][k] << endl; return 0; }
replace
107
108
107
108
0
p02974
C++
Runtime Error
#include <bits/stdc++.h> #define MIN_INT -2147483648 #define MAX_INT 2147483647 #define MIN_LONG -9223372036854775808L #define MAX_LONG 9223372036854775807L #define long long long int using namespace std; // @author: pashka const long MOD = 1000000007; int main() { ios::sync_with_stdio(false); int n, k; cin >> n >> k; vector<vector<long>> d(2 * n * n, vector<long>(n + 1)); vector<vector<long>> dd(2 * n * n, vector<long>(n + 1)); d[n * n][0] = 1; for (int i = 0; i < n; i++) { for (int q = 0; q < 2 * n * n; q++) { for (int c = 0; c <= n; c++) { dd[q][c] = 0; } } // cout << i << "\n"; for (int q = 0; q < 2 * n * n; q++) { for (int c = 0; c <= n; c++) { if (d[q][c] == 0) continue; // cout << q << " " << c << " " << d[q][c] << "\n"; dd[q - i - i][c + 1] += d[q][c]; dd[q - i - i][c + 1] %= MOD; dd[q][c] += d[q][c]; dd[q][c] %= MOD; if (c > 0) { dd[q + i + i][c - 1] += d[q][c] * c * c; dd[q + i + i][c - 1] %= MOD; dd[q][c] += d[q][c] * c * 2; dd[q][c] %= MOD; } } } swap(d, dd); } // cout << n << "\n"; // for (int q = 0; q < 2 * n * n; q++) { // for (int c = 0; c <= n; c++) { // if (d[q][c] == 0) continue; // cout << q << " " << c << " " << d[q][c] << "\n"; // } // } cout << d[n * n + k][0] << "\n"; return 0; }
#include <bits/stdc++.h> #define MIN_INT -2147483648 #define MAX_INT 2147483647 #define MIN_LONG -9223372036854775808L #define MAX_LONG 9223372036854775807L #define long long long int using namespace std; // @author: pashka const long MOD = 1000000007; int main() { ios::sync_with_stdio(false); int n, k; cin >> n >> k; vector<vector<long>> d(2 * n * n + 1, vector<long>(n + 1)); vector<vector<long>> dd(2 * n * n + 1, vector<long>(n + 1)); d[n * n][0] = 1; for (int i = 0; i < n; i++) { for (int q = 0; q < 2 * n * n; q++) { for (int c = 0; c <= n; c++) { dd[q][c] = 0; } } // cout << i << "\n"; for (int q = 0; q < 2 * n * n; q++) { for (int c = 0; c <= n; c++) { if (d[q][c] == 0) continue; // cout << q << " " << c << " " << d[q][c] << "\n"; dd[q - i - i][c + 1] += d[q][c]; dd[q - i - i][c + 1] %= MOD; dd[q][c] += d[q][c]; dd[q][c] %= MOD; if (c > 0) { dd[q + i + i][c - 1] += d[q][c] * c * c; dd[q + i + i][c - 1] %= MOD; dd[q][c] += d[q][c] * c * 2; dd[q][c] %= MOD; } } } swap(d, dd); } // cout << n << "\n"; // for (int q = 0; q < 2 * n * n; q++) { // for (int c = 0; c <= n; c++) { // if (d[q][c] == 0) continue; // cout << q << " " << c << " " << d[q][c] << "\n"; // } // } cout << d[n * n + k][0] << "\n"; return 0; }
replace
20
22
20
22
0
p02974
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int, int>; using vi = vector<int>; using vvi = vector<vector<int>>; using vll = vector<ll>; using vvll = vector<vector<ll>>; const double eps = 1e-10; const int MOD = 1000000007; const int INF = 1000000000; const ll LINF = 1ll << 50; template <typename T> void printv(const vector<T> &s) { for (int i = 0; i < (int)(s.size()); ++i) { cout << s[i]; if (i == (int)(s.size()) - 1) cout << endl; else cout << " "; } } int main() { cin.tie(0); cout << fixed << setprecision(10); ll n, m; cin >> n >> m; vector<vvll> dp(n + 1, vvll(n + 1, vll(m + 1, 0))); dp[0][0][0] = 1; for (int i = 0; i < n; ++i) { for (int j = 0; j <= n; ++j) { for (int k = 0; k <= m; ++k) { int tmpk = k + 2 * j; if (0 <= tmpk && tmpk <= m) { dp[i + 1][j][tmpk] += dp[i][j][k]; dp[i + 1][j][tmpk] %= MOD; dp[i + 1][j + 1][tmpk] += dp[i][j][k]; dp[i + 1][j + 1][tmpk] %= MOD; dp[i + 1][j][tmpk] += j * dp[i][j][k] % MOD; dp[i + 1][j][tmpk] %= MOD; if (j > 0) dp[i + 1][j - 1][tmpk] += j * j % MOD * dp[i][j][k] % MOD; if (j > 0) dp[i + 1][j - 1][tmpk] %= MOD; dp[i + 1][j][tmpk] += j * dp[i][j][k] % MOD; dp[i + 1][j][tmpk] %= MOD; } } } } cout << dp[n][0][m] << endl; }
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<int, int>; using vi = vector<int>; using vvi = vector<vector<int>>; using vll = vector<ll>; using vvll = vector<vector<ll>>; const double eps = 1e-10; const int MOD = 1000000007; const int INF = 1000000000; const ll LINF = 1ll << 50; template <typename T> void printv(const vector<T> &s) { for (int i = 0; i < (int)(s.size()); ++i) { cout << s[i]; if (i == (int)(s.size()) - 1) cout << endl; else cout << " "; } } int main() { cin.tie(0); cout << fixed << setprecision(10); ll n, m; cin >> n >> m; vector<vvll> dp(n + 1, vvll(n + 2, vll(m + 1, 0))); dp[0][0][0] = 1; for (int i = 0; i < n; ++i) { for (int j = 0; j <= n; ++j) { for (int k = 0; k <= m; ++k) { int tmpk = k + 2 * j; if (0 <= tmpk && tmpk <= m) { dp[i + 1][j][tmpk] += dp[i][j][k]; dp[i + 1][j][tmpk] %= MOD; dp[i + 1][j + 1][tmpk] += dp[i][j][k]; dp[i + 1][j + 1][tmpk] %= MOD; dp[i + 1][j][tmpk] += j * dp[i][j][k] % MOD; dp[i + 1][j][tmpk] %= MOD; if (j > 0) dp[i + 1][j - 1][tmpk] += j * j % MOD * dp[i][j][k] % MOD; if (j > 0) dp[i + 1][j - 1][tmpk] %= MOD; dp[i + 1][j][tmpk] += j * dp[i][j][k] % MOD; dp[i + 1][j][tmpk] %= MOD; } } } } cout << dp[n][0][m] << endl; }
replace
26
27
26
27
0
p02974
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using VS = vector<string>; using LL = long long; using VI = vector<int>; using VVI = vector<VI>; using PII = pair<int, int>; using PLL = pair<LL, LL>; using VL = vector<LL>; using VVL = vector<VL>; #define ALL(a) begin((a)), end((a)) #define RALL(a) (a).rbegin(), (a).rend() #define SZ(a) int((a).size()) #define SORT(c) sort(ALL((c))) #define RSORT(c) sort(RALL((c))) #define UNIQ(c) (c).erase(unique(ALL((c))), end((c))) #define FOR(i, s, e) for (int(i) = (s); (i) < (e); (i)++) #define FORR(i, s, e) for (int(i) = (s); (i) > (e); (i)--) // #pragma GCC optimize ("-O3") #ifdef YANG33 #include "mydebug.hpp" #else #define DD(x) #endif const int INF = 1e9; const LL LINF = 1e16; const LL MOD = 1000000007; const double PI = acos(-1.0); /* ----- 2019/07/20 Problem: ABC 134 F / Link: * http://abc134.contest.atcoder.jp/tasks/abc134_f ----- */ int test(int n, int k) { vector<int> p(n); iota(p.begin(), p.end(), 1); int ans = 0; do { int sum = 0; FOR(i, 0, n) { sum += abs((i + 1) - p[i]); } ans += sum == k; } while (next_permutation(p.begin(), p.end())); return ans; } void maintest() { int n; while (cin >> n, n) { FOR(k, 0, n * n + 1) { cout << test(n, k) << ", "; } cout << endl; cout << "---" << endl; } } LL str_mod(const string &s, LL mod) { LL res = 0; for (auto c : s) { res *= 10; res += (c - '0'); res %= mod; } return res; } void cap() { string i, n; vector<vector<LL>> x(51); int id = -1; while (cin >> i >> n) { if (n == "1") { id++; } if (id <= 50) x[id].push_back(str_mod(n, LL(1e9 + 7))); } cout << "map<PII,int>m={"; FOR(y, 1, 8) { int cnt = 0; for (auto it : x[y]) { cout << "{{" << y << "," << cnt * 2 << "},"; cout << "" << it << "},"; cnt++; } } cout << "};"; } // map<PII, int>m = { // {{1,0},1},{{2,0},1},{{2,2},1},{{3,0},1},{{3,2},2},{{3,4},3},{{4,0},1},{{4,2},3},{{4,4},7},{{4,6},9},{{4,8},4},{{5,0},1},{{5,2},4},{{5,4},12},{{5,6},24},{{5,8},35},{{5,10},24},{{5,12},20},{{6,0},1},{{6,2},5},{{6,4},18},{{6,6},46},{{6,8},93},{{6,10},137},{{6,12},148},{{6,14},136},{{6,16},100},{{6,18},36},{{7,0},1},{{7,2},6},{{7,4},25},{{7,6},76},{{7,8},187},{{7,10},366},{{7,12},591},{{7,14},744},{{7,16},884},{{7,18},832},{{7,20},716},{{7,22},360},{{7,24},252},{{8,0},1},{{8,2},7},{{8,4},33},{{8,6},115},{{8,8},327},{{8,10},765},{{8,12},1523},{{8,14},2553},{{8,16},3696},{{8,18},4852},{{8,20},5708},{{8,22},5892},{{8,24},5452},{{8,26},4212},{{8,28},2844},{{8,30},1764},{{8,32},576},{{9,0},1},{{9,2},8},{{9,4},42},{{9,6},164},{{9,8},524},{{9,10},1400},{{9,12},3226},{{9,14},6436},{{9,16},11323},{{9,18},17640},{{9,20},25472},{{9,22},33280},{{9,24},40520},{{9,26},44240},{{9,28},45512},{{9,30},40608},{{9,32},35496},{{9,34},25632},{{9,36},18108},{{9,38},8064},{{9,40},5184},{{10,0},1},{{10,2},9},{{10,4},52},{{10,6},224},{{10,8},790},{{10,10},2350},{{10,12},6072},{{10,14},13768},{{10,16},27821},{{10,18},50461},{{10,20},83420},{{10,22},127840},{{10,24},182256},{{10,26},242272},{{10,28},301648},{{10,30},350864},{{10,32},382576},{{10,34},389232},{{10,36},373536},{{10,38},332640},{{10,40},273060},{{10,42},208548},{{10,44},136512},{{10,46},81792},{{10,48},46656},{{10,50},14400},{{11,0},1},{{11,2},10},{{11,4},63},{{11,6},296},{{11,8},1138},{{11,10},3708},{{11,12},10538},{{11,14},26480},{{11,16},59673},{{11,18},121626},{{11,20},226787},{{11,22},390144},{{11,24},628744},{{11,26},949472},{{11,28},1355952},{{11,30},1826464},{{11,32},2341600},{{11,34},2833632},{{11,36},3282464},{{11,38},3584160},{{11,40},3765600},{{11,42},3719664},{{11,44},3531924},{{11,46},3093336},{{11,48},2642364},{{11,50},2010240},{{11,52},1508544},{{11,54},963072},{{11,56},621504},{{11,58},259200},{{11,60},158400},{{12,0},1},{{12,2},11},{{12,4},75},{{12,6},381},{{12,8},1582},{{12,10},5582},{{12,12},17222},{{12,14},47194},{{12,16},116457},{{12,18},261163},{{12,20},537459},{{12,22},1022981},{{12,24},1817652},{{12,26},3040352},{{12,28},4810720},{{12,30},7230928},{{12,32},10360160},{{12,34},14178912},{{12,36},18577792},{{12,38},23327872},{{12,40},28132048},{{12,42},32571504},{{12,44},36310464},{{12,46},38903904},{{12,48},40028724},{{12,50},39552156},{{12,52},37457388},{{12,54},33941412},{{12,56},29314944},{{12,58},24179904},{{12,60},18835776},{{12,62},13777344},{{12,64},9452736},{{12,66},5716800},{{12,68},3211200},{{12,70},1742400},{{12,72},518400},{{13,0},1},{{13,2},12},{{13,4},88},{{13,6},480},{{13,8},2137},{{13,10},8096},{{13,12},26860},{{13,14},79376},{{13,16},211811},{{13,18},515308},{{13,20},1153268},{{13,22},2391936},{{13,24},4633331},{{13,26},8438664},{{13,28},14557048},{{13,30},23874176},{{13,32},37407760},{{13,34},56117824},{{13,36},80906752},{{13,38},112162240},{{13,40},150052400},{{13,42},193572736},{{13,44},241706624},{{13,46},291576384},{{13,48},341323776},{{13,50},386160048},{{13,52},424359540},{{13,54},450394992},{{13,56},464545584},{{13,58},461528208},{{13,60},446428476},{{13,62},413557632},{{13,64},373573440},{{13,66},321120000},{{13,68},268449408},{{13,70},210332160},{{13,72},162330624},{{13,74},112550400},{{13,76},77788800},{{13,78},46540800},{{13,80},28497600},{{13,82},11404800},{{13,84},6739200},{{14,0},1},{{14,2},13},{{14,4},102},{{14,6},594},{{14,8},2819},{{14,10},11391},{{14,12},40344},{{14,14},127508},{{14,16},364587},{{14,18},952559},{{14,20},2293742},{{14,22},5126898},{{14,24},10710633},{{14,26},21042989},{{14,28},39117852},{{14,30},69175664},{{14,32},116857024},{{14,34},189256368},{{14,36},294745440},{{14,38},442503456},{{14,40},641759376},{{14,42},900689616},{{14,44},225195321},{{14,46},617201401},{{14,48},74227554},{{14,50},586823330},{{14,52},140227131},{{14,54},711888699},{{14,56},274217080},{{14,58},795069832},{{14,60},242715461},{{14,62},585116357},{{14,64},796764497},{{14,66},861974465},{{14,68},769155485},{{14,70},525176285},{{14,72},146566301},{{14,74},650715556},{{14,76},73773796},{{14,78},455145195},{{14,80},828946802},{{14,82},226153586},{{14,84},685663993},{{14,86},216281593},{{14,88},828705600},{{14,90},536385600},{{14,92},309484800},{{14,94},166924800},{{14,96},87609600},{{14,98},25401600},{{15,0},1},{{15,2},14},{{15,4},117},{{15,6},724},{{15,8},3645},{{15,10},15626},{{15,12},58741},{{15,14},197280},{{15,16},600215},{{15,18},1671266},{{15,20},4295107},{{15,22},10259436},{{15,24},22922995},{{15,26},48184950},{{15,28},95816051},{{15,30},181136304},{{15,32},327071752},{{15,34},566117888},{{15,36},942525072},{{15,38},513281017},{{15,40},349163810},{{15,42},532145419},{{15,44},154557773},{{15,46},309226767},{{15,48},88509354},{{15,50},563257605},{{15,52},789064441},{{15,54},766807654},{{15,56},474675580},{{15,58},795689314},{{15,60},599134613},{{15,62},627066840},{{15,64},658988947},{{15,66},307608398},{{15,68},337632800},{{15,70},295701193},{{15,72},44870369},{{15,74},150212311},{{15,76},705302359},{{15,78},336038622},{{15,80},452522163},{{15,82},797367958},{{15,84},62674553},{{15,86},57993322},{{15,88},777736994},{{15,90},845298906},{{15,92},452367755},{{15,94},90655804},{{15,96},810196653},{{15,98},976943895},{{15,100},564798323},{{15,102},582118351},{{15,104},994783972},{{15,106},869862386},{{15,108},697759993},{{15,110},660441600},{{15,112},381024000},{{16,0},1},{{16,2},15},{{16,4},133},{{16,6},871},{{16,8},4633},{{16,10},20979},{{16,12},83313},{{16,14},295803},{{16,16},952299},{{16,18},2809009},{{16,20},7656027},{{16,22},19414457},{{16,24},46086247},{{16,26},102967901},{{16,28},217634463},{{16,30},437195525},{{16,32},838372452},{{16,34},540635289},{{16,36},722168530},{{16,38},638311860},{{16,40},640827391},{{16,42},196046908},{{16,44},898688562},{{16,46},478199884},{{16,48},793020369},{{16,50},808862771},{{16,52},562236075},{{16,54},94791602},{{16,56},385333320},{{16,58},237794527},{{16,60},197694759},{{16,62},398043392},{{16,64},504456766},{{16,66},579736664},{{16,68},78137089},{{16,70},793367253},{{16,72},961295251},{{16,74},280517488},{{16,76},179779783},{{16,78},947563092},{{16,80},901772777},{{16,82},859566930},{{16,84},199212409},{{16,86},920781370},{{16,88},362900807},{{16,90},735004334},{{16,92},297264154},{{16,94},482748036},{{16,96},653703312},{{16,98},140400674},{{16,100},623159781},{{16,102},320434095},{{16,104},373194802},{{16,106},13313867},{{16,108},205909676},{{16,110},360223815},{{16,112},570584277},{{16,114},68075848},{{16,116},372652149},{{16,118},961247580},{{16,120},23084534},{{16,122},261139053},{{16,124},151302323},{{16,126},715359965},{{16,128},625702393},{{17,0},1},{{17,2},16},{{17,4},150},{{17,6},1036},{{17,8},5802},{{17,10},27648},{{17,12},115538},{{17,14},431844},{{17,16},1464468},{{17,18},4554040},{{17,20},13096378},{{17,22},35069940},{{17,24},87969166},{{17,26},207781760},{{17,28},464351910},{{17,30},986188668},{{17,32},998611836},{{17,34},879505923},{{17,36},237509223},{{17,38},15110629},{{17,40},621334822},{{17,42},88677622},{{17,44},257578542},{{17,46},963016850},{{17,48},235638961},{{17,50},442107823},{{17,52},429101453},{{17,54},483004748},{{17,56},329733855},{{17,58},718448185},{{17,60},266304376},{{17,62},413950543},{{17,64},256286771},{{17,66},626720357},{{17,68},318467482},{{17,70},59069608},{{17,72},81901162},{{17,74},352730851},{{17,76},104241055},{{17,78},503595237},{{17,80},956355036},{{17,82},534522134},{{17,84},457799859},{{17,86},108929893},{{17,88},887297322},{{17,90},424614770},{{17,92},265024591},{{17,94},876853471},{{17,96},515703045},{{17,98},692038809},{{17,100},210906163},{{17,102},20070317},{{17,104},468291405},{{17,106},145357835},{{17,108},797577421},{{17,110},232358134},{{17,112},747771239},{{17,114},343859985},{{17,116},833879609},{{17,118},78548665},{{17,120},289896769},{{17,122},449285934},{{17,124},313197004},{{17,126},379603290},{{17,128},397630660},{{17,130},609910102},{{17,132},442642726},{{17,134},627950853},{{17,136},722186028},{{17,138},705163253},{{17,140},998661511},{{17,142},771071664},{{17,144},636940611},{{18,0},1},{{18,2},17},{{18,4},168},{{18,6},1220},{{18,8},7172},{{18,10},35852},{{18,12},157132},{{18,14},616084},{{18,16},2192506},{{18,18},7159090},{{18,20},21631676},{{18,22},60902460},{{18,24},160707468},{{18,26},399489140},{{18,28},939796228},{{18,30},101060910},{{18,32},481320121},{{18,34},151453550},{{18,36},952463061},{{18,38},931694473},{{18,40},957528293},{{18,42},554162053},{{18,44},990142499},{{18,46},644946993},{{18,48},651797781},{{18,50},791594351},{{18,52},556120466},{{18,54},271969917},{{18,56},107619398},{{18,58},710253075},{{18,60},280526462},{{18,62},615698879},{{18,64},99748930},{{18,66},775178221},{{18,68},257586036},{{18,70},645364809},{{18,72},806795120},{{18,74},340635512},{{18,76},801741075},{{18,78},790520661},{{18,80},68328385},{{18,82},331513794},{{18,84},351728404},{{18,86},931812262},{{18,88},91105169},{{18,90},176869824},{{18,92},445724501},{{18,94},370449983},{{18,96},359815736},{{18,98},918724628},{{18,100},869062973},{{18,102},659791249},{{18,104},657727222},{{18,106},395793733},{{18,108},32692523},{{18,110},78858425},{{18,112},151369211},{{18,114},628504487},{{18,116},842750087},{{18,118},152091477},{{18,120},889718876},{{18,122},908002421},{{18,124},944598446},{{18,126},656459208},{{18,128},712920845},{{18,130},47550280},{{18,132},92244967},{{18,134},110652620},{{18,136},951703750},{{18,138},217822851},{{18,140},901098263},{{18,142},655149074},{{18,144},861896271},{{18,146},859184013},{{18,148},992613245},{{18,150},768042116},{{18,152},807916959},{{18,154},335381553},{{18,156},909568095},{{18,158},153171069},{{18,160},827990317},{{18,162},681893483},{{19,0},1},{{19,2},18},{{19,4},187},{{19,6},1424},{{19,8},8764},{{19,10},45832},{{19,12},210072},{{19,14},861400},{{19,16},3206786},{{19,18},10957868},{{19,20},34666130},{{19,22},102239488},{{19,24},282743580},{{19,26},736889224},{{19,28},817936097},{{19,30},262532028},{{19,32},534038590},{{19,34},412279142},{{19,36},965109380},{{19,38},86702267},{{19,40},846482566},{{19,42},945052509},{{19,44},644517943},{{19,46},548776024},{{19,48},679330947},{{19,50},152291502},{{19,52},882910517},{{19,54},188127435},{{19,56},636778925},{{19,58},902059202},{{19,60},132531208},{{19,62},193904122},{{19,64},893705022},{{19,66},246193070},{{19,68},652079051},{{19,70},958060250},{{19,72},148697872},{{19,74},504141990},{{19,76},371410212},{{19,78},807466717},{{19,80},514477363},{{19,82},565424570},{{19,84},560794838},{{19,86},11419155},{{19,88},215137208},{{19,90},665710713},{{19,92},791504234},{{19,94},359367396},{{19,96},224050172},{{19,98},509091270},{{19,100},125989128},{{19,102},782600310},{{19,104},957126038},{{19,106},667219607},{{19,108},386301613},{{19,110},605448653},{{19,112},296557741},{{19,114},618019404},{{19,116},194294675},{{19,118},222923480},{{19,120},765962783},{{19,122},743934970},{{19,124},24324611},{{19,126},512643153},{{19,128},214242880},{{19,130},286900578},{{19,132},228877964},{{19,134},91240846},{{19,136},430467141},{{19,138},533029377},{{19,140},904804693},{{19,142},373207899},{{19,144},916503101},{{19,146},83598539},{{19,148},560288494},{{19,150},363356684},{{19,152},68282446},{{19,154},152683809},{{19,156},284461190},{{19,158},124425011},{{19,160},167972327},{{19,162},428909487},{{19,164},373215034},{{19,166},420008537},{{19,168},513304383},{{19,170},874743039},{{19,172},487193257},{{19,174},97337408},{{19,176},532639641},{{19,178},184378261},{{19,180},955976093},{{20,0},1},{{20,2},19},{{20,4},207},{{20,6},1649},{{20,8},10600},{{20,10},57852},{{20,12},276620},{{20,14},1183172},{{20,16},4595034},{{20,18},16384606},{{20,20},54107670},{{20,22},166643130},{{20,24},481442164},{{20,26},311240781},{{20,28},381378831},{{20,30},288429444},{{20,32},380463632},{{20,34},370477330},{{20,36},171662912},{{20,38},688513797},{{20,40},626045604},{{20,42},789881798},{{20,44},844990830},{{20,46},70546834},{{20,48},230422087},{{20,50},267733218},{{20,52},970080423},{{20,54},75064762},{{20,56},104073936},{{20,58},888990608},{{20,60},393490487},{{20,62},819401315},{{20,64},362017415},{{20,66},197941501},{{20,68},97730360},{{20,70},491049732},{{20,72},790022455},{{20,74},142301163},{{20,76},381999002},{{20,78},81566974},{{20,80},255547256},{{20,82},500580164},{{20,84},503785886},{{20,86},874661360},{{20,88},953064009},{{20,90},357278689},{{20,92},416715628},{{20,94},656421867},{{20,96},311332859},{{20,98},849655408},{{20,100},575613107},{{20,102},850236831},{{20,104},533549113},{{20,106},255339339},{{20,108},611845477},{{20,110},501164398},{{20,112},135987981},{{20,114},672393680},{{20,116},678611757},{{20,118},552403430},{{20,120},470027818},{{20,122},333312311},{{20,124},203812034},{{20,126},929380798},{{20,128},133842121},{{20,130},497262544},{{20,132},839881753},{{20,134},29703780},{{20,136},133717366},{{20,138},249364505},{{20,140},959337844},{{20,142},632980495},{{20,144},72879056},{{20,146},356819838},{{20,148},662140760},{{20,150},182352973},{{20,152},260787823},{{20,154},329159184},{{20,156},423643610},{{20,158},488600943},{{20,160},164109163},{{20,162},8143787},{{20,164},184454683},{{20,166},684285006},{{20,168},693158498},{{20,170},382122550},{{20,172},488552031},{{20,174},777204359},{{20,176},564238497},{{20,178},598675373},{{20,180},603916585},{{20,182},720234840},{{20,184},93182262},{{20,186},238936257},{{20,188},486420235},{{20,190},352604922},{{20,192},958291193},{{20,194},880928218},{{20,196},736558676},{{20,198},163545641},{{20,200},189347824},{{21,0},1},{{21,2},20},{{21,4},228},{{21,6},1896},{{21,8},12703},{{21,10},72200},{{21,12},359348},{{21,14},1599616},{{21,16},6465450},{{21,18},23997032},{{21,20},82508708},{{21,22},264654080},{{21,24},796563486},{{21,26},260832418},{{21,28},76986106},{{21,30},528774007},{{21,32},854313906},{{21,34},307546108},{{21,36},722735109},{{21,38},61004626},{{21,40},805619536},{{21,42},18191861},{{21,44},511411798},{{21,46},993782454},{{21,48},401030744},{{21,50},633897378},{{21,52},70862649},{{21,54},96855526},{{21,56},314416445},{{21,58},92910833},{{21,60},135520920},{{21,62},492052755},{{21,64},24334887},{{21,66},643976444},{{21,68},574388511},{{21,70},317610455},{{21,72},122930943},{{21,74},637889505},{{21,76},255461238},{{21,78},950861369},{{21,80},48876234},{{21,82},149504663},{{21,84},198682481},{{21,86},942670278},{{21,88},866921314},{{21,90},563621302},{{21,92},960474580},{{21,94},980132644},{{21,96},624295523},{{21,98},399490883},{{21,100},351714973},{{21,102},945626033},{{21,104},827908349},{{21,106},157456205},{{21,108},481861323},{{21,110},472454109},{{21,112},343580291},{{21,114},683697065},{{21,116},95059407},{{21,118},841332348},{{21,120},464714941},{{21,122},596887160},{{21,124},38681949},{{21,126},757883329},{{21,128},590303711},{{21,130},64921694},{{21,132},730086270},{{21,134},15240461},{{21,136},714742087},{{21,138},32874447},{{21,140},175996750},{{21,142},277466516},{{21,144},788882909},{{21,146},11880203},{{21,148},95097385},{{21,150},778398376},{{21,152},531252352},{{21,154},479554466},{{21,156},557013590},{{21,158},609738833},{{21,160},798714176},{{21,162},859324339},{{21,164},721484640},{{21,166},268442938},{{21,168},861267595},{{21,170},806087188},{{21,172},31691029},{{21,174},950412807},{{21,176},580575404},{{21,178},849451646},{{21,180},691790951},{{21,182},264837637},{{21,184},967322620},{{21,186},365040170},{{21,188},622467624},{{21,190},456436788},{{21,192},658680316},{{21,194},60575186},{{21,196},387550026},{{21,198},215002020},{{21,200},31349904},{{21,202},449373833},{{21,204},559514745},{{21,206},640364153},{{21,208},807042078},{{21,210},450172023},{{21,212},562637973},{{21,214},109112418},{{21,216},545193132},{{21,218},195217263},{{21,220},976304283},{{22,0},1},{{22,2},21},{{22,4},250},{{22,6},2166},{{22,8},15097},{{22,10},89189},{{22,12},461164},{{22,14},2132144},{{22,16},8950214},{{22,18},34503182},{{22,20},123236828},{{22,22},410729140},{{22,24},284813823},{{22,26},790835929},{{22,28},594736274},{{22,30},153822108},{{22,32},374418504},{{22,34},157537842},{{22,36},147846917},{{22,38},133568389},{{22,40},483576696},{{22,42},508616649},{{22,44},656867821},{{22,46},84463125},{{22,48},640047601},{{22,50},955370715},{{22,52},182167616},{{22,54},49108700},{{22,56},229345632},{{22,58},795610484},{{22,60},502493987},{{22,62},857101031},{{22,64},142485158},{{22,66},996679960},{{22,68},742503997},{{22,70},723858587},{{22,72},317526153},{{22,74},365342533},{{22,76},250775491},{{22,78},442738912},{{22,80},408346120},{{22,82},881242865},{{22,84},135363327},{{22,86},231979623},{{22,88},347291745},{{22,90},824934645},{{22,92},995772018},{{22,94},164592917},{{22,96},354883487},{{22,98},450805745},{{22,100},963969802},{{22,102},171006181},{{22,104},92161176},{{22,106},169883419},{{22,108},961669090},{{22,110},26844445},{{22,112},393784092},{{22,114},571606470},{{22,116},464707158},{{22,118},34144520},{{22,120},652396373},{{22,122},745405475},{{22,124},202923498},{{22,126},135935314},{{22,128},703695236},{{22,130},776259115},{{22,132},48310283},{{22,134},874186699},{{22,136},219390686},{{22,138},510394758},{{22,140},751965065},{{22,142},418424556},{{22,144},8781061},{{22,146},736058807},{{22,148},674014147},{{22,150},674780706},{{22,152},590530540},{{22,154},4352977},{{22,156},803825827},{{22,158},167292329},{{22,160},541083402},{{22,162},260679638},{{22,164},665083995},{{22,166},939990721},{{22,168},816665296},{{22,170},886017767},{{22,172},669822229},{{22,174},694816125},{{22,176},643235536},{{22,178},937314556},{{22,180},115942268},{{22,182},261159535},{{22,184},687177905},{{22,186},12245758},{{22,188},694615643},{{22,190},977706180},{{22,192},217949106},{{22,194},118952653},{{22,196},898868241},{{22,198},856650616},{{22,200},42954342},{{22,202},330321980},{{22,204},535121720},{{22,206},982503521},{{22,208},719423135},{{22,210},714354007},{{22,212},18745970},{{22,214},333448882},{{22,216},302037622},{{22,218},935654015},{{22,220},778423936},{{22,222},317991952},{{22,224},284756555},{{22,226},504736970},{{22,228},155871365},{{22,230},118263505},{{22,232},797065125},{{22,234},640838446},{{22,236},258037348},{{22,238},34344762},{{22,240},502389803},{{22,242},911086550},{{23,0},1},{{23,2},22},{{23,4},273},{{23,6},2460},{{23,8},17807},{{23,10},109158},{{23,12},585339},{{23,14},2805752},{{23,16},12209406},{{23,18},48792492},{{23,20},180680070},{{23,22},624410736},{{23,24},25734764},{{23,26},199973794},{{23,28},977710523},{{23,30},571365953},{{23,32},412869707},{{23,34},328237414},{{23,36},214863466},{{23,38},633048751},{{23,40},257394955},{{23,42},317735309},{{23,44},673309005},{{23,46},193600985},{{23,48},704135816},{{23,50},514918834},{{23,52},650479735},{{23,54},33606857},{{23,56},490034801},{{23,58},698396427},{{23,60},67986999},{{23,62},220797055},{{23,64},218864611},{{23,66},931163713},{{23,68},940790978},{{23,70},675674698},{{23,72},85542051},{{23,74},543018292},{{23,76},61247584},{{23,78},910803604},{{23,80},831296179},{{23,82},923943160},{{23,84},89478028},{{23,86},104500393},{{23,88},161998091},{{23,90},254912705},{{23,92},539249258},{{23,94},547749719},{{23,96},357852173},{{23,98},690014841},{{23,100},206926249},{{23,102},893887199},{{23,104},747112232},{{23,106},382059625},{{23,108},148865046},{{23,110},301618706},{{23,112},260333115},{{23,114},442306036},{{23,116},247371284},{{23,118},782005651},{{23,120},233300621},{{23,122},920894203},{{23,124},317455792},{{23,126},678639547},{{23,128},427050277},{{23,130},482884001},{{23,132},854060466},{{23,134},980543322},{{23,136},860769666},{{23,138},701293636},{{23,140},771136168},{{23,142},670745480},{{23,144},486701027},{{23,146},168461356},{{23,148},848787800},{{23,150},289825171},{{23,152},498776317},{{23,154},33320170},{{23,156},430165721},{{23,158},821516580},{{23,160},115533370},{{23,162},398776967},{{23,164},333310602},{{23,166},563097053},{{23,168},553134182},{{23,170},219816464},{{23,172},216637272},{{23,174},206027601},{{23,176},933677337},{{23,178},925510467},{{23,180},267639197},{{23,182},43693887},{{23,184},486722546},{{23,186},270929495},{{23,188},877730912},{{23,190},261947307},{{23,192},375318068},{{23,194},692508932},{{23,196},989184491},{{23,198},226696206},{{23,200},288508969},{{23,202},739837562},{{23,204},849035543},{{23,206},782296408},{{23,208},273955665},{{23,210},801085382},{{23,212},431898190},{{23,214},935043965},{{23,216},202752072},{{23,218},867866169},{{23,220},151133676},{{23,222},67940990},{{23,224},78118516},{{23,226},742654574},{{23,228},165553271},{{23,230},254022475},{{23,232},668960857},{{23,234},929973305},{{23,236},656759571},{{23,238},877339826},{{23,240},925206924},{{23,242},133648890},{{23,244},623964326},{{23,246},796176354},{{23,248},256442424},{{23,250},844384225},{{23,252},955053908},{{23,254},35821657},{{23,256},33969824},{{23,258},328610099},{{23,260},171474448},{{23,262},265634834},{{23,264},954990510},{{24,0},1},{{24,2},23},{{24,4},297},{{24,6},2779},{{24,8},20859},{{24,10},132473},{{24,12},735535},{{24,14},3649437},{{24,16},16435370},{{24,18},67971642},{{24,20},260491974},{{24,22},931772466},{{24,24},129241853},{{24,26},915880695},{{24,28},773220207},{{24,30},21124907},{{24,32},663657824},{{24,34},89235883},{{24,36},562087424},{{24,38},395633225},{{24,40},79602143},{{24,42},818737728},{{24,44},503346111},{{24,46},923762587},{{24,48},810187543},{{24,50},71950684},{{24,52},872552891},{{24,54},722894374},{{24,56},788701216},{{24,58},792043650},{{24,60},839896539},{{24,62},577542972},{{24,64},345484502},{{24,66},350106805},{{24,68},159630680},{{24,70},594479078},{{24,72},806985602},{{24,74},451202244},{{24,76},562057157},{{24,78},345406448},{{24,80},404888318},{{24,82},371479292},{{24,84},122121086},{{24,86},196184273},{{24,88},855722413},{{24,90},625056343},{{24,92},209132008},{{24,94},580725504},{{24,96},234791519},{{24,98},683270249},{{24,100},879431955},{{24,102},820639155},{{24,104},890517789},{{24,106},877206124},{{24,108},780147370},{{24,110},943542736},{{24,112},532169988},{{24,114},134361777},{{24,116},389279830},{{24,118},486085405},{{24,120},212150153},{{24,122},60309713},{{24,124},36144061},{{24,126},220641769},{{24,128},167907687},{{24,130},433032241},{{24,132},672669299},{{24,134},4840381},{{24,136},543970499},{{24,138},860603358},{{24,140},920463673},{{24,142},899153827},{{24,144},269139419},{{24,146},99866794},{{24,148},833550296},{{24,150},732963165},{{24,152},649634036},{{24,154},220976898},{{24,156},948879986},{{24,158},81746947},{{24,160},249278044},{{24,162},943429751},{{24,164},227240067},{{24,166},617290217},{{24,168},857759442},{{24,170},317672542},{{24,172},702411387},{{24,174},392102340},{{24,176},598392406},{{24,178},771484657},{{24,180},20769431},{{24,182},772211314},{{24,184},777981688},{{24,186},103043307},{{24,188},336611982},{{24,190},922346108},{{24,192},46010568},{{24,194},620920750},{{24,196},740298345},{{24,198},143296430},{{24,200},127113300},{{24,202},229361025},{{24,204},452883985},{{24,206},298773134},{{24,208},583669967},{{24,210},430943791},{{24,212},878469881},{{24,214},498554889},{{24,216},377075156},{{24,218},399618101},{{24,220},518539100},{{24,222},610655946},{{24,224},762624102},{{24,226},339746521},{{24,228},193491143},{{24,230},582788075},{{24,232},58498274},{{24,234},139175929},{{24,236},439487543},{{24,238},659039143},{{24,240},969039085},{{24,242},205473123},{{24,244},149794944},{{24,246},735361805},{{24,248},144310487},{{24,250},952281582},{{24,252},885994682},{{24,254},290034640},{{24,256},449859219},{{24,258},870975475},{{24,260},717604104},{{24,262},930837761},{{24,264},466542500},{{24,266},510501275},{{24,268},368063612},{{24,270},61813298},{{24,272},959329905},{{24,274},938922014},{{24,276},660077190},{{24,278},12025968},{{24,280},335011033},{{24,282},657136343},{{24,284},351072920},{{24,286},964781583},{{24,288},196462283},{{25,0},1},{{25,2},24},{{25,4},322},{{25,6},3124},{{25,8},24280},{{25,10},159528},{{25,12},915834},{{25,14},4696644},{{25,16},21857553},{{25,18},93405656},{{25,20},369882084},{{25,22},367190881},{{25,24},745178532},{{25,26},541448535},{{25,28},237690972},{{25,30},408537702},{{25,32},191376116},{{25,34},678513161},{{25,36},493570976},{{25,38},397907192},{{25,40},9101765},{{25,42},658714208},{{25,44},122356973},{{25,46},514532531},{{25,48},911169029},{{25,50},6916896},{{25,52},782796},{{25,54},910119724},{{25,56},942560918},{{25,58},62371227},{{25,60},773940129},{{25,62},523667340},{{25,64},669757203},{{25,66},42568262},{{25,68},891666384},{{25,70},467022993},{{25,72},486796667},{{25,74},727294526},{{25,76},413613585},{{25,78},787453753},{{25,80},599953158},{{25,82},417187968},{{25,84},359849625},{{25,86},117069116},{{25,88},879478181},{{25,90},12380000},{{25,92},910899870},{{25,94},838986319},{{25,96},102687453},{{25,98},103327364},{{25,100},376800830},{{25,102},429223538},{{25,104},780159138},{{25,106},706916356},{{25,108},587575355},{{25,110},971169352},{{25,112},36010810},{{25,114},483798044},{{25,116},344462034},{{25,118},787276711},{{25,120},359714668},{{25,122},737585540},{{25,124},514856433},{{25,126},506547585},{{25,128},7966248},{{25,130},935961},{{25,132},931790046},{{25,134},725219981},{{25,136},437246235},{{25,138},737823353},{{25,140},539625329},{{25,142},101294921},{{25,144},998345360},{{25,146},158678756},{{25,148},14552916},{{25,150},434899855},{{25,152},58679632},{{25,154},771567929},{{25,156},908041362},{{25,158},370603042},{{25,160},958461645},{{25,162},473954165},{{25,164},329932246},{{25,166},645017860},{{25,168},950250115},{{25,170},632956030},{{25,172},39737256},{{25,174},308287817},{{25,176},593859369},{{25,178},848980890},{{25,180},73354610},{{25,182},67983312},{{25,184},794665532},{{25,186},744501399},{{25,188},571146358},{{25,190},79777328},{{25,192},768540650},{{25,194},301591668},{{25,196},87146707},{{25,198},749547055},{{25,200},542914952},{{25,202},113807115},{{25,204},981646049},{{25,206},443442346},{{25,208},689844336},{{25,210},226785366},{{25,212},664441023},{{25,214},644644459},{{25,216},65534356},{{25,218},186334852},{{25,220},433121661},{{25,222},818953887},{{25,224},687026114},{{25,226},344822747},{{25,228},464015963},{{25,230},110899493},{{25,232},294091084},{{25,234},65199948},{{25,236},37449794},{{25,238},719226153},{{25,240},501099656},{{25,242},413337315},{{25,244},725255533},{{25,246},799293560},{{25,248},259962068},{{25,250},954615054},{{25,252},373654234},{{25,254},764439094},{{25,256},914044890},{{25,258},22085466},{{25,260},539035590},{{25,262},698634111},{{25,264},313016212},{{25,266},98993468},{{25,268},941478268},{{25,270},955683335},{{25,272},902077766},{{25,274},420565422},{{25,276},767959775},{{25,278},128648986},{{25,280},355285226},{{25,282},534029655},{{25,284},104714136},{{25,286},932643222},{{25,288},778200211},{{25,290},56428536},{{25,292},225880543},{{25,294},792355687},{{25,296},449940761},{{25,298},181471652},{{25,300},529937629},{{25,302},325235521},{{25,304},6575392},{{25,306},94094707},{{25,308},441392085},{{25,310},37264955},{{25,312},911557047},{{26,0},1},{{26,2},25},{{26,4},348},{{26,6},3496},{{26,8},28098},{{26,10},190746},{{26,12},1130768},{{26,14},5985744},{{26,16},28747851},{{26,18},126764795},{{26,20},517958180},{{26,22},975500521},{{26,24},75313899},{{26,26},914923483},{{26,28},611051644},{{26,30},458281681},{{26,32},932346365},{{26,34},712529240},{{26,36},185024083},{{26,38},463834094},{{26,40},950836649},{{26,42},286357381},{{26,44},871292163},{{26,46},434939852},{{26,48},58330077},{{26,50},629835295},{{26,52},27932676},{{26,54},66354549},{{26,56},10923173},{{26,58},590226200},{{26,60},526183672},{{26,62},176005584},{{26,64},809584977},{{26,66},222348292},{{26,68},260397896},{{26,70},396327746},{{26,72},178971085},{{26,74},774808076},{{26,76},78650222},{{26,78},507195902},{{26,80},144802453},{{26,82},299847298},{{26,84},581537053},{{26,86},724817078},{{26,88},350425193},{{26,90},503589319},{{26,92},654904119},{{26,94},595937600},{{26,96},992781673},{{26,98},82554146},{{26,100},868891604},{{26,102},769490422},{{26,104},119334199},{{26,106},287573489},{{26,108},85347169},{{26,110},118147346},{{26,112},949694675},{{26,114},540939467},{{26,116},927324362},{{26,118},545027201},{{26,120},610310429},{{26,122},769058023},{{26,124},21423},{{26,126},262519735},{{26,128},786795808},{{26,130},240407039},{{26,132},428554518},{{26,134},447092428},{{26,136},788617633},{{26,138},367724192},{{26,140},374279457},{{26,142},343082569},{{26,144},856162651},{{26,146},150954733},{{26,148},962857235},{{26,150},700751807},{{26,152},895999415},{{26,154},533537747},{{26,156},537990547},{{26,158},268357366},{{26,160},869434038},{{26,162},633081543},{{26,164},603452058},{{26,166},947934680},{{26,168},987367826},{{26,170},743179254},{{26,172},710352935},{{26,174},835787228},{{26,176},706586787},{{26,178},845202323},{{26,180},238777269},{{26,182},405136472},{{26,184},480736674},{{26,186},155194042},{{26,188},871452828},{{26,190},677921910},{{26,192},616952227},{{26,194},984554304},{{26,196},602482844},{{26,198},894952109},{{26,200},161534829},{{26,202},782737895},{{26,204},850072208},{{26,206},670793244},{{26,208},828100052},{{26,210},222399146},{{26,212},284700626},{{26,214},231919567},{{26,216},306545173},{{26,218},673216888},{{26,220},772842480},{{26,222},314744315},{{26,224},347738200},{{26,226},25002680},{{26,228},730048408},{{26,230},649455506},{{26,232},745857274},{{26,234},196252843},{{26,236},529935260},{{26,238},419302767},{{26,240},276709210},{{26,242},732855171},{{26,244},343508231},{{26,246},624945362},{{26,248},861002432},{{26,250},484757974},{{26,252},367927715},{{26,254},209929226},{{26,256},661865936},{{26,258},531107025},{{26,260},413469524},{{26,262},479519565},{{26,264},741904536},{{26,266},610072165},{{26,268},606639245},{{26,270},934344602},{{26,272},716197790},{{26,274},587584177},{{26,276},185414563},{{26,278},306822687},{{26,280},841034662},{{26,282},971868532},{{26,284},919896238},{{26,286},158358640},{{26,288},773475266},{{26,290},936203252},{{26,292},665923149},{{26,294},911486615},{{26,296},197651366},{{26,298},774528535},{{26,300},82937079},{{26,302},883806524},{{26,304},130206852},{{26,306},774201811},{{26,308},995994000},{{26,310},245370199},{{26,312},842572718},{{26,314},793423605},{{26,316},740588350},{{26,318},687616120},{{26,320},657690139},{{26,322},857790226},{{26,324},37323118},{{26,326},88399209},{{26,328},523321086},{{26,330},117621631},{{26,332},71036645},{{26,334},222192424},{{26,336},788926021},{{26,338},202125596},{{27,0},1},{{27,2},26},{{27,4},375},{{27,6},3896},{{27,8},32342},{{27,10},226580},{{27,12},1385350},{{27,14},7560544},{{27,16},37426495},{{27,18},170077814},{{27,20},716127109},{{27,22},814596482},{{27,24},388283574},{{27,26},187079164},{{27,28},480126707},{{27,30},290089727},{{27,32},38629756},{{27,34},54115650},{{27,36},64891257},{{27,38},901599546},{{27,40},718222041},{{27,42},911275669},{{27,44},323565019},{{27,46},817912019},{{27,48},805459451},{{27,50},803612364},{{27,52},201797073},{{27,54},732830955},{{27,56},80380678},{{27,58},23464457},{{27,60},701195891},{{27,62},272214917},{{27,64},913862649},{{27,66},132026200},{{27,68},669751010},{{27,70},759341231},{{27,72},973676755},{{27,74},794065196},{{27,76},967438659},{{27,78},308299894},{{27,80},10712690},{{27,82},949669597},{{27,84},781686555},{{27,86},88559004},{{27,88},727530543},{{27,90},318751597},{{27,92},278470531},{{27,94},434911202},{{27,96},804701133},{{27,98},324324750},{{27,100},981099143},{{27,102},232682614},{{27,104},987104568},{{27,106},776649739},{{27,108},786487389},{{27,110},442468777},{{27,112},569068005},{{27,114},663709268},{{27,116},881510700},{{27,118},203686642},{{27,120},57967683},{{27,122},568729400},{{27,124},236001193},{{27,126},623959074},{{27,128},703861418},{{27,130},908672716},{{27,132},70204475},{{27,134},867825588},{{27,136},827103298},{{27,138},241630317},{{27,140},362696969},{{27,142},415618616},{{27,144},805038660},{{27,146},598704556},{{27,148},10082872},{{27,150},643477587},{{27,152},415164213},{{27,154},703084166},{{27,156},477367476},{{27,158},20036406},{{27,160},629980785},{{27,162},802614294},{{27,164},952521645},{{27,166},17601466},{{27,168},311433959},{{27,170},830294700},{{27,172},548394039},{{27,174},535645146},{{27,176},521413012},{{27,178},929141249},{{27,180},283365227},{{27,182},727229980},{{27,184},443388093},{{27,186},410708269},{{27,188},286618040},{{27,190},319768543},{{27,192},938841603},{{27,194},93475597},{{27,196},394693465},{{27,198},931196821},{{27,200},495806189},{{27,202},902879580},{{27,204},707905623},{{27,206},303901454},{{27,208},576396872},{{27,210},484544924},{{27,212},486011674},{{27,214},564305854},{{27,216},311518869},{{27,218},856442237},{{27,220},372745088},{{27,222},366968335},{{27,224},813470622},{{27,226},720542245},{{27,228},551543931},{{27,230},596748971},{{27,232},778551123},{{27,234},354920979},{{27,236},984250497},{{27,238},691689872},{{27,240},327423759},{{27,242},52302396},{{27,244},920309409},{{27,246},457393341},{{27,248},162758194},{{27,250},401889329},{{27,252},760192486},{{27,254},361045291},{{27,256},58998809},{{27,258},845800809},{{27,260},8575285},{{27,262},649668894},{{27,264},501939170},{{27,266},542308042},{{27,268},574502757},{{27,270},192463535},{{27,272},690505425},{{27,274},204738512},{{27,276},689813836},{{27,278},483570629},{{27,280},525148782},{{27,282},216925832},{{27,284},952334594},{{27,286},68584858},{{27,288},946061868},{{27,290},229986068},{{27,292},113082103},{{27,294},705545851},{{27,296},563504064},{{27,298},430610853},{{27,300},209937938},{{27,302},608555345},{{27,304},578039088},{{27,306},750439353},{{27,308},944169681},{{27,310},417934823},{{27,312},74422181},{{27,314},960090808},{{27,316},568355902},{{27,318},435674968},{{27,320},894299009},{{27,322},15861008},{{27,324},618713868},{{27,326},509911155},{{27,328},168869978},{{27,330},339481775},{{27,332},369451744},{{27,334},600513141},{{27,336},71634326},{{27,338},781507214},{{27,340},857107917},{{27,342},106564183},{{27,344},736233715},{{27,346},362800524},{{27,348},615467708},{{27,350},519437498},{{27,352},342065337},{{27,354},206666492},{{27,356},505918934},{{27,358},308299385},{{27,360},20927738},{{27,362},106279730},{{27,364},457391057},{{28,0},1},{{28,2},27},{{28,4},403},{{28,6},4325},{{28,8},37042},{{28,10},267514},{{28,12},1685106},{{28,14},9470830},{{28,16},48268511},{{28,18},225792189},{{28,20},978561725},{{28,22},958557158},{{28,24},38052071},{{28,26},919433401},{{28,28},254995547},{{28,30},546697380},{{28,32},704487939},{{28,34},32839999},{{28,36},508901654},{{28,38},551556389},{{28,40},663564198},{{28,42},695178769},{{28,44},814009554},{{28,46},547143595},{{28,48},371559020},{{28,50},945387943},{{28,52},670094820},{{28,54},616330760},{{28,56},976064124},{{28,58},607380120},{{28,60},8699769},{{28,62},998280938},{{28,64},580008436},{{28,66},958036252},{{28,68},912203574},{{28,70},544195790},{{28,72},396609897},{{28,74},954428754},{{28,76},708902921},{{28,78},801338681},{{28,80},431017191},{{28,82},381717232},{{28,84},344144422},{{28,86},131861617},{{28,88},874277396},{{28,90},830300192},{{28,92},596462835},{{28,94},318671397},{{28,96},244894238},{{28,98},904557382},{{28,100},834593756},{{28,102},283869037},{{28,104},697514761},{{28,106},969250693},{{28,108},509524190},{{28,110},913260759},{{28,112},384371901},{{28,114},692021356},{{28,116},509945770},{{28,118},32685910},{{28,120},505430483},{{28,122},907189201},{{28,124},193340383},{{28,126},693205397},{{28,128},603006308},{{28,130},305262013},{{28,132},925218957},{{28,134},968092842},{{28,136},27052064},{{28,138},47727228},{{28,140},477199307},{{28,142},293774777},{{28,144},98292616},{{28,146},663047137},{{28,148},995897620},{{28,150},288543890},{{28,152},998081856},{{28,154},524487172},{{28,156},892499155},{{28,158},556044593},{{28,160},972323813},{{28,162},578208602},{{28,164},933674462},{{28,166},509188659},{{28,168},985492681},{{28,170},986901126},{{28,172},628028841},{{28,174},519717277},{{28,176},311965185},{{28,178},897395442},{{28,180},829761538},{{28,182},9680527},{{28,184},161715155},{{28,186},343759581},{{28,188},402616197},{{28,190},861303980},{{28,192},911400557},{{28,194},358697993},{{28,196},515548395},{{28,198},553147014},{{28,200},892738525},{{28,202},205604013},{{28,204},762111690},{{28,206},442223169},{{28,208},7841804},{{28,210},517369986},{{28,212},84729818},{{28,214},152655938},{{28,216},700957258},{{28,218},898706126},{{28,220},75157861},{{28,222},271201265},{{28,224},543855670},{{28,226},440588279},{{28,228},204308612},{{28,230},236683234},{{28,232},208667572},{{28,234},404506592},{{28,236},809547310},{{28,238},853106482},{{28,240},518815458},{{28,242},16491026},{{28,244},491832633},{{28,246},360120645},{{28,248},923872102},{{28,250},602086347},{{28,252},641452842},{{28,254},18221609},{{28,256},229080666},{{28,258},428455406},{{28,260},569262655},{{28,262},856993308},{{28,264},230900297},{{28,266},490066099},{{28,268},367669571},{{28,270},96292417},{{28,272},52365382},{{28,274},469261002},{{28,276},374633464},{{28,278},900617667},{{28,280},182287939},{{28,282},49700390},{{28,284},796588976},{{28,286},949085023},{{28,288},222503562},{{28,290},658471212},{{28,292},94278399},{{28,294},66098044},{{28,296},72459139},{{28,298},603916441},{{28,300},257635815},{{28,302},234793049},{{28,304},951525459},{{28,306},549173423},{{28,308},938321308},{{28,310},13662267},{{28,312},288258509},{{28,314},65326301},{{28,316},11071916},{{28,318},364716823},{{28,320},929353581},{{28,322},839483911},{{28,324},199241395},{{28,326},29486252},{{28,328},482468148},{{28,330},829994735},{{28,332},370892643},{{28,334},687560607},{{28,336},531658704},{{28,338},568187724},{{28,340},486108828},{{28,342},475403750},{{28,344},227529481},{{28,346},124500798},{{28,348},228110006},{{28,350},56292488},{{28,352},958873404},{{28,354},963718586},{{28,356},481659835},{{28,358},183136868},{{28,360},593123751},{{28,362},622015148},{{28,364},469053734},{{28,366},211587807},{{28,368},928091671},{{28,370},481375722},{{28,372},612130911},{{28,374},134707706},{{28,376},334981252},{{28,378},784422204},{{28,380},712253942},{{28,382},698883770},{{28,384},390222722},{{28,386},25478322},{{28,388},28778175},{{28,390},349558455},{{28,392},616616543},{{29,0},1},{{29,2},28},{{29,4},432},{{29,6},4784},{{29,8},42229},{{29,10},314064},{{29,12},2036108},{{29,14},11772944},{{29,16},61710789},{{29,18},296841956},{{29,20},322742117},{{29,22},501368237},{{29,24},486564198},{{29,26},208215103},{{29,28},787564548},{{29,30},236938424},{{29,32},301578523},{{29,34},866593178},{{29,36},461034739},{{29,38},153403692},{{29,40},741061604},{{29,42},268366308},{{29,44},41671958},{{29,46},999969805},{{29,48},820629183},{{29,50},540097933},{{29,52},348143198},{{29,54},290585123},{{29,56},709901036},{{29,58},830657214},{{29,60},397773343},{{29,62},205345230},{{29,64},80836479},{{29,66},744283025},{{29,68},767371096},{{29,70},13280133},{{29,72},166091858},{{29,74},688213267},{{29,76},405245759},{{29,78},999129285},{{29,80},957885801},{{29,82},125598090},{{29,84},229197648},{{29,86},232621259},{{29,88},771781842},{{29,90},15692966},{{29,92},623498734},{{29,94},209019752},{{29,96},451480479},{{29,98},405116698},{{29,100},905232949},{{29,102},522429827},{{29,104},160392239},{{29,106},911337480},{{29,108},463779522},{{29,110},870625842},{{29,112},997849245},{{29,114},364479050},{{29,116},834828},{{29,118},300785526},{{29,120},10186705},{{29,122},265101999},{{29,124},566806573},{{29,126},614983712},{{29,128},685595755},{{29,130},48653250},{{29,132},344390997},{{29,134},673637797},{{29,136},896886255},{{29,138},108856368},{{29,140},31386606},{{29,142},486989879},{{29,144},489263782},{{29,146},517653845},{{29,148},976993581},{{29,150},117774221},{{29,152},829510874},{{29,154},294191687},{{29,156},233225993},{{29,158},831800739},{{29,160},448583977},{{29,162},657291524},{{29,164},649603801},{{29,166},456575978},{{29,168},536862581},{{29,170},855051723},{{29,172},994222346},{{29,174},302476269},{{29,176},502749737},{{29,178},322446053},{{29,180},790323255},{{29,182},357338908},{{29,184},887312147},{{29,186},181428924},{{29,188},536100952},{{29,190},55330164},{{29,192},160205355},{{29,194},190454705},{{29,196},365581727},{{29,198},201998030},{{29,200},826748536},{{29,202},400273437},{{29,204},624522779},{{29,206},849319472},{{29,208},800147953},{{29,210},80982274},{{29,212},447705256},{{29,214},168185200},{{29,216},97822479},{{29,218},309878269},{{29,220},678607548},{{29,222},912097410},{{29,224},927785144},{{29,226},334246635},{{29,228},662138658},{{29,230},715198385},{{29,232},260363473},{{29,234},461374975},{{29,236},89468114},{{29,238},651175074},{{29,240},575096135},{{29,242},130470890},{{29,244},71518840},{{29,246},879845193},{{29,248},486812125},{{29,250},128678982},{{29,252},647847215},{{29,254},49005945},{{29,256},59417027},{{29,258},550597313},{{29,260},85275582},{{29,262},589669875},{{29,264},488581288},{{29,266},579391253},{{29,268},238935007},{{29,270},307933774},{{29,272},801626662},{{29,274},991248834},{{29,276},831660242},{{29,278},2289249},{{29,280},939337934},{{29,282},170802252},{{29,284},112167473},{{29,286},712496239},{{29,288},45742853},{{29,290},482400666},{{29,292},341362938},{{29,294},957391891},{{29,296},147812751},{{29,298},376451585},{{29,300},832724562},{{29,302},418101830},{{29,304},38563919},{{29,306},274362964},{{29,308},819817184},{{29,310},400041713},{{29,312},313141267},{{29,314},806456583},{{29,316},999307614},{{29,318},670677205},{{29,320},585839782},{{29,322},845991536},{{29,324},831623045},{{29,326},109161241},{{29,328},554327240},{{29,330},822718306},{{29,332},173814042},{{29,334},363700239},{{29,336},22366070},{{29,338},479904205},{{29,340},190929878},{{29,342},554951008},{{29,344},774006606},{{29,346},279182950},{{29,348},109357938},{{29,350},401823952},{{29,352},575672540},{{29,354},860574847},{{29,356},593910748},{{29,358},547825741},{{29,360},217594637},{{29,362},989467389},{{29,364},184852185},{{29,366},331539318},{{29,368},325720467},{{29,370},383229710},{{29,372},654245987},{{29,374},146654996},{{29,376},209385163},{{29,378},560462909},{{29,380},965812836},{{29,382},65583448},{{29,384},508391947},{{29,386},709539829},{{29,388},955465325},{{29,390},214525022},{{29,392},394005813},{{29,394},531700924},{{29,396},773028650},{{29,398},417539579},{{29,400},326670161},{{29,402},406612199},{{29,404},165245},{{29,406},699092510},{{29,408},550837077},{{29,410},14964582},{{29,412},527720684},{{29,414},440459594},{{29,416},268905155},{{29,418},297293091},{{29,420},881879628},{{30,0},1},{{30,2},29},{{30,4},462},{{30,6},5274},{{30,8},47935},{{30,10},366779},{{30,12},2445008},{{30,14},14530396},{{30,16},78259797},{{30,18},386723841},{{30,20},770080067},{{30,22},561338901},{{30,24},331351593},{{30,26},839635833},{{30,28},167817400},{{30,30},497149119},{{30,32},881282118},{{30,34},352201610},{{30,36},471630724},{{30,38},181160121},{{30,40},88806794},{{30,42},987377178},{{30,44},289689361},{{30,46},946592969},{{30,48},656979867},{{30,50},594487341},{{30,52},196240769},{{30,54},948508749},{{30,56},810784209},{{30,58},709855728},{{30,60},576276359},{{30,62},518417791},{{30,64},87667236},{{30,66},667014934},{{30,68},181628700},{{30,70},79050911},{{30,72},337053925},{{30,74},373883684},{{30,76},560120551},{{30,78},458872893},{{30,80},815731972},{{30,82},827954345},{{30,84},771964062},{{30,86},380463298},{{30,88},190074568},{{30,90},335845313},{{30,92},308369049},{{30,94},297128477},{{30,96},730684746},{{30,98},742600059},{{30,100},263592454},{{30,102},96421517},{{30,104},206168581},{{30,106},306386280},{{30,108},238588046},{{30,110},136275025},{{30,112},509837233},{{30,114},285349782},{{30,116},467079296},{{30,118},44733505},{{30,120},132275281},{{30,122},829959933},{{30,124},391862643},{{30,126},62600608},{{30,128},253168338},{{30,130},426879146},{{30,132},365435454},{{30,134},91732486},{{30,136},471304236},{{30,138},543190875},{{30,140},798110387},{{30,142},894371900},{{30,144},696428631},{{30,146},750022470},{{30,148},726550236},{{30,150},936549828},{{30,152},542410178},{{30,154},939184541},{{30,156},791578453},{{30,158},983635297},{{30,160},823881369},{{30,162},150676558},{{30,164},585328209},{{30,166},653882077},{{30,168},963087655},{{30,170},950795211},{{30,172},936066317},{{30,174},71868369},{{30,176},440124326},{{30,178},965151462},{{30,180},175368387},{{30,182},40663323},{{30,184},699428294},{{30,186},108367130},{{30,188},332044307},{{30,190},970432796},{{30,192},572024201},{{30,194},885659377},{{30,196},539317691},{{30,198},132218646},{{30,200},139253073},{{30,202},467726930},{{30,204},45351751},{{30,206},297376822},{{30,208},508633325},{{30,210},703469419},{{30,212},746467332},{{30,214},503668629},{{30,216},112630766},{{30,218},930570931},{{30,220},962347630},{{30,222},576196343},{{30,224},698904389},{{30,226},167199167},{{30,228},333129737},{{30,230},608922442},{{30,232},222067115},{{30,234},688206452},{{30,236},802821275},{{30,238},954540394},{{30,240},911151138},{{30,242},906746447},{{30,244},902608727},{{30,246},890863920},{{30,248},307268385},{{30,250},54404696},{{30,252},104370759},{{30,254},495676754},{{30,256},441341576},{{30,258},829087999},{{30,260},88911607},{{30,262},975336543},{{30,264},381836343},{{30,266},298727399},{{30,268},758323163},{{30,270},709721214},{{30,272},146811076},{{30,274},322114121},{{30,276},909574264},{{30,278},955852236},{{30,280},803216000},{{30,282},511491931},{{30,284},157225317},{{30,286},671670053},{{30,288},367885171},{{30,290},612666342},{{30,292},842261160},{{30,294},508147005},{{30,296},345029386},{{30,298},809990068},{{30,300},981225972},{{30,302},241279545},{{30,304},458275632},{{30,306},172983843},{{30,308},48836190},{{30,310},961296645},{{30,312},538132589},{{30,314},271432367},{{30,316},877708377},{{30,318},386417805},{{30,320},815731556},{{30,322},463571419},{{30,324},404450924},{{30,326},113136747},{{30,328},549319603},{{30,330},219464194},{{30,332},220054123},{{30,334},907114544},{{30,336},328856175},{{30,338},265047793},{{30,340},589592614},{{30,342},328159953},{{30,344},809008569},{{30,346},510434161},{{30,348},420313068},{{30,350},107873733},{{30,352},868895119},{{30,354},895337042},{{30,356},156863206},{{30,358},48004547},{{30,360},666506430},{{30,362},727609186},{{30,364},85858741},{{30,366},59205240},{{30,368},78940637},{{30,370},545962715},{{30,372},139572749},{{30,374},421355881},{{30,376},858507471},{{30,378},952603331},{{30,380},401020118},{{30,382},942925111},{{30,384},296295597},{{30,386},997986384},{{30,388},115737481},{{30,390},677010850},{{30,392},282276283},{{30,394},274892540},{{30,396},163700485},{{30,398},118592549},{{30,400},846472792},{{30,402},136765224},{{30,404},236032397},{{30,406},179431589},{{30,408},539549211},{{30,410},214067143},{{30,412},923131121},{{30,414},999465547},{{30,416},232088789},{{30,418},610013691},{{30,420},896204760},{{30,422},478686995},{{30,424},218989077},{{30,426},91096939},{{30,428},221616643},{{30,430},243944261},{{30,432},454787573},{{30,434},542927414},{{30,436},355318220},{{30,438},147354818},{{30,440},482630},{{30,442},675619041},{{30,444},634351197},{{30,446},478341164},{{30,448},574509037},{{30,450},738721209},{{31,0},1},{{31,2},30},{{31,4},493},{{31,6},5796},{{31,8},54193},{{31,10},426242},{{31,12},2919073},{{31,14},17814512},{{31,16},98499977},{{31,18},499582398},{{31,20},346636279},{{31,22},286311246},{{31,24},338970899},{{31,26},482987014},{{31,28},740494022},{{31,30},522312682},{{31,32},389124982},{{31,34},438269373},{{31,36},295660905},{{31,38},384589942},{{31,40},269003911},{{31,42},190728878},{{31,44},21841107},{{31,46},394443500},{{31,48},159301748},{{31,50},885681179},{{31,52},869073529},{{31,54},396029106},{{31,56},969827087},{{31,58},16747334},{{31,60},474716791},{{31,62},259235367},{{31,64},753984455},{{31,66},365768194},{{31,68},423375006},{{31,70},957390875},{{31,72},407261764},{{31,74},592999097},{{31,76},928039310},{{31,78},529328158},{{31,80},133251022},{{31,82},533719572},{{31,84},434981329},{{31,86},779487889},{{31,88},212784950},{{31,90},467080112},{{31,92},287628298},{{31,94},91658981},{{31,96},576061624},{{31,98},322787361},{{31,100},682746649},{{31,102},234833733},{{31,104},676878118},{{31,106},220869554},{{31,108},982232103},{{31,110},879428014},{{31,112},742840902},{{31,114},65876039},{{31,116},230084790},{{31,118},68776407},{{31,120},988541480},{{31,122},113769367},{{31,124},288661011},{{31,126},898604342},{{31,128},790158821},{{31,130},811679832},{{31,132},416532461},{{31,134},643426286},{{31,136},357304561},{{31,138},904850873},{{31,140},143689492},{{31,142},643378934},{{31,144},217587561},{{31,146},816799579},{{31,148},741653213},{{31,150},950522177},{{31,152},519192837},{{31,154},195766899},{{31,156},875531753},{{31,158},913462122},{{31,160},931740864},{{31,162},147485151},{{31,164},73473743},{{31,166},881407231},{{31,168},943949423},{{31,170},19375017},{{31,172},95185407},{{31,174},658198820},{{31,176},654223830},{{31,178},78841384},{{31,180},487272636},{{31,182},810454297},{{31,184},156111172},{{31,186},108214345},{{31,188},594083015},{{31,190},721613382},{{31,192},413639222},{{31,194},199581479},{{31,196},219296986},{{31,198},983776208},{{31,200},50034813},{{31,202},434669652},{{31,204},336761553},{{31,206},553659069},{{31,208},443256837},{{31,210},867959007},{{31,212},649693919},{{31,214},829394710},{{31,216},511124003},{{31,218},801382432},{{31,220},809258820},{{31,222},440312724},{{31,224},549557631},{{31,226},57091967},{{31,228},619973166},{{31,230},38255131},{{31,232},989252595},{{31,234},296849831},{{31,236},126449228},{{31,238},992478958},{{31,240},948085171},{{31,242},398912012},{{31,244},308493194},{{31,246},585304989},{{31,248},581850817},{{31,250},704472537},{{31,252},457658359},{{31,254},706849064},{{31,256},974235300},{{31,258},322942033},{{31,260},801441410},{{31,262},806760539},{{31,264},930211369},{{31,266},674605925},{{31,268},140615032},{{31,270},804334982},{{31,272},654022727},{{31,274},747554604},{{31,276},304695097},{{31,278},670935186},{{31,280},973200118},{{31,282},899755340},{{31,284},43016718},{{31,286},33443894},{{31,288},486649937},{{31,290},183173093},{{31,292},28680647},{{31,294},612676891},{{31,296},17478829},{{31,298},208078434},{{31,300},467131016},{{31,302},651933212},{{31,304},464433186},{{31,306},3993644},{{31,308},959280435},{{31,310},310671435},{{31,312},524438940},{{31,314},540166082},{{31,316},143663989},{{31,318},984026973},{{31,320},596317769},{{31,322},299039541},{{31,324},925611762},{{31,326},115137245},{{31,328},238184581},{{31,330},798462400},{{31,332},902062936},{{31,334},499673997},{{31,336},696053154},{{31,338},121959061},{{31,340},376644235},{{31,342},378356623},{{31,344},996412950},{{31,346},115590297},{{31,348},517087995},{{31,350},817795384},{{31,352},731733847},{{31,354},61225249},{{31,356},930096903},{{31,358},292653780},{{31,360},149516053},{{31,362},503527083},{{31,364},233497811},{{31,366},781589564},{{31,368},87992011},{{31,370},514696635},{{31,372},495015483},{{31,374},151617728},{{31,376},478098704},{{31,378},773499685},{{31,380},621536652},{{31,382},787266199},{{31,384},440325002},{{31,386},249898342},{{31,388},747360642},{{31,390},671517137},{{31,392},216648293},{{31,394},686506084},{{31,396},544204132},{{31,398},949750238},{{31,400},249236969},{{31,402},319054830},{{31,404},756596931},{{31,406},233403453},{{31,408},594672369},{{31,410},158463779},{{31,412},809106181},{{31,414},249481644},{{31,416},610711719},{{31,418},262167344},{{31,420},179138909},{{31,422},270160113},{{31,424},278492510},{{31,426},490828032},{{31,428},946977816},{{31,430},803242084},{{31,432},541036271},{{31,434},624688984},{{31,436},204404014},{{31,438},881539240},{{31,440},779609382},{{31,442},561095932},{{31,444},524976628},{{31,446},888316278},{{31,448},139701497},{{31,450},712146362},{{31,452},413036824},{{31,454},810411985},{{31,456},241441787},{{31,458},247390036},{{31,460},695355554},{{31,462},122993697},{{31,464},227371919},{{31,466},399947791},{{31,468},833892197},{{31,470},899399938},{{31,472},781528108},{{31,474},656359733},{{31,476},551706967},{{31,478},845829828},{{31,480},900357325},{{32,0},1},{{32,2},31},{{32,4},525},{{32,6},6351},{{32,8},61037},{{32,10},493071},{{32,12},3466221},{{32,14},21705119},{{32,16},123102861},{{32,18},640304911},{{32,20},83941000},{{32,22},859775332},{{32,24},485271727},{{32,26},929183599},{{32,28},393442380},{{32,30},976105677},{{32,32},287805815},{{32,34},238271867},{{32,36},74391877},{{32,38},765979021},{{32,40},335546599},{{32,42},709265303},{{32,44},808915958},{{32,46},907593582},{{32,48},463983041},{{32,50},147572225},{{32,52},888153362},{{32,54},391439968},{{32,56},221443415},{{32,58},801779213},{{32,60},245226914},{{32,62},866175931},{{32,64},810047153},{{32,66},267980729},{{32,68},805674759},{{32,70},955321032},{{32,72},906824500},{{32,74},367243333},{{32,76},486256638},{{32,78},145115859},{{32,80},530769671},{{32,82},290945081},{{32,84},932311137},{{32,86},51068986},{{32,88},807551107},{{32,90},185085629},{{32,92},261181005},{{32,94},959829857},{{32,96},118218336},{{32,98},295880881},{{32,100},506261294},{{32,102},848742193},{{32,104},936582961},{{32,106},153400705},{{32,108},578662225},{{32,110},341741810},{{32,112},161659811},{{32,114},816049772},{{32,116},839223846},{{32,118},559301757},{{32,120},400427189},{{32,122},216771109},{{32,124},207016492},{{32,126},505237766},{{32,128},795055758},{{32,130},945605740},{{32,132},555992642},{{32,134},907845643},{{32,136},982951177},{{32,138},401043526},{{32,140},597396374},{{32,142},84431994},{{32,144},362552441},{{32,146},746539639},{{32,148},303946121},{{32,150},357484364},{{32,152},893505269},{{32,154},526515449},{{32,156},560103044},{{32,158},121894895},{{32,160},445706213},{{32,162},592793631},{{32,164},713670463},{{32,166},810676671},{{32,168},143889731},{{32,170},392244416},{{32,172},73126772},{{32,174},488568958},{{32,176},542583029},{{32,178},752584772},{{32,180},7383345},{{32,182},155007498},{{32,184},994039957},{{32,186},804821801},{{32,188},379264833},{{32,190},525210782},{{32,192},239847467},{{32,194},126254398},{{32,196},219331239},{{32,198},753237922},{{32,200},434345445},{{32,202},635807399},{{32,204},872366121},{{32,206},133933893},{{32,208},590603804},{{32,210},32230684},{{32,212},70841222},{{32,214},840236255},{{32,216},909722819},{{32,218},689521789},{{32,220},529248821},{{32,222},178846494},{{32,224},980363222},{{32,226},548654005},{{32,228},434479841},{{32,230},697553680},{{32,232},35011089},{{32,234},544881135},{{32,236},260563063},{{32,238},695816358},{{32,240},44173506},{{32,242},726085055},{{32,244},671716390},{{32,246},781464159},{{32,248},450226987},{{32,250},146813053},{{32,252},877951734},{{32,254},991641337},{{32,256},221699230},{{32,258},419417817},{{32,260},794832550},{{32,262},810418558},{{32,264},969705412},{{32,266},219055178},{{32,268},274301546},{{32,270},503413612},{{32,272},695160244},{{32,274},74090275},{{32,276},26176299},{{32,278},695070748},{{32,280},341801549},{{32,282},897892431},{{32,284},470380437},{{32,286},3467372},{{32,288},448525308},{{32,290},439337134},{{32,292},724845391},{{32,294},9187155},{{32,296},585558376},{{32,298},372261444},{{32,300},277930003},{{32,302},34819054},{{32,304},431482585},{{32,306},279947765},{{32,308},492267585},{{32,310},818516372},{{32,312},484582901},{{32,314},390623889},{{32,316},856573701},{{32,318},179325546},{{32,320},611189228},{{32,322},688765384},{{32,324},847931848},{{32,326},534263758},{{32,328},557397045},{{32,330},116495491},{{32,332},85868985},{{32,334},610969731},{{32,336},478650084},{{32,338},585159686},{{32,340},14772190},{{32,342},776211983},{{32,344},474268574},{{32,346},460744792},{{32,348},134988124},{{32,350},912707317},{{32,352},105964987},{{32,354},809266690},{{32,356},785401545},{{32,358},161419686},{{32,360},653370610},{{32,362},499797235},{{32,364},534961655},{{32,366},323936668},{{32,368},802659551},{{32,370},370287438},{{32,372},326963010},{{32,374},342959476},{{32,376},313044094},{{32,378},148582386},{{32,380},976795271},{{32,382},120954501},{{32,384},724957759},{{32,386},860215558},{{32,388},270001726},{{32,390},640931921},{{32,392},833230238},{{32,394},701256342},{{32,396},242231076},{{32,398},286286219},{{32,400},13632467},{{32,402},253663042},{{32,404},129411109},{{32,406},603714672},{{32,408},564008356},{{32,410},523901279},{{32,412},216864213},{{32,414},524434304},{{32,416},182659511},{{32,418},983267072},{{32,420},644616701},{{32,422},707181007},{{32,424},618980658},{{32,426},405751838},{{32,428},571460922},{{32,430},136629759},{{32,432},744395053},{{32,434},539608518},{{32,436},963053644},{{32,438},97893406},{{32,440},866038338},{{32,442},265757870},{{32,444},944699732},{{32,446},964525924},{{32,448},892464175},{{32,450},168006507},{{32,452},562926324},{{32,454},742708490},{{32,456},132927348},{{32,458},526909479},{{32,460},79557205},{{32,462},129052432},{{32,464},157042523},{{32,466},659309142},{{32,468},834183171},{{32,470},802572815},{{32,472},517259737},{{32,474},256356803},{{32,476},353227137},{{32,478},87135975},{{32,480},224995979},{{32,482},596580540},{{32,484},402931204},{{32,486},515099940},{{32,488},793833445},{{32,490},691900231},{{32,492},589149123},{{32,494},114327507},{{32,496},887760880},{{32,498},389703467},{{32,500},830251700},{{32,502},783657579},{{32,504},433484966},{{32,506},412892473},{{32,508},432995349},{{32,510},911076886},{{32,512},112628181},{{33,0},1},{{33,2},32},{{33,4},558},{{33,6},6940},{{33,8},68502},{{33,10},567920},{{33,12},4095058},{{33,14},26291268},{{33,16},152836946},{{33,18},814626856},{{33,20},19929138},{{33,22},508014078},{{33,24},3627542},{{33,26},383619686},{{33,28},178749032},{{33,30},257695016},{{33,32},714018516},{{33,34},472708243},{{33,36},782289684},{{33,38},785010736},{{33,40},673452130},{{33,42},967313791},{{33,44},416615851},{{33,46},594708501},{{33,48},823838568},{{33,50},374885539},{{33,52},520875465},{{33,54},462873691},{{33,56},866641568},{{33,58},110422771},{{33,60},371334024},{{33,62},597629306},{{33,64},954905318},{{33,66},192386746},{{33,68},711820060},{{33,70},202869372},{{33,72},886359460},{{33,74},670157944},{{33,76},884126969},{{33,78},502946720},{{33,80},582271977},{{33,82},402610790},{{33,84},343533084},{{33,86},511648372},{{33,88},517557636},{{33,90},170605372},{{33,92},597697292},{{33,94},829559995},{{33,96},983984749},{{33,98},601678152},{{33,100},265076525},{{33,102},200313780},{{33,104},586898347},{{33,106},936910249},{{33,108},473920775},{{33,110},97417050},{{33,112},844866738},{{33,114},973357211},{{33,116},106398807},{{33,118},531568235},{{33,120},220592830},{{33,122},72245680},{{33,124},709223174},{{33,126},966562898},{{33,128},364453034},{{33,130},204299565},{{33,132},516186616},{{33,134},388239153},{{33,136},70201813},{{33,138},72763421},{{33,140},794896998},{{33,142},14537122},{{33,144},759848271},{{33,146},370782607},{{33,148},723372604},{{33,150},610938893},{{33,152},161728308},{{33,154},212501210},{{33,156},376508968},{{33,158},271352258},{{33,160},323852567},{{33,162},552136716},{{33,164},801650724},{{33,166},615740271},{{33,168},208656790},{{33,170},224034222},{{33,172},747809272},{{33,174},617340476},{{33,176},153891047},{{33,178},285642015},{{33,180},901118362},{{33,182},123777425},{{33,184},16228193},{{33,186},623027527},{{33,188},937436377},{{33,190},60747289},{{33,192},714381298},{{33,194},882770713},{{33,196},15381170},{{33,198},999192137},{{33,200},197256049},{{33,202},480638655},{{33,204},953137460},{{33,206},883599778},{{33,208},148656904},{{33,210},722191509},{{33,212},39402136},{{33,214},582147050},{{33,216},757441169},{{33,218},260428827},{{33,220},253172482},{{33,222},508174417},{{33,224},834955862},{{33,226},157349819},{{33,228},261175551},{{33,230},247577251},{{33,232},264652493},{{33,234},595186522},{{33,236},812752039},{{33,238},875384578},{{33,240},747313263},{{33,242},224431706},{{33,244},462673707},{{33,246},39074204},{{33,248},237357876},{{33,250},896371707},{{33,252},361524710},{{33,254},10299862},{{33,256},761952483},{{33,258},924315000},{{33,260},304463541},{{33,262},831385606},{{33,264},228637562},{{33,266},845205390},{{33,268},599099308},{{33,270},177524018},{{33,272},209006125},{{33,274},256908838},{{33,276},355221513},{{33,278},792061054},{{33,280},713446694},{{33,282},397486564},{{33,284},756107839},{{33,286},527866716},{{33,288},337624854},{{33,290},575430320},{{33,292},456754471},{{33,294},959728018},{{33,296},921786900},{{33,298},102983773},{{33,300},936936381},{{33,302},473475121},{{33,304},131588049},{{33,306},189268154},{{33,308},863126769},{{33,310},700571091},{{33,312},871530822},{{33,314},832046604},{{33,316},609629520},{{33,318},45186676},{{33,320},853387560},{{33,322},464311797},{{33,324},368430192},{{33,326},151536782},{{33,328},691919878},{{33,330},176735598},{{33,332},972465597},{{33,334},804610607},{{33,336},50289062},{{33,338},722819065},{{33,340},20410813},{{33,342},11987321},{{33,344},648373171},{{33,346},889715409},{{33,348},778512390},{{33,350},280809979},{{33,352},767453391},{{33,354},155472064},{{33,356},275305459},{{33,358},296611231},{{33,360},377220752},{{33,362},229158487},{{33,364},259857310},{{33,366},987705391},{{33,368},873889855},{{33,370},448418244},{{33,372},657467052},{{33,374},301028637},{{33,376},400332864},{{33,378},304525446},{{33,380},853531448},{{33,382},201469133},{{33,384},757430782},{{33,386},288842043},{{33,388},292821474},{{33,390},389580374},{{33,392},148645279},{{33,394},450672899},{{33,396},404696472},{{33,398},399758661},{{33,400},549392647},{{33,402},972607841},{{33,404},459482261},{{33,406},344863732},{{33,408},405989209},{{33,410},14412475},{{33,412},913865943},{{33,414},988039851},{{33,416},302203080},{{33,418},293916756},{{33,420},28383491},{{33,422},502818531},{{33,424},791480646},{{33,426},619991127},{{33,428},151573496},{{33,430},311251301},{{33,432},362738947},{{33,434},457688580},{{33,436},884177111},{{33,438},390413172},{{33,440},889218635},{{33,442},530910268},{{33,444},818241216},{{33,446},542232757},{{33,448},765042883},{{33,450},885001834},{{33,452},10229128},{{33,454},574524301},{{33,456},836418812},{{33,458},984923781},{{33,460},235783687},{{33,462},868003012},{{33,464},379478756},{{33,466},832878398},{{33,468},751487743},{{33,470},496700139},{{33,472},587857943},{{33,474},624473538},{{33,476},510088706},{{33,478},778144708},{{33,480},214176553},{{33,482},953029206},{{33,484},646822434},{{33,486},252787767},{{33,488},281229254},{{33,490},401166205},{{33,492},434753895},{{33,494},343430684},{{33,496},941989547},{{33,498},465870277},{{33,500},861407908},{{33,502},387687010},{{33,504},216509894},{{33,506},375279811},{{33,508},453878600},{{33,510},982073623},{{33,512},677731113},{{33,514},95924240},{{33,516},198468867},{{33,518},861679672},{{33,520},204003039},{{33,522},472066136},{{33,524},228890861},{{33,526},880462406},{{33,528},133638984},{{33,530},924365283},{{33,532},274136081},{{33,534},742318625},{{33,536},898640542},{{33,538},85174164},{{33,540},775817726},{{33,542},982947180},{{33,544},716729952},{{34,0},1},{{34,2},33},{{34,4},592},{{34,6},7564},{{34,8},76624},{{34,10},651480},{{34,12},4814916},{{34,14},31671996},{{34,16},188578368},{{34,18},29248753},{{34,20},200002145},{{34,22},508415428},{{34,24},442411092},{{34,26},823607844},{{34,28},339155380},{{34,30},84465338},{{34,32},814093820},{{34,34},347929398},{{34,36},722645092},{{34,38},146033429},{{34,40},312847170},{{34,42},460125097},{{34,44},915837300},{{34,46},530134554},{{34,48},683613860},{{34,50},22911398},{{34,52},950166343},{{34,54},297700883},{{34,56},874171812},{{34,58},779302544},{{34,60},705201416},{{34,62},91735442},{{34,64},764568060},{{34,66},448540109},{{34,68},794383951},{{34,70},50664826},{{34,72},501387621},{{34,74},764478731},{{34,76},392332791},{{34,78},697065547},{{34,80},136584719},{{34,82},904822171},{{34,84},811342153},{{34,86},498086442},{{34,88},66346910},{{34,90},903864157},{{34,92},648069920},{{34,94},294527566},{{34,96},68277872},{{34,98},192952288},{{34,100},465503414},{{34,102},89641650},{{34,104},342876181},{{34,106},975687654},{{34,108},849073744},{{34,110},732768838},{{34,112},299144725},{{34,114},960087859},{{34,116},432060633},{{34,118},521050995},{{34,120},669642411},{{34,122},783220798},{{34,124},964761936},{{34,126},888496451},{{34,128},578822675},{{34,130},774117896},{{34,132},595815330},{{34,134},556187991},{{34,136},328078421},{{34,138},497539038},{{34,140},461150544},{{34,142},593197759},{{34,144},454579240},{{34,146},228665398},{{34,148},675695769},{{34,150},189021504},{{34,152},506127036},{{34,154},683711210},{{34,156},767254008},{{34,158},372876392},{{34,160},950363733},{{34,162},781425867},{{34,164},518441353},{{34,166},618578159},{{34,168},210702480},{{34,170},146366158},{{34,172},211092828},{{34,174},25645664},{{34,176},252569415},{{34,178},768287264},{{34,180},315751220},{{34,182},46304131},{{34,184},875313001},{{34,186},63062094},{{34,188},41563387},{{34,190},521548621},{{34,192},882111752},{{34,194},325592507},{{34,196},674715724},{{34,198},754661696},{{34,200},386558110},{{34,202},154963091},{{34,204},238088464},{{34,206},48050421},{{34,208},639662963},{{34,210},70331570},{{34,212},315682289},{{34,214},290604457},{{34,216},553625701},{{34,218},114470501},{{34,220},286499320},{{34,222},302628334},{{34,224},934963054},{{34,226},90280656},{{34,228},946037777},{{34,230},701374947},{{34,232},21339121},{{34,234},663053978},{{34,236},944685826},{{34,238},452543047},{{34,240},117230904},{{34,242},560747251},{{34,244},199227363},{{34,246},16627409},{{34,248},318622953},{{34,250},147892287},{{34,252},924956445},{{34,254},813803967},{{34,256},785002825},{{34,258},524657750},{{34,260},94619872},{{34,262},228326183},{{34,264},399365341},{{34,266},370689535},{{34,268},675442405},{{34,270},908504726},{{34,272},873312142},{{34,274},624281896},{{34,276},910865167},{{34,278},214431914},{{34,280},356568789},{{34,282},649815619},{{34,284},48684312},{{34,286},203060656},{{34,288},723151845},{{34,290},388405201},{{34,292},798060040},{{34,294},729614446},{{34,296},977682164},{{34,298},533436928},{{34,300},146813819},{{34,302},149571082},{{34,304},895803037},{{34,306},777214043},{{34,308},552248021},{{34,310},204656845},{{34,312},982800841},{{34,314},733286978},{{34,316},63964308},{{34,318},481147156},{{34,320},389291330},{{34,322},76639625},{{34,324},311176854},{{34,326},441157810},{{34,328},671041225},{{34,330},83215916},{{34,332},462900391},{{34,334},792922861},{{34,336},933493638},{{34,338},911064426},{{34,340},640299582},{{34,342},658369868},{{34,344},816565473},{{34,346},95242536},{{34,348},385493380},{{34,350},848295064},{{34,352},737403618},{{34,354},437312030},{{34,356},117969370},{{34,358},718173112},{{34,360},995019578},{{34,362},309321859},{{34,364},756181744},{{34,366},40101942},{{34,368},426476878},{{34,370},702396178},{{34,372},795715493},{{34,374},835764511},{{34,376},743326504},{{34,378},209546865},{{34,380},430615231},{{34,382},826070511},{{34,384},334341237},{{34,386},118979238},{{34,388},371120144},{{34,390},839568659},{{34,392},676120384},{{34,394},72519},{{34,396},845333099},{{34,398},357629799},{{34,400},910834209},{{34,402},593346831},{{34,404},104377605},{{34,406},380654497},{{34,408},634970517},{{34,410},115890735},{{34,412},793059350},{{34,414},887063630},{{34,416},651636452},{{34,418},507749972},{{34,420},783577804},{{34,422},143656503},{{34,424},242083869},{{34,426},911105370},{{34,428},970085702},{{34,430},524972130},{{34,432},465698950},{{34,434},325374351},{{34,436},536364599},{{34,438},196104291},{{34,440},139239152},{{34,442},633851401},{{34,444},256158579},{{34,446},919175466},{{34,448},894613648},{{34,450},315818683},{{34,452},5141779},{{34,454},876022828},{{34,456},934709255},{{34,458},681050535},{{34,460},191918360},{{34,462},662583345},{{34,464},207316521},{{34,466},848780031},{{34,468},272975543},{{34,470},702356884},{{34,472},769886013},{{34,474},961041057},{{34,476},6500208},{{34,478},70262300},{{34,480},494310602},{{34,482},739703998},{{34,484},384177576},{{34,486},343193798},{{34,488},693062586},{{34,490},969762392},{{34,492},66952659},{{34,494},685150241},{{34,496},630304511},{{34,498},413041585},{{34,500},515441116},{{34,502},191001103},{{34,504},912006289},{{34,506},473846745},{{34,508},605301455},{{34,510},795067847},{{34,512},856671001},{{34,514},508821454},{{34,516},735406667},{{34,518},258084054},{{34,520},117733205},{{34,522},780290039},{{34,524},23367661},{{34,526},593944851},{{34,528},692132515},{{34,530},4650353},{{34,532},187487602},{{34,534},151055135},{{34,536},898863554},{{34,538},673507355},{{34,540},215091232},{{34,542},603704193},{{34,544},594167428},{{34,546},682519378},{{34,548},496434131},{{34,550},965159536},{{34,552},430378180},{{34,554},248402836},{{34,556},470772870},{{34,558},307340881},{{34,560},347656961},{{34,562},749714755},{{34,564},122062081},{{34,566},558277910},{{34,568},169666679},{{34,570},941915597},{{34,572},277380477},{{34,574},270070849},{{34,576},652088255},{{34,578},549544085},{{35,0},1},{{35,2},34},{{35,4},627},{{35,6},8224},{{35,8},85440},{{35,10},744480},{{35,12},5635892},{{35,14},37957128},{{35,16},231322416},{{35,18},291965329},{{35,20},678229698},{{35,22},199102832},{{35,24},733159273},{{35,26},432255582},{{35,28},825398987},{{35,30},945721657},{{35,32},530531857},{{35,34},605903605},{{35,36},198451639},{{35,38},405128341},{{35,40},881104650},{{35,42},95712824},{{35,44},87475937},{{35,46},88052462},{{35,48},854657880},{{35,50},671362129},{{35,52},345256719},{{35,54},279913923},{{35,56},405600244},{{35,58},791623773},{{35,60},184158289},{{35,62},548244621},{{35,64},559931899},{{35,66},811302745},{{35,68},822463013},{{35,70},829884052},{{35,72},612803610},{{35,74},114370483},{{35,76},717655175},{{35,78},250670751},{{35,80},158660853},{{35,82},996989593},{{35,84},922821653},{{35,86},403693850},{{35,88},640224917},{{35,90},726696528},{{35,92},558324649},{{35,94},504260316},{{35,96},457498775},{{35,98},235424755},{{35,100},214797729},{{35,102},595578763},{{35,104},703649058},{{35,106},668639597},{{35,108},273743575},{{35,110},830864733},{{35,112},8621856},{{35,114},152359528},{{35,116},351252345},{{35,118},54682531},{{35,120},631863641},{{35,122},533130514},{{35,124},548187372},{{35,126},212107229},{{35,128},690348600},{{35,130},269650465},{{35,132},644636821},{{35,134},588449397},{{35,136},716956418},{{35,138},569059993},{{35,140},571818753},{{35,142},620732748},{{35,144},238441683},{{35,146},628780105},{{35,148},73251606},{{35,150},77232245},{{35,152},265685085},{{35,154},860541096},{{35,156},181038883},{{35,158},995121568},{{35,160},787161997},{{35,162},984175916},{{35,164},994855981},{{35,166},70309595},{{35,168},279951259},{{35,170},412871815},{{35,172},881913054},{{35,174},268261177},{{35,176},575207129},{{35,178},196951994},{{35,180},610045829},{{35,182},705950877},{{35,184},200402175},{{35,186},179100085},{{35,188},912730914},{{35,190},795237101},{{35,192},264189519},{{35,194},756871237},{{35,196},840795855},{{35,198},477498958},{{35,200},568161700},{{35,202},101820158},{{35,204},478938140},{{35,206},546807900},{{35,208},824972458},{{35,210},320572966},{{35,212},375535061},{{35,214},712736750},{{35,216},146215080},{{35,218},296045377},{{35,220},892271196},{{35,222},198915619},{{35,224},973312163},{{35,226},292266224},{{35,228},766955048},{{35,230},774760742},{{35,232},724672108},{{35,234},189810671},{{35,236},590576941},{{35,238},955913056},{{35,240},705860403},{{35,242},956268133},{{35,244},120026477},{{35,246},977289531},{{35,248},897970234},{{35,250},594373646},{{35,252},802624855},{{35,254},16139526},{{35,256},294245189},{{35,258},661099173},{{35,260},505327457},{{35,262},687552139},{{35,264},570417673},{{35,266},288750674},{{35,268},928298666},{{35,270},124243321},{{35,272},103493234},{{35,274},782666425},{{35,276},810561902},{{35,278},479140046},{{35,280},567654010},{{35,282},66398299},{{35,284},87173858},{{35,286},171094018},{{35,288},401077961},{{35,290},201022453},{{35,292},649177770},{{35,294},751032860},{{35,296},458665510},{{35,298},583069945},{{35,300},3741921},{{35,302},644139368},{{35,304},777863779},{{35,306},427938859},{{35,308},574083500},{{35,310},968708036},{{35,312},5259009},{{35,314},14753514},{{35,316},566158894},{{35,318},428971413},{{35,320},29779639},{{35,322},601893398},{{35,324},934948155},{{35,326},463945886},{{35,328},442386091},{{35,330},787098075},{{35,332},294593703},{{35,334},467511028},{{35,336},998601384},{{35,338},749411810},{{35,340},495421040},{{35,342},283658473},{{35,344},287441865},{{35,346},687819162},{{35,348},964614928},{{35,350},353638623},{{35,352},648210867},{{35,354},238886215},{{35,356},893364457},{{35,358},158958124},{{35,360},29345292},{{35,362},800368429},{{35,364},595552294},{{35,366},572640574},{{35,368},913495958},{{35,370},705720935},{{35,372},850127566},{{35,374},83220185},{{35,376},799386246},{{35,378},848828465},{{35,380},335228800},{{35,382},498492912},{{35,384},819731260},{{35,386},972790229},{{35,388},191002130},{{35,390},289923062},{{35,392},997108332},{{35,394},479589354},{{35,396},13686350},{{35,398},377632380},{{35,400},915241611},{{35,402},38445376},{{35,404},115515812},{{35,406},312111610},{{35,408},862313776},{{35,410},36444206},{{35,412},491509332},{{35,414},899038496},{{35,416},494299749},{{35,418},577210085},{{35,420},925017398},{{35,422},377889538},{{35,424},129014425},{{35,426},544007299},{{35,428},134491550},{{35,430},77644047},{{35,432},150186363},{{35,434},549177782},{{35,436},243194000},{{35,438},889811949},{{35,440},476414356},{{35,442},302027816},{{35,444},934223010},{{35,446},116351600},{{35,448},936035078},{{35,450},728736728},{{35,452},99057293},{{35,454},233685532},{{35,456},715949090},{{35,458},484999785},{{35,460},527817757},{{35,462},40017975},{{35,464},403976200},{{35,466},963752121},{{35,468},230480821},{{35,470},165554215},{{35,472},501580240},{{35,474},480519751},{{35,476},374582722},{{35,478},588438105},{{35,480},13652788},{{35,482},835399525},{{35,484},909982574},{{35,486},63720437},{{35,488},165170490},{{35,490},768431894},{{35,492},385829327},{{35,494},268804006},{{35,496},950180874},{{35,498},398363435},{{35,500},512876602},{{35,502},149304949},{{35,504},858796870},{{35,506},305796565},{{35,508},80654592},{{35,510},209088881},{{35,512},365995652},{{35,514},741417209},{{35,516},580938286},{{35,518},849913699},{{35,520},209592153},{{35,522},430983500},{{35,524},292682916},{{35,526},89781822},{{35,528},346251985},{{35,530},899920810},{{35,532},490814818},{{35,534},319818650},{{35,536},865676138},{{35,538},199552930},{{35,540},49606030},{{35,542},396988194},{{35,544},289382805},{{35,546},394082926},{{35,548},680976370},{{35,550},125444750},{{35,552},312554820},{{35,554},11884810},{{35,556},730982055},{{35,558},36906819},{{35,560},144996838},{{35,562},532313029},{{35,564},339360681},{{35,566},509568859},{{35,568},763509787},{{35,570},79118993},{{35,572},930179491},{{35,574},756170211},{{35,576},627420026},{{35,578},161269793},{{35,580},542072728},{{35,582},498021200},{{35,584},392693531},{{35,586},523036960},{{35,588},919765468},{{35,590},367278574},{{35,592},755839168},{{35,594},466305341},{{35,596},613534367},{{35,598},534169086},{{35,600},166110829},{{35,602},107021592},{{35,604},280650539},{{35,606},268761091},{{35,608},590645300},{{35,610},269909358},{{35,612},234042842},{{36,0},1},{{36,2},35},{{36,4},663},{{36,6},8921},{{36,8},94988},{{36,10},847688},{{36,12},6568888},{{36,14},45268120},{{36,16},282195928},{{36,18},611807809},{{36,20},518705216},{{36,22},990050297},{{36,24},271051698},{{36,26},122408000},{{36,28},405189613},{{36,30},94926808},{{36,32},864141322},{{36,34},53735275},{{36,36},24011733},{{36,38},736554738},{{36,40},929218491},{{36,42},904644261},{{36,44},780020466},{{36,46},504939462},{{36,48},734736582},{{36,50},905177688},{{36,52},612557341},{{36,54},964587741},{{36,56},714487014},{{36,58},841745335},{{36,60},939266470},{{36,62},221175663},{{36,64},553510265},{{36,66},427922711},{{36,68},816845808},{{36,70},551876447},{{36,72},104782423},{{36,74},432788437},{{36,76},75343637},{{36,78},98990584},{{36,80},780296494},{{36,82},401590023},{{36,84},184896774},{{36,86},39759619},{{36,88},46187357},{{36,90},134251301},{{36,92},342702573},{{36,94},517720},{{36,96},358976055},{{36,98},583636644},{{36,100},962541900},{{36,102},167548822},{{36,104},161325057},{{36,106},550357824},{{36,108},277594189},{{36,110},165080443},{{36,112},231182951},{{36,114},735855208},{{36,116},908711807},{{36,118},571176463},{{36,120},42569340},{{36,122},237272417},{{36,124},790920442},{{36,126},624258522},{{36,128},720842250},{{36,130},768667158},{{36,132},451444080},{{36,134},122083868},{{36,136},366641147},{{36,138},308868590},{{36,140},806102171},{{36,142},616667978},{{36,144},212552319},{{36,146},508058403},{{36,148},321794596},{{36,150},570313528},{{36,152},460066496},{{36,154},737582233},{{36,156},710064955},{{36,158},691296552},{{36,160},63281621},{{36,162},675218599},{{36,164},955697061},{{36,166},110510427},{{36,168},512018248},{{36,170},153536802},{{36,172},745040214},{{36,174},175960352},{{36,176},594730127},{{36,178},864516601},{{36,180},686994354},{{36,182},671193730},{{36,184},758082482},{{36,186},651219990},{{36,188},268055455},{{36,190},209604272},{{36,192},794711886},{{36,194},922988292},{{36,196},233697499},{{36,198},855180879},{{36,200},757331520},{{36,202},952855529},{{36,204},712373324},{{36,206},501054908},{{36,208},610479660},{{36,210},988305583},{{36,212},359797155},{{36,214},981016202},{{36,216},392046260},{{36,218},222705767},{{36,220},339379031},{{36,222},255395660},{{36,224},760704862},{{36,226},824907580},{{36,228},377018926},{{36,230},100950434},{{36,232},568292199},{{36,234},345612839},{{36,236},702169410},{{36,238},76425882},{{36,240},316244660},{{36,242},633878521},{{36,244},345805531},{{36,246},43908232},{{36,248},498746978},{{36,250},171201976},{{36,252},618174067},{{36,254},828038701},{{36,256},451921110},{{36,258},452033897},{{36,260},911744318},{{36,262},64098066},{{36,264},83924105},{{36,266},595571257},{{36,268},147937863},{{36,270},948006101},{{36,272},514496555},{{36,274},77289879},{{36,276},282007238},{{36,278},421799065},{{36,280},804334778},{{36,282},765393189},{{36,284},193008022},{{36,286},263503242},{{36,288},355816072},{{36,290},278012511},{{36,292},227861525},{{36,294},902054870},{{36,296},618486736},{{36,298},979710805},{{36,300},971590402},{{36,302},61042704},{{36,304},664850817},{{36,306},113175896},{{36,308},488535341},{{36,310},617582794},{{36,312},612947413},{{36,314},45804546},{{36,316},259073867},{{36,318},263038734},{{36,320},265569066},{{36,322},162645795},{{36,324},60875191},{{36,326},359494871},{{36,328},979749311},{{36,330},139358127},{{36,332},29529290},{{36,334},309151363},{{36,336},279422923},{{36,338},345089768},{{36,340},87598058},{{36,342},700337527},{{36,344},479652910},{{36,346},994907927},{{36,348},933976635},{{36,350},324751070},{{36,352},167729179},{{36,354},810904540},{{36,356},230096199},{{36,358},33195878},{{36,360},559883815},{{36,362},674302503},{{36,364},158162721},{{36,366},997344757},{{36,368},974400760},{{36,370},476723636},{{36,372},933671908},{{36,374},372458552},{{36,376},487353300},{{36,378},603836216},{{36,380},903251923},{{36,382},461631785},{{36,384},620155186},{{36,386},664707969},{{36,388},139328434},{{36,390},135802315},{{36,392},547850780},{{36,394},544085832},{{36,396},243757336},{{36,398},714792500},{{36,400},277247444},{{36,402},736724545},{{36,404},7257213},{{36,406},104433298},{{36,408},33077964},{{36,410},133546300},{{36,412},658470668},{{36,414},407613385},{{36,416},15549086},{{36,418},409602732},{{36,420},220607605},{{36,422},154437658},{{36,424},434924060},{{36,426},212726357},{{36,428},432662346},{{36,430},953726155},{{36,432},55947205},{{36,434},221865215},{{36,436},896738564},{{36,438},702917595},{{36,440},219549259},{{36,442},784888336},{{36,444},998968443},{{36,446},737927890},{{36,448},111474776},{{36,450},479544893},{{36,452},204531672},{{36,454},722344756},{{36,456},339644359},{{36,458},296335713},{{36,460},172390948},{{36,462},145219000},{{36,464},740849986},{{36,466},175518952},{{36,468},876047366},{{36,470},775536223},{{36,472},909308844},{{36,474},333180421},{{36,476},96764559},{{36,478},528034987},{{36,480},396799645},{{36,482},413114766},{{36,484},622993858},{{36,486},563074288},{{36,488},710510893},{{36,490},900874806},{{36,492},315196225},{{36,494},993816000},{{36,496},623166550},{{36,498},642968249},{{36,500},328645521},{{36,502},844280596},{{36,504},556521945},{{36,506},272458659},{{36,508},580772239},{{36,510},284457451},{{36,512},186994948},{{36,514},909094031},{{36,516},935768265},{{36,518},319893231},{{36,520},114481887},{{36,522},109302906},{{36,524},586737223},{{36,526},466388545},{{36,528},717893242},{{36,530},342269015},{{36,532},164207650},{{36,534},394855609},{{36,536},330099455},{{36,538},836592042},{{36,540},939058426},{{36,542},541984626},{{36,544},852636994},{{36,546},524042858},{{36,548},358495217},{{36,550},921118657},{{36,552},464191254},{{36,554},284341637},{{36,556},363378706},{{36,558},679058686},{{36,560},917272314},{{36,562},562488937},{{36,564},105215359},{{36,566},614330571},{{36,568},404183151},{{36,570},365378837},{{36,572},280141835},{{36,574},594380252},{{36,576},79371576},{{36,578},739360814},{{36,580},210010442},{{36,582},10232401},{{36,584},449147207},{{36,586},97531383},{{36,588},696215921},{{36,590},900156881},{{36,592},51327507},{{36,594},224992261},{{36,596},946786023},{{36,598},685932368},{{36,600},729503576},{{36,602},741723150},{{36,604},479111191},{{36,606},872812474},{{36,608},454570174},{{36,610},217639787},{{36,612},553029674},{{36,614},745481673},{{36,616},194164134},{{36,618},241094015},{{36,620},672191097},{{36,622},520725696},{{36,624},177728245},{{36,626},485102929},{{36,628},511421076},{{36,630},349030122},{{36,632},157631252},{{36,634},431267952},{{36,636},813510823},{{36,638},604978728},{{36,640},799539100},{{36,642},871169236},{{36,644},265066919},{{36,646},191499414},{{36,648},52282294},{{37,0},1},{{37,2},36},{{37,4},700},{{37,6},9656},{{37,8},105307},{{37,10},961912},{{37,12},7625652},{{37,14},53738944},{{37,16},342470612},{{37,18},999200441},{{37,20},797070294},{{37,22},375863958},{{37,24},9523173},{{37,26},166271514},{{37,28},481765400},{{37,30},879554808},{{37,32},535680694},{{37,34},467340394},{{37,36},413500052},{{37,38},692064693},{{37,40},580959888},{{37,42},369347871},{{37,44},169821810},{{37,46},621921924},{{37,48},137911737},{{37,50},940784828},{{37,52},741570244},{{37,54},905517670},{{37,56},551817302},{{37,58},657369119},{{37,60},721648393},{{37,62},536831850},{{37,64},500879720},{{37,66},726253305},{{37,68},296162041},{{37,70},891225164},{{37,72},880747817},{{37,74},182180719},{{37,76},544050763},{{37,78},654393489},{{37,80},357200480},{{37,82},356889637},{{37,84},635049309},{{37,86},374948412},{{37,88},486169649},{{37,90},407475615},{{37,92},51228607},{{37,94},535369936},{{37,96},325305756},{{37,98},74215114},{{37,100},944988254},{{37,102},919680639},{{37,104},647644667},{{37,106},526651696},{{37,108},763479161},{{37,110},278201627},{{37,112},103508412},{{37,114},387580497},{{37,116},561661113},{{37,118},38190290},{{37,120},310583115},{{37,122},569811056},{{37,124},351262691},{{37,126},985051203},{{37,128},403138813},{{37,130},643132429},{{37,132},289980808},{{37,134},570569544},{{37,136},550559442},{{37,138},934893929},{{37,140},352045239},{{37,142},810200946},{{37,144},61218795},{{37,146},42358563},{{37,148},89293505},{{37,150},506603831},{{37,152},400595820},{{37,154},117891860},{{37,156},469015294},{{37,158},166372283},{{37,160},320554017},{{37,162},155147268},{{37,164},955469333},{{37,166},896730515},{{37,168},826039051},{{37,170},931193995},{{37,172},36098122},{{37,174},893366407},{{37,176},522834450},{{37,178},917130400},{{37,180},759016216},{{37,182},23584371},{{37,184},48884561},{{37,186},844352920},{{37,188},604253909},{{37,190},886656394},{{37,192},548946691},{{37,194},688504947},{{37,196},972899398},{{37,198},721435398},{{37,200},409845929},{{37,202},399680456},{{37,204},284950632},{{37,206},796741351},{{37,208},217452678},{{37,210},611033399},{{37,212},592790059},{{37,214},219084711},{{37,216},504058472},{{37,218},277505825},{{37,220},120276345},{{37,222},694287126},{{37,224},35416589},{{37,226},305976723},{{37,228},447309020},{{37,230},969824889},{{37,232},565684997},{{37,234},62139306},{{37,236},857693940},{{37,238},901163636},{{37,240},262850397},{{37,242},927594387},{{37,244},721909425},{{37,246},958991660},{{37,248},471789360},{{37,250},260033992},{{37,252},544270783},{{37,254},877013007},{{37,256},153311613},{{37,258},85679796},{{37,260},660447085},{{37,262},213261352},{{37,264},954007371},{{37,266},8266647},{{37,268},75417194},{{37,270},28241545},{{37,272},733410215},{{37,274},579803150},{{37,276},41901427},{{37,278},876245480},{{37,280},900022334},{{37,282},813145019},{{37,284},668096269},{{37,286},73987267},{{37,288},175135030},{{37,290},724217744},{{37,292},139403302},{{37,294},77167168},{{37,296},775504145},{{37,298},397863476},{{37,300},816272710},{{37,302},221129133},{{37,304},242347768},{{37,306},885383757},{{37,308},728565085},{{37,310},947647994},{{37,312},605379205},{{37,314},598139075},{{37,316},269419404},{{37,318},178994132},{{37,320},603450690},{{37,322},652850980},{{37,324},19254430},{{37,326},182635911},{{37,328},57268581},{{37,330},239936865},{{37,332},878358438},{{37,334},515315850},{{37,336},141611162},{{37,338},665647032},{{37,340},700517198},{{37,342},807335907},{{37,344},965806030},{{37,346},897617342},{{37,348},773532343},{{37,350},924389029},{{37,352},419741954},{{37,354},420757062},{{37,356},581633294},{{37,358},179995348},{{37,360},34733596},{{37,362},923518220},{{37,364},731757774},{{37,366},573741822},{{37,368},531242380},{{37,370},813544540},{{37,372},336821038},{{37,374},442738016},{{37,376},551572674},{{37,378},470067223},{{37,380},638102335},{{37,382},989538200},{{37,384},956007535},{{37,386},613954394},{{37,388},401563904},{{37,390},103519975},{{37,392},569290006},{{37,394},144046622},{{37,396},689996849},{{37,398},638589501},{{37,400},358099514},{{37,402},725282594},{{37,404},691632053},{{37,406},702244532},{{37,408},284031792},{{37,410},473014945},{{37,412},465414316},{{37,414},116886234},{{37,416},142777936},{{37,418},342518645},{{37,420},138051544},{{37,422},347505254},{{37,424},57716395},{{37,426},939744642},{{37,428},114873890},{{37,430},359397343},{{37,432},671360195},{{37,434},724489266},{{37,436},683013222},{{37,438},345781236},{{37,440},550104449},{{37,442},877003874},{{37,444},63443231},{{37,446},224660360},{{37,448},658626409},{{37,450},133687251},{{37,452},933261032},{{37,454},273131705},{{37,456},48202694},{{37,458},144323990},{{37,460},559827621},{{37,462},779609382},{{37,464},930553156},{{37,466},35267489},{{37,468},493151974},{{37,470},645090534},{{37,472},517431516},{{37,474},368634145},{{37,476},540405134},{{37,478},215255527},{{37,480},144656993},{{37,482},549192120},{{37,484},659960465},{{37,486},217236722},{{37,488},742258783},{{37,490},538378955},{{37,492},211409043},{{37,494},760044403},{{37,496},389330065},{{37,498},692548510},{{37,500},583181570},{{37,502},627949137},{{37,504},829194932},{{37,506},234693932},{{37,508},651493437},{{37,510},707321269},{{37,512},828284674},{{37,514},652751037},{{37,516},873736576},{{37,518},267300299},{{37,520},729754896},{{37,522},429920674},{{37,524},875733754},{{37,526},60888792},{{37,528},225478637},{{37,530},39002446},{{37,532},407176220},{{37,534},761384762},{{37,536},131879783},{{37,538},661443680},{{37,540},51638267},{{37,542},568172852},{{37,544},186052558},{{37,546},637968267},{{37,548},556455031},{{37,550},313451921},{{37,552},238551452},{{37,554},644714578},{{37,556},449541818},{{37,558},640800540},{{37,560},923965193},{{37,562},38909678},{{37,564},41940756},{{37,566},338485997},{{37,568},888949941},{{37,570},526610135},{{37,572},48150535},{{37,574},778944981},{{37,576},480892059},{{37,578},874500608},{{37,580},900322190},{{37,582},973783674},{{37,584},468787609},{{37,586},618167632},{{37,588},913754856},{{37,590},327797543},{{37,592},845404908},{{37,594},752246622},{{37,596},831422464},{{37,598},484541178},{{37,600},501948673},{{37,602},647306990},{{37,604},882577308},{{37,606},771072569},{{37,608},171273117},{{37,610},620085552},{{37,612},385025714},{{37,614},126556571},{{37,616},472404266},{{37,618},664907284},{{37,620},284895728},{{37,622},860747643},{{37,624},285481155},{{37,626},480968189},{{37,628},426457284},{{37,630},579997870},{{37,632},253315436},{{37,634},264967992},{{37,636},325506073},{{37,638},407074927},{{37,640},289125366},{{37,642},710111895},{{37,644},168902913},{{37,646},39893459},{{37,648},264014099},{{37,650},335462311},{{37,652},284068808},{{37,654},624620216},{{37,656},265346008},{{37,658},330183605},{{37,660},301153063},{{37,662},136165951},{{37,664},223572391},{{37,666},416076696},{{37,668},791322793},{{37,670},440956632},{{37,672},812128221},{{37,674},56870528},{{37,676},529001955},{{37,678},157225171},{{37,680},153110824},{{37,682},659760559},{{37,684},934444871},{{38,0},1},{{38,2},37},{{38,4},738},{{38,6},10430},{{38,8},116437},{{38,10},1088001},{{38,12},8818820},{{38,14},63517016},{{38,16},413577336},{{38,18},466132154},{{38,20},602224077},{{38,22},950429493},{{38,24},571044537},{{38,26},948550192},{{38,28},759622519},{{38,30},360792951},{{38,32},40404471},{{38,34},549575252},{{38,36},331339348},{{38,38},353289303},{{38,40},642561133},{{38,42},959520386},{{38,44},811439523},{{38,46},113998222},{{38,48},306747368},{{38,50},686402540},{{38,52},608623079},{{38,54},625536502},{{38,56},102898449},{{38,58},513583096},{{38,60},310389938},{{38,62},861964034},{{38,64},144673299},{{38,66},459932354},{{38,68},368865341},{{38,70},656127608},{{38,72},909171212},{{38,74},807159815},{{38,76},446679967},{{38,78},582385365},{{38,80},827063804},{{38,82},980667706},{{38,84},264330272},{{38,86},600794253},{{38,88},740948802},{{38,90},906942889},{{38,92},945728377},{{38,94},18846332},{{38,96},985664112},{{38,98},7701519},{{38,100},115050801},{{38,102},870345183},{{38,104},606442987},{{38,106},443069595},{{38,108},817056595},{{38,110},621418778},{{38,112},690512206},{{38,114},255049968},{{38,116},161633922},{{38,118},402904753},{{38,120},372549674},{{38,122},317848199},{{38,124},779510849},{{38,126},454579621},{{38,128},366999138},{{38,130},955388684},{{38,132},940196190},{{38,134},710141532},{{38,136},289889641},{{38,138},400266971},{{38,140},473006189},{{38,142},518001144},{{38,144},203532149},{{38,146},277752196},{{38,148},73653399},{{38,150},957077834},{{38,152},580796815},{{38,154},797359407},{{38,156},33679102},{{38,158},974181950},{{38,160},229170666},{{38,162},221016673},{{38,164},753153481},{{38,166},718492334},{{38,168},480056326},{{38,170},134801483},{{38,172},829292600},{{38,174},87160542},{{38,176},624566954},{{38,178},157188714},{{38,180},912350324},{{38,182},248797376},{{38,184},864861712},{{38,186},311625650},{{38,188},564724833},{{38,190},638897879},{{38,192},211767349},{{38,194},670618766},{{38,196},182357348},{{38,198},406247054},{{38,200},335828971},{{38,202},235855014},{{38,204},766599169},{{38,206},873180801},{{38,208},943988159},{{38,210},797515463},{{38,212},949064434},{{38,214},37355164},{{38,216},366387587},{{38,218},992037332},{{38,220},39085136},{{38,222},457008562},{{38,224},710738441},{{38,226},147115812},{{38,228},245127944},{{38,230},221285308},{{38,232},44913339},{{38,234},750687382},{{38,236},166494925},{{38,238},487773254},{{38,240},2533400},{{38,242},294773545},{{38,244},964749926},{{38,246},838352064},{{38,248},354747747},{{38,250},983055334},{{38,252},906311260},{{38,254},773970452},{{38,256},136280712},{{38,258},732037766},{{38,260},304757958},{{38,262},868694356},{{38,264},9717274},{{38,266},686595153},{{38,268},845171773},{{38,270},715645486},{{38,272},457517675},{{38,274},868876321},{{38,276},257821804},{{38,278},398717354},{{38,280},952878758},{{38,282},459394839},{{38,284},735151005},{{38,286},982831573},{{38,288},597714383},{{38,290},483469574},{{38,292},396276440},{{38,294},147004054},{{38,296},275175512},{{38,298},449695021},{{38,300},280047682},{{38,302},322443740},{{38,304},657859781},{{38,306},236891682},{{38,308},338855034},{{38,310},771308208},{{38,312},208042945},{{38,314},611383416},{{38,316},470020781},{{38,318},959351211},{{38,320},871193372},{{38,322},314812327},{{38,324},417008584},{{38,326},157794928},{{38,328},30304137},{{38,330},772193806},{{38,332},92880268},{{38,334},735754383},{{38,336},725090032},{{38,338},678769251},{{38,340},695572650},{{38,342},713627047},{{38,344},220917673},{{38,346},996272940},{{38,348},711499227},{{38,350},615337951},{{38,352},732510553},{{38,354},265860373},{{38,356},10346269},{{38,358},946167168},{{38,360},327969286},{{38,362},691646116},{{38,364},588894836},{{38,366},556718107},{{38,368},891256057},{{38,370},29035235},{{38,372},193826291},{{38,374},413628097},{{38,376},951441661},{{38,378},812044940},{{38,380},432676044},{{38,382},866499015},{{38,384},139084375},{{38,386},351784477},{{38,388},900166473},{{38,390},781089061},{{38,392},914118385},{{38,394},818686834},{{38,396},857340116},{{38,398},329139077},{{38,400},237478891},{{38,402},284468211},{{38,404},215304591},{{38,406},458481845},{{38,408},227432873},{{38,410},865995208},{{38,412},554027168},{{38,414},463893384},{{38,416},221077016},{{38,418},374577314},{{38,420},119759917},{{38,422},360383422},{{38,424},704486222},{{38,426},404678036},{{38,428},137104816},{{38,430},809074680},{{38,432},755219457},{{38,434},826569646},{{38,436},867839827},{{38,438},768754773},{{38,440},89100960},{{38,442},257194726},{{38,444},724398193},{{38,446},973188469},{{38,448},858913715},{{38,450},18463743},{{38,452},680309520},{{38,454},450458743},{{38,456},140048366},{{38,458},764912130},{{38,460},371007014},{{38,462},456635116},{{38,464},735728421},{{38,466},778688084},{{38,468},152973997},{{38,470},434969799},{{38,472},574794869},{{38,474},212648988},{{38,476},728361716},{{38,478},542931287},{{38,480},302379989},{{38,482},751579729},{{38,484},92390154},{{38,486},220181191},{{38,488},407743441},{{38,490},315151252},{{38,492},520426045},{{38,494},407908622},{{38,496},679231575},{{38,498},395003916},{{38,500},794034847},{{38,502},347654216},{{38,504},68808817},{{38,506},829211530},{{38,508},81601558},{{38,510},162714123},{{38,512},30761100},{{38,514},394951130},{{38,516},268715057},{{38,518},283612447},{{38,520},241955302},{{38,522},623210420},{{38,524},275963878},{{38,526},159211117},{{38,528},252162685},{{38,530},595441437},{{38,532},529655660},{{38,534},437222092},{{38,536},841111836},{{38,538},179960886},{{38,540},135660761},{{38,542},917237477},{{38,544},768051317},{{38,546},444580903},{{38,548},506791801},{{38,550},487181239},{{38,552},875489229},{{38,554},680194597},{{38,556},205928376},{{38,558},680445786},{{38,560},683783933},{{38,562},969592088},{{38,564},132367844},{{38,566},396994570},{{38,568},832926454},{{38,570},630581401},{{38,572},505495558},{{38,574},385734337},{{38,576},641541057},{{38,578},95095471},{{38,580},989574773},{{38,582},911275608},{{38,584},518514268},{{38,586},282262989},{{38,588},419271827},{{38,590},469001628},{{38,592},420271862},{{38,594},947083037},{{38,596},407529572},{{38,598},59976989},{{38,600},434008630},{{38,602},863717239},{{38,604},945875935},{{38,606},75676474},{{38,608},215313835},{{38,610},250745830},{{38,612},87811894},{{38,614},264747800},{{38,616},37018493},{{38,618},98597371},{{38,620},710706515},{{38,622},142785594},{{38,624},391940962},{{38,626},336466122},{{38,628},341268838},{{38,630},21508490},{{38,632},413865364},{{38,634},232101532},{{38,636},92701632},{{38,638},8053527},{{38,640},412757119},{{38,642},757312194},{{38,644},403681966},{{38,646},949009531},{{38,648},880975038},{{38,650},37050684},{{38,652},272465075},{{38,654},678404684},{{38,656},193438246},{{38,658},672480427},{{38,660},700064004},{{38,662},142628578},{{38,664},802581416},{{38,666},279140871},{{38,668},973655892},{{38,670},800905741},{{38,672},598005728},{{38,674},935768930},{{38,676},668573394},{{38,678},207197197},{{38,680},649003003},{{38,682},270174246},{{38,684},76144766},{{38,686},315632510},{{38,688},875459369},{{38,690},359185050},{{38,692},528086919},{{38,694},473525359},{{38,696},758981160},{{38,698},249109513},{{38,700},189948776},{{38,702},344668617},{{38,704},795917722},{{38,706},549344159},{{38,708},348920520},{{38,710},486734532},{{38,712},302843834},{{38,714},285724416},{{38,716},810790165},{{38,718},350603652},{{38,720},574459989},{{38,722},873908008},{{39,0},1},{{39,2},38},{{39,4},777},{{39,6},11244},{{39,8},128419},{{39,10},1226846},{{39,12},10161959},{{39,14},74764168},{{39,16},497121432},{{39,18},26344483},{{39,20},38234873},{{39,22},423642505},{{39,24},376339808},{{39,26},863392989},{{39,28},917340710},{{39,30},353019266},{{39,32},355701734},{{39,34},828153534},{{39,36},204362640},{{39,38},374924405},{{39,40},607928554},{{39,42},963790885},{{39,44},940721850},{{39,46},687219775},{{39,48},764705852},{{39,50},876861874},{{39,52},763291630},{{39,54},981930457},{{39,56},551085656},{{39,58},980270580},{{39,60},505906881},{{39,62},983294521},{{39,64},135354674},{{39,66},135665519},{{39,68},630173290},{{39,70},212355830},{{39,72},143623144},{{39,74},227056594},{{39,76},817242891},{{39,78},163435465},{{39,80},418550307},{{39,82},731605596},{{39,84},289566443},{{39,86},285968813},{{39,88},433396374},{{39,90},290335437},{{39,92},260134359},{{39,94},257166798},{{39,96},296375223},{{39,98},99595679},{{39,100},459082068},{{39,102},507135523},{{39,104},972388714},{{39,106},133158519},{{39,108},975205558},{{39,110},982374421},{{39,112},644050428},{{39,114},996778111},{{39,116},162109063},{{39,118},746906113},{{39,120},514292299},{{39,122},926426755},{{39,124},356009260},{{39,126},196659267},{{39,128},409916170},{{39,130},325494529},{{39,132},655002543},{{39,134},558511285},{{39,136},36446396},{{39,138},471095084},{{39,140},174722764},{{39,142},671116976},{{39,144},160891233},{{39,146},868903396},{{39,148},304037581},{{39,150},23612943},{{39,152},337881011},{{39,154},234387037},{{39,156},370561646},{{39,158},356075504},{{39,160},698718914},{{39,162},535181667},{{39,164},514726084},{{39,166},815242029},{{39,168},608023573},{{39,170},448544035},{{39,172},835833664},{{39,174},991058290},{{39,176},399256230},{{39,178},20531824},{{39,180},669361826},{{39,182},539724566},{{39,184},760387110},{{39,186},830813942},{{39,188},547045707},{{39,190},178050500},{{39,192},929198630},{{39,194},6813905},{{39,196},110412371},{{39,198},858816899},{{39,200},809729618},{{39,202},833864785},{{39,204},232951975},{{39,206},485491061},{{39,208},613385270},{{39,210},553071180},{{39,212},627954610},{{39,214},952757220},{{39,216},692906182},{{39,218},748961577},{{39,220},662247263},{{39,222},52513186},{{39,224},149763764},{{39,226},145530822},{{39,228},33882391},{{39,230},453364543},{{39,232},997405166},{{39,234},992558694},{{39,236},759602854},{{39,238},84367345},{{39,240},100239977},{{39,242},854081961},{{39,244},858205595},{{39,246},486024240},{{39,248},91555639},{{39,250},177882871},{{39,252},949083392},{{39,254},519037398},{{39,256},556513157},{{39,258},228484413},{{39,260},492836072},{{39,262},589348909},{{39,264},196163508},{{39,266},266626335},{{39,268},11245627},{{39,270},157404436},{{39,272},270481031},{{39,274},638406640},{{39,276},490889097},{{39,278},527976504},{{39,280},370488458},{{39,282},823400678},{{39,284},322868722},{{39,286},206357234},{{39,288},647142926},{{39,290},768625346},{{39,292},265191551},{{39,294},148038615},{{39,296},363341916},{{39,298},267722164},{{39,300},893118504},{{39,302},738977503},{{39,304},565582757},{{39,306},762106365},{{39,308},849369394},{{39,310},766495732},{{39,312},13155357},{{39,314},515888816},{{39,316},523640060},{{39,318},647203814},{{39,320},437352666},{{39,322},546684558},{{39,324},961386555},{{39,326},7614498},{{39,328},893885274},{{39,330},936701598},{{39,332},428062192},{{39,334},113231261},{{39,336},402917050},{{39,338},409965843},{{39,340},165984892},{{39,342},799921270},{{39,344},659405770},{{39,346},509144023},{{39,348},774701607},{{39,350},842603658},{{39,352},487390464},{{39,354},251731862},{{39,356},581859608},{{39,358},922860080},{{39,360},258383681},{{39,362},201597752},{{39,364},292594441},{{39,366},460903867},{{39,368},638298912},{{39,370},848020590},{{39,372},765105850},{{39,374},965506327},{{39,376},844776867},{{39,378},575276415},{{39,380},85481014},{{39,382},653985938},{{39,384},197424999},{{39,386},197600210},{{39,388},989591463},{{39,390},112466859},{{39,392},918937916},{{39,394},878289962},{{39,396},30252094},{{39,398},561367106},{{39,400},701604983},{{39,402},794157139},{{39,404},205106586},{{39,406},358551581},{{39,408},218730442},{{39,410},820317821},{{39,412},718077344},{{39,414},742273426},{{39,416},343977802},{{39,418},723940137},{{39,420},91227055},{{39,422},889419899},{{39,424},835334285},{{39,426},445942872},{{39,428},874169472},{{39,430},806494972},{{39,432},841559090},{{39,434},34902341},{{39,436},936247116},{{39,438},742348345},{{39,440},932764662},{{39,442},776531786},{{39,444},136341990},{{39,446},609226011},{{39,448},962126351},{{39,450},692609037},{{39,452},492230872},{{39,454},512261831},{{39,456},61424189},{{39,458},202712100},{{39,460},557188069},{{39,462},23267751},{{39,464},10862209},{{39,466},780311892},{{39,468},698216821},{{39,470},610626474},{{39,472},445698906},{{39,474},548927052},{{39,476},791636623},{{39,478},278469086},{{39,480},802570473},{{39,482},843652647},{{39,484},214889050},{{39,486},950325814},{{39,488},545811188},{{39,490},732525066},{{39,492},799299048},{{39,494},547938769},{{39,496},119233118},{{39,498},836166054},{{39,500},515368215},{{39,502},821018309},{{39,504},703809789},{{39,506},385697728},{{39,508},474302192},{{39,510},326687407},{{39,512},701322950},{{39,514},753939342},{{39,516},860741461},{{39,518},608860184},{{39,520},481069405},{{39,522},497217661},{{39,524},107822505},{{39,526},538149776},{{39,528},65872865},{{39,530},267685484},{{39,532},630211463},{{39,534},833714775},{{39,536},127007356},{{39,538},988488267},{{39,540},704390393},{{39,542},326686679},{{39,544},330510067},{{39,546},968474337},{{39,548},860095258},{{39,550},865223840},{{39,552},3530159},{{39,554},602833824},{{39,556},943838253},{{39,558},510792598},{{39,560},862215682},{{39,562},804647558},{{39,564},57277705},{{39,566},379631476},{{39,568},611335785},{{39,570},827032941},{{39,572},500396827},{{39,574},166974973},{{39,576},950996383},{{39,578},97277257},{{39,580},336237474},{{39,582},527425945},{{39,584},836169765},{{39,586},13569792},{{39,588},45600126},{{39,590},103702022},{{39,592},589110361},{{39,594},158793934},{{39,596},917834123},{{39,598},750227633},{{39,600},450511448},{{39,602},228174293},{{39,604},380815071},{{39,606},984828008},{{39,608},35225572},{{39,610},19924799},{{39,612},316530723},{{39,614},169463852},{{39,616},11894443},{{39,618},83625994},{{39,620},27918722},{{39,622},725825514},{{39,624},510537357},{{39,626},901592447},{{39,628},560692763},{{39,630},386943274},{{39,632},409576331},{{39,634},409681305},{{39,636},19743037},{{39,638},901841314},{{39,640},504205848},{{39,642},287987501},{{39,644},95070522},{{39,646},999713439},{{39,648},52172335},{{39,650},458657276},{{39,652},716446234},{{39,654},960325619},{{39,656},967217606},{{39,658},29400294},{{39,660},323715881},{{39,662},571473809},{{39,664},542099425},{{39,666},838958945},{{39,668},826022366},{{39,670},215456133},{{39,672},111542899},{{39,674},27057122},{{39,676},264098733},{{39,678},414451664},{{39,680},367598279},{{39,682},660361161},{{39,684},317432327},{{39,686},788309656},{{39,688},482969647},{{39,690},453723335},{{39,692},307123116},{{39,694},46250346},{{39,696},156036134},{{39,698},550671015},{{39,700},501877998},{{39,702},918162544},{{39,704},672414507},{{39,706},744250791},{{39,708},519150731},{{39,710},449335541},{{39,712},717241257},{{39,714},798831268},{{39,716},772517138},{{39,718},286300330},{{39,720},910111510},{{39,722},66350225},{{39,724},850058429},{{39,726},996528049},{{39,728},454249733},{{39,730},463645138},{{39,732},33673728},{{39,734},195487971},{{39,736},700828817},{{39,738},25012182},{{39,740},447505308},{{39,742},968790402},{{39,744},312778627},{{39,746},684898658},{{39,748},698549052},{{39,750},965513947},{{39,752},825161447},{{39,754},410399245},{{39,756},428579579},{{39,758},669192144},{{39,760},82412074},{{40,0},1},{{40,2},39},{{40,4},817},{{40,6},12099},{{40,8},141295},{{40,10},1379381},{{40,12},11669611},{{40,14},87657665},{{40,16},594899060},{{40,18},695536795},{{40,20},226472285},{{40,22},640458905},{{40,24},794561570},{{40,26},378189352},{{40,28},472728269},{{40,30},218438573},{{40,32},56516519},{{40,34},255055733},{{40,36},845027144},{{40,38},588332091},{{40,40},652544873},{{40,42},575593478},{{40,44},251899261},{{40,46},421780632},{{40,48},446749115},{{40,50},397384403},{{40,52},967249876},{{40,54},562965804},{{40,56},307548860},{{40,58},910064219},{{40,60},267557957},{{40,62},532097834},{{40,64},694036707},{{40,66},378870548},{{40,68},124206593},{{40,70},109699395},{{40,72},5415029},{{40,74},722948552},{{40,76},875697847},{{40,78},694452268},{{40,80},7553293},{{40,82},132421363},{{40,84},106964105},{{40,86},391245927},{{40,88},870340375},{{40,90},243365738},{{40,92},69805673},{{40,94},199865008},{{40,96},75486973},{{40,98},171179760},{{40,100},109991897},{{40,102},220793643},{{40,104},513746719},{{40,106},106419838},{{40,108},540171765},{{40,110},580499245},{{40,112},759007158},{{40,114},982900537},{{40,116},645687882},{{40,118},590392656},{{40,120},601803737},{{40,122},221575615},{{40,124},697448067},{{40,126},153409333},{{40,128},368742411},{{40,130},593478736},{{40,132},779784392},{{40,134},983542304},{{40,136},533669091},{{40,138},167997680},{{40,140},729893362},{{40,142},841704349},{{40,144},760614624},{{40,146},47743042},{{40,148},998724205},{{40,150},972938209},{{40,152},77600320},{{40,154},536850090},{{40,156},695359058},{{40,158},769331095},{{40,160},966134679},{{40,162},528777379},{{40,164},695035445},{{40,166},387545073},{{40,168},911151592},{{40,170},242062595},{{40,172},521446824},{{40,174},889535341},{{40,176},920252167},{{40,178},112865832},{{40,180},806555197},{{40,182},118151259},{{40,184},625842139},{{40,186},701618487},{{40,188},790273468},{{40,190},694977537},{{40,192},572862214},{{40,194},473466414},{{40,196},246109368},{{40,198},48621359},{{40,200},353657541},{{40,202},554932622},{{40,204},499105369},{{40,206},867797665},{{40,208},487345603},{{40,210},842033962},{{40,212},519557065},{{40,214},245850790},{{40,216},335288378},{{40,218},782811146},{{40,220},892240358},{{40,222},338051309},{{40,224},826545456},{{40,226},41171254},{{40,228},334148733},{{40,230},152569170},{{40,232},144665017},{{40,234},941279118},{{40,236},897754414},{{40,238},89241104},{{40,240},416864510},{{40,242},41530804},{{40,244},299074740},{{40,246},73588196},{{40,248},959211062},{{40,250},109470038},{{40,252},500259918},{{40,254},366443802},{{40,256},403320596},{{40,258},183957534},{{40,260},992196343},{{40,262},652194487},{{40,264},652679636},{{40,266},980112362},{{40,268},896443763},{{40,270},694053263},{{40,272},85474084},{{40,274},793481845},{{40,276},36502549},{{40,278},113761902},{{40,280},13660255},{{40,282},295744749},{{40,284},768030597},{{40,286},559676644},{{40,288},267907464},{{40,290},329732897},{{40,292},34721556},{{40,294},481917917},{{40,296},470669881},{{40,298},496023609},{{40,300},35319413},{{40,302},426881953},{{40,304},436183525},{{40,306},539581676},{{40,308},797395436},{{40,310},949513087},{{40,312},636400441},{{40,314},684066319},{{40,316},283217124},{{40,318},456809507},{{40,320},742722246},{{40,322},708837224},{{40,324},1825110},{{40,326},845476655},{{40,328},721485134},{{40,330},509524702},{{40,332},571748192},{{40,334},313097600},{{40,336},164720049},{{40,338},83489702},{{40,340},463694600},{{40,342},122519767},{{40,344},438333196},{{40,346},350973050},{{40,348},742760174},{{40,350},292313656},{{40,352},699166885},{{40,354},733491013},{{40,356},480543050},{{40,358},245749577},{{40,360},741817620},{{40,362},207993307},{{40,364},244579067},{{40,366},622422144},{{40,368},604751887},{{40,370},899189402},{{40,372},151409381},{{40,374},217727618},{{40,376},880477312},{{40,378},214663719},{{40,380},394263729},{{40,382},196688383},{{40,384},548030201},{{40,386},726215545},{{40,388},464673145},{{40,390},261250632},{{40,392},625458514},{{40,394},838784252},{{40,396},982491280},{{40,398},700533618},{{40,400},585918514},{{40,402},160625577},{{40,404},639912412},{{40,406},329107337},{{40,408},639996475},{{40,410},820595096},{{40,412},822718095},{{40,414},278815123},{{40,416},496262265},{{40,418},918547360},{{40,420},8027724},{{40,422},726754416},{{40,424},823448457},{{40,426},260321413},{{40,428},863184482},{{40,430},650858805},{{40,432},276099402},{{40,434},685460415},{{40,436},954079520},{{40,438},733965175},{{40,440},676833996},{{40,442},368637623},{{40,444},143549481},{{40,446},304621819},{{40,448},472579474},{{40,450},749596748},{{40,452},116386311},{{40,454},410243381},{{40,456},633945382},{{40,458},411647917},{{40,460},177570608},{{40,462},616578162},{{40,464},767744928},{{40,466},61290651},{{40,468},523112125},{{40,470},276619822},{{40,472},15151789},{{40,474},253528389},{{40,476},167816966},{{40,478},891846580},{{40,480},541892511},{{40,482},341041750},{{40,484},391023167},{{40,486},293092921},{{40,488},243156326},{{40,490},622723871},{{40,492},473135257},{{40,494},726189187},{{40,496},379573236},{{40,498},555335821},{{40,500},257038714},{{40,502},482079083},{{40,504},723871307},{{40,506},606515981},{{40,508},65251208},{{40,510},632383753},{{40,512},147352575},{{40,514},594192641},{{40,516},924833549},{{40,518},483314326},{{40,520},808069004},{{40,522},770319259},{{40,524},427864560},{{40,526},25642674},{{40,528},464671587},{{40,530},569308215},{{40,532},637300329},{{40,534},923466624},{{40,536},23057035},{{40,538},86870702},{{40,540},983746124},{{40,542},846059215},{{40,544},574808201},{{40,546},554549209},{{40,548},446310553},{{40,550},959681948},{{40,552},778636627},{{40,554},211592095},{{40,556},516682914},{{40,558},291911580},{{40,560},587928798},{{40,562},427680003},{{40,564},894209596},{{40,566},866648165},{{40,568},679666232},{{40,570},460484096},{{40,572},854394115},{{40,574},982195268},{{40,576},822495481},{{40,578},835383529},{{40,580},431162040},{{40,582},830468499},{{40,584},195346596},{{40,586},57036658},{{40,588},866149457},{{40,590},860543178},{{40,592},818146210},{{40,594},279107618},{{40,596},892401239},{{40,598},225036974},{{40,600},868558986},{{40,602},685134666},{{40,604},744469605},{{40,606},156127522},{{40,608},187537334},{{40,610},788919638},{{40,612},909025900},{{40,614},672187019},{{40,616},217419201},{{40,618},384265406},{{40,620},616374282},{{40,622},378322214},{{40,624},141913342},{{40,626},501653295},{{40,628},461070473},{{40,630},25985020},{{40,632},589549638},{{40,634},109433868},{{40,636},888240019},{{40,638},931367280},{{40,640},762349235},{{40,642},234613827},{{40,644},765084315},{{40,646},611038359},{{40,648},758764450},{{40,650},286873014},{{40,652},382512476},{{40,654},382119459},{{40,656},20294058},{{40,658},943700532},{{40,660},211933192},{{40,662},58390954},{{40,664},180966724},{{40,666},929698288},{{40,668},805610393},{{40,670},509211182},{{40,672},866583662},{{40,674},775212548},{{40,676},88368846},{{40,678},726939816},{{40,680},185342247},{{40,682},229877142},{{40,684},705155204},{{40,686},200856219},{{40,688},36832958},{{40,690},610458570},{{40,692},660966337},{{40,694},749737121},{{40,696},592806565},{{40,698},894272325},{{40,700},480779946},{{40,702},649154472},{{40,704},88597955},{{40,706},74084666},{{40,708},744113332},{{40,710},528684751},{{40,712},282107891},{{40,714},100372245},{{40,716},756922141},{{40,718},58776739},{{40,720},981772435},{{40,722},924634098},{{40,724},951039927},{{40,726},397719622},{{40,728},577729727},{{40,730},762973087},{{40,732},736969640},{{40,734},674672356},{{40,736},297937804},{{40,738},986319572},{{40,740},149411109},{{40,742},496025335},{{40,744},118765897},{{40,746},173573997},{{40,748},13186371},{{40,750},696131467},{{40,752},139811703},{{40,754},497652080},{{40,756},238358226},{{40,758},252091863},{{40,760},126575962},{{40,762},416549513},{{40,764},112043953},{{40,766},769546766},{{40,768},210139961},{{40,770},218718185},{{40,772},975953506},{{40,774},930028805},{{40,776},845629302},{{40,778},57030776},{{40,780},852433935},{{40,782},836915594},{{40,784},400219298},{{40,786},622051773},{{40,788},829969111},{{40,790},114603161},{{40,792},10751254},{{40,794},909008878},{{40,796},579282117},{{40,798},214070865},{{40,800},563200757},{{41,0},1},{{41,2},40},{{41,4},858},{{41,6},12996},{{41,8},155108},{{41,10},1546584},{{41,12},13357338},{{41,14},102391268},{{41,16},708914679},{{41,18},491589996},{{41,20},307979410},{{41,22},602522471},{{41,24},317222127},{{41,26},290284759},{{41,28},54099411},{{41,30},989042041},{{41,32},349750818},{{41,34},106531062},{{41,36},706143382},{{41,38},63807262},{{41,40},819412921},{{41,42},144007031},{{41,44},937903432},{{41,46},671633208},{{41,48},144280187},{{41,50},535961584},{{41,52},391683158},{{41,54},665684992},{{41,56},173615217},{{41,58},173957993},{{41,60},353557533},{{41,62},689224661},{{41,64},70346145},{{41,66},249590014},{{41,68},418977958},{{41,70},826283746},{{41,72},394602103},{{41,74},916349862},{{41,76},513826761},{{41,78},491750575},{{41,80},183159109},{{41,82},757685121},{{41,84},418341803},{{41,86},274891227},{{41,88},642914114},{{41,90},790796259},{{41,92},588464975},{{41,94},740365449},{{41,96},551222753},{{41,98},10565934},{{41,100},35820801},{{41,102},515689568},{{41,104},211177017},{{41,106},828019707},{{41,108},68961130},{{41,110},155306993},{{41,112},295844962},{{41,114},698696703},{{41,116},264483577},{{41,118},967049520},{{41,120},615265667},{{41,122},559761896},{{41,124},719262960},{{41,126},509462378},{{41,128},575657367},{{41,130},591920899},{{41,132},676732702},{{41,134},723371825},{{41,136},327050158},{{41,138},311506131},{{41,140},94078284},{{41,142},608080285},{{41,144},992236405},{{41,146},137506625},{{41,148},399044419},{{41,150},458634324},{{41,152},553334522},{{41,154},801149022},{{41,156},685520978},{{41,158},446537546},{{41,160},993927587},{{41,162},293142441},{{41,164},349812890},{{41,166},364132070},{{41,168},129851348},{{41,170},857298051},{{41,172},877404263},{{41,174},877505804},{{41,176},63808796},{{41,178},43779853},{{41,180},597054006},{{41,182},757518688},{{41,184},847719064},{{41,186},814336009},{{41,188},295491019},{{41,190},566317327},{{41,192},427355879},{{41,194},99632937},{{41,196},271930495},{{41,198},211594531},{{41,200},907085661},{{41,202},370381473},{{41,204},40651392},{{41,206},893659649},{{41,208},363630034},{{41,210},486697292},{{41,212},957988008},{{41,214},762036357},{{41,216},927839193},{{41,218},855832860},{{41,220},336383816},{{41,222},307639758},{{41,224},266751066},{{41,226},682795763},{{41,228},757933830},{{41,230},702637096},{{41,232},416587519},{{41,234},241670221},{{41,236},803239702},{{41,238},991067388},{{41,240},753770489},{{41,242},69318095},{{41,244},379601638},{{41,246},829408102},{{41,248},918333643},{{41,250},833524181},{{41,252},647446668},{{41,254},999853061},{{41,256},600717076},{{41,258},736359930},{{41,260},166694847},{{41,262},912637361},{{41,264},883248816},{{41,266},334184966},{{41,268},360770954},{{41,270},907814459},{{41,272},571070899},{{41,274},760625736},{{41,276},543003305},{{41,278},12232839},{{41,280},27415041},{{41,282},235755079},{{41,284},155935992},{{41,286},895456358},{{41,288},299525687},{{41,290},387663753},{{41,292},430722193},{{41,294},845849975},{{41,296},389897647},{{41,298},157165043},{{41,300},232374231},{{41,302},709459451},{{41,304},819494807},{{41,306},873294798},{{41,308},982307907},{{41,310},723241456},{{41,312},529916420},{{41,314},190269000},{{41,316},832006535},{{41,318},157577121},{{41,320},119818595},{{41,322},751958343},{{41,324},818604698},{{41,326},923214476},{{41,328},455357809},{{41,330},664208514},{{41,332},204222119},{{41,334},358021985},{{41,336},507909159},{{41,338},532713722},{{41,340},447934290},{{41,342},550255949},{{41,344},9030523},{{41,346},204809569},{{41,348},704696131},{{41,350},798537153},{{41,352},779574805},{{41,354},146334295},{{41,356},422444856},{{41,358},763243391},{{41,360},968318292},{{41,362},409596303},{{41,364},730176788},{{41,366},661449533},{{41,368},145680243},{{41,370},291092743},{{41,372},406566554},{{41,374},840725280},{{41,376},859336604},{{41,378},385485264},{{41,380},540592314},{{41,382},491573347},{{41,384},430591599},{{41,386},799102625},{{41,388},349645352},{{41,390},953856191},{{41,392},685505744},{{41,394},968883032},{{41,396},548153198},{{41,398},991972402},{{41,400},298640488},{{41,402},335784052},{{41,404},560792641},{{41,406},200482497},{{41,408},534424478},{{41,410},835919822},{{41,412},256133832},{{41,414},789502694},{{41,416},815463653},{{41,418},367192054},{{41,420},711296060},{{41,422},505894941},{{41,424},749371649},{{41,426},586599852},{{41,428},478956964},{{41,430},771301542},{{41,432},936596369},{{41,434},641013477},{{41,436},895880622},{{41,438},275251735},{{41,440},709512313},{{41,442},675062513},{{41,444},900057226},{{41,446},864601515},{{41,448},604121575},{{41,450},213439255},{{41,452},718556713},{{41,454},352300658},{{41,456},293209273},{{41,458},62461535},{{41,460},212741657},{{41,462},925233457},{{41,464},601757735},{{41,466},357273411},{{41,468},900952265},{{41,470},337965737},{{41,472},654516053},{{41,474},138964736},{{41,476},683012438},{{41,478},388413281},{{41,480},151113816},{{41,482},328964247},{{41,484},191920444},{{41,486},84786019},{{41,488},179152386},{{41,490},346561188},{{41,492},643354711},{{41,494},718267295},{{41,496},169193229},{{41,498},252223726},{{41,500},887596939},{{41,502},657097686},{{41,504},142103925},{{41,506},40078284},{{41,508},150004901},{{41,510},459569297},{{41,512},459199105},{{41,514},789641065},{{41,516},6481222},{{41,518},858687076},{{41,520},375816137},{{41,522},147145108},{{41,524},520309635},{{41,526},748217920},{{41,528},667457550},{{41,530},716254093},{{41,532},186260954},{{41,534},725808394},{{41,536},626037945},{{41,538},743543562},{{41,540},764478177},{{41,542},601933842},{{41,544},797462265},{{41,546},777370200},{{41,548},654651513},{{41,550},156072819},{{41,552},707272486},{{41,554},178868661},{{41,556},27986290},{{41,558},925976600},{{41,560},457000898},{{41,562},540704905},{{41,564},843382395},{{41,566},769084631},{{41,568},760118502},{{41,570},476552208},{{41,572},749317409},{{41,574},710185045},{{41,576},964800796},{{41,578},516878606},{{41,580},266237510},{{41,582},913933501},{{41,584},813693982},{{41,586},336046538},{{41,588},762072594},{{41,590},997287607},{{41,592},756174558},{{41,594},615699332},{{41,596},325935068},{{41,598},478725181},{{41,600},294206110},{{41,602},71125626},{{41,604},862744505},{{41,606},369229533},{{41,608},687983312},{{41,610},908265361},{{41,612},496504119},{{41,614},960935105},{{41,616},69879109},{{41,618},315010091},{{41,620},778995602},{{41,622},757128123},{{41,624},249975621},{{41,626},699329744},{{41,628},984761141},{{41,630},255696873},{{41,632},966070938},{{41,634},214893935},{{41,636},551564463},{{41,638},316442626},{{41,640},532269369},{{41,642},314110968},{{41,644},128028415},{{41,646},969165598},{{41,648},561496103},{{41,650},817486578},{{41,652},282697706},{{41,654},480617072},{{41,656},509205119},{{41,658},834540584},{{41,660},277705122},{{41,662},660874354},{{41,664},778117470},{{41,666},366056531},{{41,668},831243822},{{41,670},903068403},{{41,672},672944646},{{41,674},441340373},{{41,676},340680954},{{41,678},617276976},{{41,680},849516577},{{41,682},560088434},{{41,684},230800586},{{41,686},10428026},{{41,688},372559113},{{41,690},922230949},{{41,692},889642650},{{41,694},244184042},{{41,696},533938488},{{41,698},841639506},{{41,700},817920213},{{41,702},336934324},{{41,704},44823033},{{41,706},565545678},{{41,708},701086145},{{41,710},241957483},{{41,712},114182239},{{41,714},850726147},{{41,716},526783422},{{41,718},115816117},{{41,720},835376982},{{41,722},659266467},{{41,724},815849396},{{41,726},168028335},{{41,728},255187925},{{41,730},748491938},{{41,732},622185783},{{41,734},663040863},{{41,736},743392515},{{41,738},163408177},{{41,740},383060357},{{41,742},31556416},{{41,744},794030948},{{41,746},934245344},{{41,748},258437764},{{41,750},379321408},{{41,752},40236316},{{41,754},660469577},{{41,756},655665845},{{41,758},690942361},{{41,760},375378322},{{41,762},568352979},{{41,764},602028119},{{41,766},317437606},{{41,768},657543398},{{41,770},100015852},{{41,772},252684947},{{41,774},481051042},{{41,776},964341166},{{41,778},522946308},{{41,780},280791483},{{41,782},467949044},{{41,784},475945690},{{41,786},972019230},{{41,788},462068105},{{41,790},580258224},{{41,792},819125286},{{41,794},65219413},{{41,796},675919204},{{41,798},938373431},{{41,800},246074242},{{41,802},416112669},{{41,804},990084376},{{41,806},992206586},{{41,808},174382581},{{41,810},694468435},{{41,812},670357482},{{41,814},52707698},{{41,816},430228891},{{41,818},194064984},{{41,820},374269653},{{41,822},873105421},{{41,824},89789806},{{41,826},360326019},{{41,828},422866288},{{41,830},247972613},{{41,832},990139142},{{41,834},766813630},{{41,836},25619403},{{41,838},929658745},{{41,840},91230876},{{42,0},1},{{42,2},41},{{42,4},900},{{42,6},13936},{{42,8},169902},{{42,10},1729478},{{42,12},15241768},{{42,14},119176344},{{42,16},841399673},{{42,18},434809990},{{42,20},446105964},{{42,22},492649140},{{42,24},758977149},{{42,26},206041682},{{42,28},323715565},{{42,30},660084286},{{42,32},595902939},{{42,34},912996958},{{42,36},734408694},{{42,38},639760787},{{42,40},253066665},{{42,42},208103163},{{42,44},518638879},{{42,46},141246298},{{42,48},316067064},{{42,50},932295902},{{42,52},638352197},{{42,54},835906694},{{42,56},518593201},{{42,58},772224592},{{42,60},710767801},{{42,62},155069328},{{42,64},87760296},{{42,66},888628863},{{42,68},85616127},{{42,70},159719113},{{42,72},852745152},{{42,74},116208329},{{42,76},603162784},{{42,78},598162586},{{42,80},214665773},{{42,82},928212607},{{42,84},364268988},{{42,86},422947444},{{42,88},91651894},{{42,90},294508512},{{42,92},306449339},{{42,94},29129368},{{42,96},721764444},{{42,98},23720919},{{42,100},155935808},{{42,102},134434641},{{42,104},906918132},{{42,106},581645037},{{42,108},673925534},{{42,110},656820458},{{42,112},712140580},{{42,114},940311261},{{42,116},639783029},{{42,118},193680127},{{42,120},625191701},{{42,122},485391283},{{42,124},454129733},{{42,126},912047676},{{42,128},531795443},{{42,130},151893083},{{42,132},16212124},{{42,134},506754047},{{42,136},491882623},{{42,138},143293012},{{42,140},25311790},{{42,142},265858487},{{42,144},730580376},{{42,146},281408346},{{42,148},313354998},{{42,150},904477185},{{42,152},246774679},{{42,154},76212745},{{42,156},790588368},{{42,158},952519623},{{42,160},156839403},{{42,162},194467618},{{42,164},872887052},{{42,166},91963369},{{42,168},534129628},{{42,170},238356180},{{42,172},632320800},{{42,174},58443419},{{42,176},722943306},{{42,178},618550091},{{42,180},33518175},{{42,182},519583410},{{42,184},960079192},{{42,186},538023159},{{42,188},305123951},{{42,190},486152058},{{42,192},294482726},{{42,194},518323725},{{42,196},455607677},{{42,198},182021187},{{42,200},748135143},{{42,202},512410493},{{42,204},35362801},{{42,206},719659644},{{42,208},317014598},{{42,210},528329960},{{42,212},583008290},{{42,214},443175574},{{42,216},659178079},{{42,218},174647583},{{42,220},349497845},{{42,222},577399146},{{42,224},818913619},{{42,226},271472027},{{42,228},656817275},{{42,230},494680790},{{42,232},969710982},{{42,234},229444476},{{42,236},267631925},{{42,238},175671131},{{42,240},35511369},{{42,242},58752774},{{42,244},135202754},{{42,246},944159958},{{42,248},464206230},{{42,250},475819996},{{42,252},314325811},{{42,254},754861491},{{42,256},276808552},{{42,258},810159244},{{42,260},91192489},{{42,262},626570800},{{42,264},590621471},{{42,266},514780234},{{42,268},305537247},{{42,270},801654104},{{42,272},149383516},{{42,274},787215362},{{42,276},114530579},{{42,278},859617326},{{42,280},613074050},{{42,282},468568467},{{42,284},919259772},{{42,286},617744284},{{42,288},340905322},{{42,290},985953212},{{42,292},372028816},{{42,294},217079653},{{42,296},938494776},{{42,298},284906842},{{42,300},769978385},{{42,302},515786223},{{42,304},285120775},{{42,306},375534381},{{42,308},675385916},{{42,310},665832700},{{42,312},133450834},{{42,314},3874364},{{42,316},408375526},{{42,318},770616302},{{42,320},276273159},{{42,322},413928636},{{42,324},723794836},{{42,326},198571707},{{42,328},678091222},{{42,330},296508406},{{42,332},529916658},{{42,334},588863591},{{42,336},413257244},{{42,338},498474249},{{42,340},915935032},{{42,342},120501359},{{42,344},836927142},{{42,346},230121084},{{42,348},774509032},{{42,350},870826787},{{42,352},489996192},{{42,354},917057075},{{42,356},196187219},{{42,358},383821852},{{42,360},922336284},{{42,362},22274995},{{42,364},748507616},{{42,366},607632780},{{42,368},183109949},{{42,370},339998525},{{42,372},507933598},{{42,374},698781318},{{42,376},498085612},{{42,378},803731847},{{42,380},473820207},{{42,382},901546035},{{42,384},302928184},{{42,386},865394080},{{42,388},114078163},{{42,390},2199878},{{42,392},779942965},{{42,394},594445523},{{42,396},91527221},{{42,398},272107811},{{42,400},718335802},{{42,402},365412741},{{42,404},52329171},{{42,406},414520032},{{42,408},494974650},{{42,410},300177708},{{42,412},811610962},{{42,414},146810674},{{42,416},337728819},{{42,418},506402762},{{42,420},403329973},{{42,422},694340600},{{42,424},766854981},{{42,426},757139989},{{42,428},188368338},{{42,430},788752320},{{42,432},918847437},{{42,434},928046733},{{42,436},527551285},{{42,438},479184799},{{42,440},517252899},{{42,442},712149490},{{42,444},791491255},{{42,446},238449676},{{42,448},667119615},{{42,450},757940899},{{42,452},445679476},{{42,454},734062646},{{42,456},326185889},{{42,458},40504124},{{42,460},623294475},{{42,462},807102585},{{42,464},697275776},{{42,466},960233124},{{42,468},90479243},{{42,470},277423126},{{42,472},459856976},{{42,474},523164613},{{42,476},283246190},{{42,478},353589088},{{42,480},214300387},{{42,482},783487356},{{42,484},692462518},{{42,486},267488040},{{42,488},851918218},{{42,490},799153667},{{42,492},810257248},{{42,494},109085516},{{42,496},633189413},{{42,498},670646041},{{42,500},913414538},{{42,502},526057886},{{42,504},701571781},{{42,506},823895555},{{42,508},366072317},{{42,510},141394361},{{42,512},832809290},{{42,514},464577360},{{42,516},305577012},{{42,518},512815120},{{42,520},121404516},{{42,522},195457318},{{42,524},321946163},{{42,526},309097012},{{42,528},239601477},{{42,530},94799504},{{42,532},314416433},{{42,534},43085740},{{42,536},639634392},{{42,538},892727867},{{42,540},559091131},{{42,542},668748148},{{42,544},422889784},{{42,546},711508368},{{42,548},676630033},{{42,550},634668710},{{42,552},364293294},{{42,554},844937242},{{42,556},751071408},{{42,558},322260215},{{42,560},891789141},{{42,562},187899827},{{42,564},511558264},{{42,566},521391391},{{42,568},670781806},{{42,570},509672700},{{42,572},51147255},{{42,574},62331255},{{42,576},681097643},{{42,578},668432081},{{42,580},698715101},{{42,582},46454740},{{42,584},726474418},{{42,586},934462337},{{42,588},72103891},{{42,590},408373632},{{42,592},957100449},{{42,594},670661469},{{42,596},786800623},{{42,598},834620545},{{42,600},287400489},{{42,602},490496888},{{42,604},497846381},{{42,606},189806313},{{42,608},912940390},{{42,610},809020495},{{42,612},703284720},{{42,614},835793884},{{42,616},605744360},{{42,618},923348658},{{42,620},214377202},{{42,622},697918809},{{42,624},343995053},{{42,626},445012242},{{42,628},544883273},{{42,630},475774494},{{42,632},73159748},{{42,634},664916820},{{42,636},945806189},{{42,638},388033609},{{42,640},184443581},{{42,642},891139166},{{42,644},132967061},{{42,646},662232592},{{42,648},630310273},{{42,650},296941879},{{42,652},926467100},{{42,654},732662520},{{42,656},755030683},{{42,658},373067237},{{42,660},200501225},{{42,662},132039597},{{42,664},621016442},{{42,666},864116597},{{42,668},199168443},{{42,670},229224627},{{42,672},19895297},{{42,674},392227721},{{42,676},512572983},{{42,678},888183257},{{42,680},954225811},{{42,682},362992884},{{42,684},408318299},{{42,686},664465052},{{42,688},828120392},{{42,690},703374891},{{42,692},61248349},{{42,694},16358204},{{42,696},241119413},{{42,698},30565637},{{42,700},838212406},{{42,702},921697699},{{42,704},543334430},{{42,706},89858526},{{42,708},273185879},{{42,710},355471309},{{42,712},304528048},{{42,714},507574008},{{42,716},476038937},{{42,718},789196651},{{42,720},57644735},{{42,722},932966132},{{42,724},292240565},{{42,726},284284800},{{42,728},198355642},{{42,730},844613937},{{42,732},375170024},{{42,734},881957600},{{42,736},108981244},{{42,738},644631978},{{42,740},730251746},{{42,742},563646094},{{42,744},15703371},{{42,746},891969119},{{42,748},462467018},{{42,750},842418885},{{42,752},184776107},{{42,754},20489508},{{42,756},525173823},{{42,758},93913531},{{42,760},199936707},{{42,762},49296883},{{42,764},500271791},{{42,766},9386940},{{42,768},42793104},{{42,770},102301079},{{42,772},299925062},{{42,774},242848544},{{42,776},157270543},{{42,778},567750735},{{42,780},512260765},{{42,782},540910896},{{42,784},473863432},{{42,786},123756576},{{42,788},867793612},{{42,790},940752336},{{42,792},189701376},{{42,794},338838501},{{42,796},163690216},{{42,798},120916067},{{42,800},790468763},{{42,802},680974009},{{42,804},939542025},{{42,806},299064055},{{42,808},752326705},{{42,810},668302564},{{42,812},775312490},{{42,814},929999123},{{42,816},713601128},{{42,818},593704708},{{42,820},595301628},{{42,822},539445680},{{42,824},220384571},{{42,826},492539730},{{42,828},572951883},{{42,830},264745653},{{42,832},946510661},{{42,834},751486844},{{42,836},372815432},{{42,838},445849920},{{42,840},481560920},{{42,842},887629330},{{42,844},46438187},{{42,846},433046906},{{42,848},550746520},{{42,850},68280122},{{42,852},549536967},{{42,854},98170304},{{42,856},942092421},{{42,858},657076175},{{42,860},85959544},{{42,862},736296914},{{42,864},244774210},{{42,866},196059783},{{42,868},968298850},{{42,870},183375217},{{42,872},810099519},{{42,874},413635020},{{42,876},636120983},{{42,878},396309504},{{42,880},740465895},{{42,882},371532101},{{43,0},1},{{43,2},42},{{43,4},943},{{43,6},14920},{{43,8},185722},{{43,10},1929132},{{43,12},17340642},{{43,14},138243024},{{43,16},994832181},{{43,18},548192008},{{43,20},829424358},{{43,22},702470585},{{43,24},488681655},{{43,26},275370643},{{43,28},835638795},{{43,30},810867407},{{43,32},286977068},{{43,34},950047225},{{43,36},83539435},{{43,38},44629372},{{43,40},288790619},{{43,42},507410843},{{43,44},264046736},{{43,46},483012816},{{43,48},672138691},{{43,50},875194556},{{43,52},651203850},{{43,54},66911617},{{43,56},918075656},{{43,58},674825734},{{43,60},94581776},{{43,62},415282344},{{43,64},303997379},{{43,66},819537616},{{43,68},622429217},{{43,70},698967413},{{43,72},751254549},{{43,74},420414807},{{43,76},687830513},{{43,78},601402264},{{43,80},434289505},{{43,82},724948167},{{43,84},754889253},{{43,86},808542135},{{43,88},995391960},{{43,90},178813332},{{43,92},724416372},{{43,94},177739106},{{43,96},814105099},{{43,98},753597104},{{43,100},45856871},{{43,102},272275296},{{43,104},786414287},{{43,106},511285559},{{43,108},160720229},{{43,110},317562390},{{43,112},790336119},{{43,114},868224061},{{43,116},359611251},{{43,118},78736463},{{43,120},773457035},{{43,122},927802445},{{43,124},421722380},{{43,126},116775238},{{43,128},364696053},{{43,130},502866895},{{43,132},626441652},{{43,134},490807991},{{43,136},713262576},{{43,138},797949369},{{43,140},598695934},{{43,142},260170588},{{43,144},82830001},{{43,146},494545919},{{43,148},272206045},{{43,150},443643728},{{43,152},598266021},{{43,154},33015507},{{43,156},884148700},{{43,158},307476402},{{43,160},959867411},{{43,162},216334812},{{43,164},800291904},{{43,166},985570368},{{43,168},488188448},{{43,170},107147695},{{43,172},538136243},{{43,174},662412600},{{43,176},979298525},{{43,178},134498654},{{43,180},226734918},{{43,182},727004323},{{43,184},749341953},{{43,186},119616289},{{43,188},344235011},{{43,190},179701806},{{43,192},771727176},{{43,194},867138213},{{43,196},462181714},{{43,198},886155872},{{43,200},120844409},{{43,202},637609736},{{43,204},732957723},{{43,206},950929297},{{43,208},917858187},{{43,210},787591285},{{43,212},658307576},{{43,214},752393246},{{43,216},363474545},{{43,218},410621001},{{43,220},994736846},{{43,222},177814531},{{43,224},780475306},{{43,226},862888709},{{43,228},592093607},{{43,230},579502147},{{43,232},557845688},{{43,234},288775481},{{43,236},603183203},{{43,238},577960148},{{43,240},788283409},{{43,242},673824051},{{43,244},683888139},{{43,246},877184660},{{43,248},633236685},{{43,250},114600324},{{43,252},443874806},{{43,254},243845462},{{43,256},737247494},{{43,258},816215602},{{43,260},301818289},{{43,262},678209727},{{43,264},613605938},{{43,266},858234475},{{43,268},818583083},{{43,270},638002191},{{43,272},955539556},{{43,274},166659792},{{43,276},402119583},{{43,278},136117938},{{43,280},121601666},{{43,282},755992562},{{43,284},47984728},{{43,286},295575049},{{43,288},499852111},{{43,290},307179145},{{43,292},332974068},{{43,294},315732357},{{43,296},716712867},{{43,298},640162541},{{43,300},867854182},{{43,302},934376752},{{43,304},313718034},{{43,306},59903781},{{43,308},946384843},{{43,310},119557570},{{43,312},525136020},{{43,314},151571916},{{43,316},798992199},{{43,318},641098837},{{43,320},260839275},{{43,322},993458171},{{43,324},824535499},{{43,326},355644177},{{43,328},761912070},{{43,330},816737774},{{43,332},16159145},{{43,334},269418274},{{43,336},606453921},{{43,338},360745230},{{43,340},8968332},{{43,342},697762673},{{43,344},987763777},{{43,346},660889863},{{43,348},735951723},{{43,350},644168107},{{43,352},694447061},{{43,354},112348183},{{43,356},530007620},{{43,358},3042837},{{43,360},764274326},{{43,362},848173528},{{43,364},194620935},{{43,366},635775962},{{43,368},259196720},{{43,370},713828904},{{43,372},940082694},{{43,374},457694335},{{43,376},838811079},{{43,378},742877821},{{43,380},825043434},{{43,382},999682813},{{43,384},323541591},{{43,386},50872352},{{43,388},337477908},{{43,390},513975090},{{43,392},485543671},{{43,394},991738379},{{43,396},437900643},{{43,398},771900426},{{43,400},686428428},{{43,402},563411325},{{43,404},914169111},{{43,406},935692665},{{43,408},43568184},{{43,410},490175371},{{43,412},749564693},{{43,414},101137943},{{43,416},245839802},{{43,418},603981104},{{43,420},626386341},{{43,422},386920859},{{43,424},413292672},{{43,426},913439917},{{43,428},70347116},{{43,430},434898910},{{43,432},144090153},{{43,434},824132212},{{43,436},891175519},{{43,438},132402569},{{43,440},347193520},{{43,442},969072546},{{43,444},16729602},{{43,446},608672301},{{43,448},618817500},{{43,450},911982521},{{43,452},688615529},{{43,454},732174336},{{43,456},500282116},{{43,458},497352932},{{43,460},456415575},{{43,462},878875953},{{43,464},316115544},{{43,466},915703538},{{43,468},598465482},{{43,470},596140294},{{43,472},730305232},{{43,474},164832432},{{43,476},897815573},{{43,478},166896959},{{43,480},324516472},{{43,482},764718824},{{43,484},566396641},{{43,486},914517008},{{43,488},874306816},{{43,490},779763109},{{43,492},852306547},{{43,494},611269114},{{43,496},292511571},{{43,498},915381300},{{43,500},758955270},{{43,502},257373679},{{43,504},74625589},{{43,506},121789415},{{43,508},230596845},{{43,510},205840454},{{43,512},916544901},{{43,514},23902587},{{43,516},416402779},{{43,518},293269031},{{43,520},510816400},{{43,522},975368660},{{43,524},955188220},{{43,526},72244504},{{43,528},561311434},{{43,530},137072009},{{43,532},127537010},{{43,534},860723336},{{43,536},883260674},{{43,538},394382836},{{43,540},913512596},{{43,542},497775666},{{43,544},206616201},{{43,546},483790701},{{43,548},11643758},{{43,550},543373789},{{43,552},107216374},{{43,554},536706614},{{43,556},345207484},{{43,558},197739695},{{43,560},416959310},{{43,562},802020491},{{43,564},883579389},{{43,566},155472766},{{43,568},707726533},{{43,570},878636875},{{43,572},137339984},{{43,574},387604391},{{43,576},170286771},{{43,578},862464509},{{43,580},93116703},{{43,582},698306089},{{43,584},277231574},{{43,586},157624181},{{43,588},518482505},{{43,590},545923209},{{43,592},301838767},{{43,594},429107456},{{43,596},65466197},{{43,598},400869145},{{43,600},603396151},{{43,602},201146053},{{43,604},29560436},{{43,606},908247428},{{43,608},740900666},{{43,610},645622178},{{43,612},468181946},{{43,614},182006817},{{43,616},585006092},{{43,618},39427009},{{43,620},901513909},{{43,622},575103140},{{43,624},643739693},{{43,626},969005418},{{43,628},413112711},{{43,630},121940507},{{43,632},949419798},{{43,634},274176335},{{43,636},533655948},{{43,638},73448571},{{43,640},447893873},{{43,642},303200166},{{43,644},406062958},{{43,646},327948494},{{43,648},399154885},{{43,650},680966803},{{43,652},676784794},{{43,654},346165530},{{43,656},118434942},{{43,658},634041854},{{43,660},219847494},{{43,662},927409557},{{43,664},731595298},{{43,666},204066166},{{43,668},484721091},{{43,670},397391612},{{43,672},62697528},{{43,674},613046235},{{43,676},363210072},{{43,678},588627148},{{43,680},359818291},{{43,682},176675393},{{43,684},710790103},{{43,686},31891420},{{43,688},193284227},{{43,690},13322649},{{43,692},80677012},{{43,694},364175866},{{43,696},156203486},{{43,698},303397217},{{43,700},540753075},{{43,702},969185318},{{43,704},762928705},{{43,706},479974322},{{43,708},873609278},{{43,710},714679223},{{43,712},243389411},{{43,714},893917661},{{43,716},730412727},{{43,718},540295939},{{43,720},380888528},{{43,722},199480073},{{43,724},111615382},{{43,726},501213077},{{43,728},699982545},{{43,730},83674978},{{43,732},340471893},{{43,734},589623231},{{43,736},135448371},{{43,738},354059110},{{43,740},416125008},{{43,742},490338358},{{43,744},869847423},{{43,746},644581498},{{43,748},153365962},{{43,750},261322947},{{43,752},680966984},{{43,754},400282844},{{43,756},542955010},{{43,758},604680600},{{43,760},412088220},{{43,762},680278649},{{43,764},139286485},{{43,766},860834305},{{43,768},469429775},{{43,770},280658323},{{43,772},253030904},{{43,774},2560916},{{43,776},10309871},{{43,778},297479762},{{43,780},823144855},{{43,782},871982081},{{43,784},47058346},{{43,786},963847165},{{43,788},382927224},{{43,790},356584190},{{43,792},324565827},{{43,794},306141977},{{43,796},910279795},{{43,798},453817674},{{43,800},601981427},{{43,802},979339306},{{43,804},222338413},{{43,806},904561649},{{43,808},382529080},{{43,810},408856660},{{43,812},854658577},{{43,814},411827225},{{43,816},670817056},{{43,818},827144476},{{43,820},223389693},{{43,822},471934610},{{43,824},930635535},{{43,826},587441381},{{43,828},722797748},{{43,830},95690794},{{43,832},663628478},{{43,834},287716698},{{43,836},646651719},{{43,838},701670514},{{43,840},288321331},{{43,842},90367689},{{43,844},303151955},{{43,846},540716833},{{43,848},449495113},{{43,850},614473847},{{43,852},768187147},{{43,854},779428778},{{43,856},859329178},{{43,858},317839203},{{43,860},24311574},{{43,862},208713726},{{43,864},534909824},{{43,866},569617669},{{43,868},779723332},{{43,870},951823587},{{43,872},262620278},{{43,874},508684571},{{43,876},644816282},{{43,878},124674019},{{43,880},369884532},{{43,882},146396384},{{43,884},993989514},{{43,886},828097325},{{43,888},353947367},{{43,890},356630001},{{43,892},483119775},{{43,894},36683277},{{43,896},829372562},{{43,898},480348153},{{43,900},416969202},{{43,902},237164413},{{43,904},917166508},{{43,906},673670902},{{43,908},955993972},{{43,910},550159722},{{43,912},115253791},{{43,914},571208381},{{43,916},883450110},{{43,918},234414978},{{43,920},338605160},{{43,922},465632072},{{43,924},975880238},{{44,0},1},{{44,2},43},{{44,4},987},{{44,6},15949},{{44,8},202614},{{44,10},2146662},{{44,12},19672862},{{44,14},159841410},{{44,16},171958174},{{44,18},857707214},{{44,20},674952199},{{44,22},863564473},{{44,24},694487987},{{44,26},218927913},{{44,28},150857334},{{44,30},64522123},{{44,32},242512102},{{44,34},726888439},{{44,36},233627107},{{44,38},811786714},{{44,40},114239005},{{44,42},343074532},{{44,44},372330107},{{44,46},720689358},{{44,48},467711835},{{44,50},904517093},{{44,52},48140523},{{44,54},445520536},{{44,56},151023837},{{44,58},477389409},{{44,60},167654505},{{44,62},524330326},{{44,64},826025786},{{44,66},750662832},{{44,68},873751815},{{44,70},63739722},{{44,72},191556854},{{44,74},667326112},{{44,76},50500515},{{44,78},441625511},{{44,80},782830742},{{44,82},400734038},{{44,84},564497630},{{44,86},921910383},{{44,88},845548941},{{44,90},368028935},{{44,92},749018447},{{44,94},103585045},{{44,96},796556849},{{44,98},628596101},{{44,100},868979841},{{44,102},539520158},{{44,104},627354569},{{44,106},90231323},{{44,108},417433082},{{44,110},56768496},{{44,112},355579497},{{44,114},422451590},{{44,116},886349503},{{44,118},72956900},{{44,120},803725461},{{44,122},415871073},{{44,124},683643384},{{44,126},621063238},{{44,128},193330057},{{44,130},325926450},{{44,132},277754812},{{44,134},24871409},{{44,136},448472012},{{44,138},886190243},{{44,140},823962291},{{44,142},441987145},{{44,144},894908057},{{44,146},837390023},{{44,148},862747763},{{44,150},91512877},{{44,152},722912649},{{44,154},93349481},{{44,156},545810047},{{44,158},913016979},{{44,160},515556016},{{44,162},298546360},{{44,164},734212089},{{44,166},844284728},{{44,168},136068973},{{44,170},71028614},{{44,172},122223407},{{44,174},751306630},{{44,176},44843394},{{44,178},423748616},{{44,180},386401231},{{44,182},812571458},{{44,184},811253207},{{44,186},883210298},{{44,188},108253088},{{44,190},777750730},{{44,192},94398075},{{44,194},357510258},{{44,196},341016668},{{44,198},444595182},{{44,200},421469474},{{44,202},846006439},{{44,204},697364303},{{44,206},430219357},{{44,208},145159},{{44,210},329923811},{{44,212},555736286},{{44,214},145037472},{{44,216},50858159},{{44,218},758063180},{{44,220},409311835},{{44,222},199515197},{{44,224},849732459},{{44,226},429458586},{{44,228},110831608},{{44,230},601311986},{{44,232},405029768},{{44,234},899721594},{{44,236},362036575},{{44,238},3616348},{{44,240},447767827},{{44,242},718164293},{{44,244},455022502},{{44,246},154627334},{{44,248},632024645},{{44,250},923207902},{{44,252},841801838},{{44,254},418932384},{{44,256},595460287},{{44,258},460605434},{{44,260},188513457},{{44,262},767682601},{{44,264},51793196},{{44,266},194981425},{{44,268},929803954},{{44,270},504733978},{{44,272},22197692},{{44,274},870666331},{{44,276},333136663},{{44,278},819520200},{{44,280},530915500},{{44,282},599537526},{{44,284},53266589},{{44,286},48676597},{{44,288},387019415},{{44,290},413134249},{{44,292},89916173},{{44,294},988538195},{{44,296},741237674},{{44,298},580557472},{{44,300},340811443},{{44,302},13472882},{{44,304},840030352},{{44,306},781975641},{{44,308},296220934},{{44,310},702357371},{{44,312},942050407},{{44,314},935085214},{{44,316},845987731},{{44,318},799577627},{{44,320},872670633},{{44,322},692587304},{{44,324},440284632},{{44,326},702895036},{{44,328},10589510},{{44,330},109084537},{{44,332},901549736},{{44,334},680965380},{{44,336},523560865},{{44,338},14608855},{{44,340},766098800},{{44,342},955736031},{{44,344},229070295},{{44,346},918139336},{{44,348},762087315},{{44,350},15060087},{{44,352},769624318},{{44,354},210516326},{{44,356},269537431},{{44,358},932448778},{{44,360},651446512},{{44,362},367308406},{{44,364},624037144},{{44,366},927670291},{{44,368},415521073},{{44,370},854675140},{{44,372},947034643},{{44,374},395133007},{{44,376},858104556},{{44,378},792426709},{{44,380},918444166},{{44,382},282314711},{{44,384},96653546},{{44,386},423079321},{{44,388},469451942},{{44,390},792999037},{{44,392},308400615},{{44,394},330587501},{{44,396},691818222},{{44,398},53917678},{{44,400},568461122},{{44,402},362577365},{{44,404},775464857},{{44,406},904714011},{{44,408},845440210},{{44,410},795470521},{{44,412},568880508},{{44,414},666239878},{{44,416},183860147},{{44,418},125507811},{{44,420},545400921},{{44,422},401495311},{{44,424},3467092},{{44,426},430876347},{{44,428},332849310},{{44,430},96436924},{{44,432},957680475},{{44,434},836934713},{{44,436},150232592},{{44,438},891109199},{{44,440},995835861},{{44,442},145792868},{{44,444},255284669},{{44,446},853681633},{{44,448},801676454},{{44,450},45857933},{{44,452},127560794},{{44,454},137690320},{{44,456},534209092},{{44,458},436059291},{{44,460},890838261},{{44,462},134212816},{{44,464},302504982},{{44,466},936257832},{{44,468},761720727},{{44,470},269396963},{{44,472},28197218},{{44,474},59083210},{{44,476},947207164},{{44,478},442972791},{{44,480},384169121},{{44,482},488722025},{{44,484},351406087},{{44,486},443097712},{{44,488},82956552},{{44,490},698141640},{{44,492},145942108},{{44,494},188889308},{{44,496},734290094},{{44,498},387705377},{{44,500},912805029},{{44,502},973822420},{{44,504},47485510},{{44,506},507370861},{{44,508},221674431},{{44,510},786661915},{{44,512},91335607},{{44,514},856760661},{{44,516},173031704},{{44,518},864904090},{{44,520},599152735},{{44,522},495185408},{{44,524},938099393},{{44,526},556362344},{{44,528},990758140},{{44,530},995900803},{{44,532},254599934},{{44,534},462199704},{{44,536},5008078},{{44,538},665636661},{{44,540},527028350},{{44,542},642386127},{{44,544},1829553},{{44,546},551952980},{{44,548},424017355},{{44,550},108488740},{{44,552},701380336},{{44,554},806666866},{{44,556},700141562},{{44,558},59441909},{{44,560},362171728},{{44,562},894757457},{{44,564},445400929},{{44,566},773238426},{{44,568},127546419},{{44,570},723395394},{{44,572},338826564},{{44,574},332919619},{{44,576},340737249},{{44,578},850054615},{{44,580},184058121},{{44,582},13063831},{{44,584},278558952},{{44,586},698063140},{{44,588},498777528},{{44,590},72607237},{{44,592},345269132},{{44,594},902279995},{{44,596},183690503},{{44,598},772520236},{{44,600},708689187},{{44,602},233896476},{{44,604},458831695},{{44,606},230994551},{{44,608},41124197},{{44,610},206351350},{{44,612},689101399},{{44,614},262700029},{{44,616},620939252},{{44,618},892377787},{{44,620},428085255},{{44,622},694339277},{{44,624},213848040},{{44,626},916329377},{{44,628},192795757},{{44,630},474268014},{{44,632},561285670},{{44,634},220016093},{{44,636},638297144},{{44,638},193877561},{{44,640},647642810},{{44,642},64716523},{{44,644},5417153},{{44,646},709160560},{{44,648},438820650},{{44,650},471896153},{{44,652},456049785},{{44,654},424945489},{{44,656},102312939},{{44,658},179871925},{{44,660},155527933},{{44,662},66018018},{{44,664},519349428},{{44,666},575834851},{{44,668},366155295},{{44,670},196027859},{{44,672},709388961},{{44,674},444696414},{{44,676},108229719},{{44,678},111474967},{{44,680},169464130},{{44,682},765045351},{{44,684},916818004},{{44,686},674916990},{{44,688},958919968},{{44,690},932259128},{{44,692},849009441},{{44,694},829390390},{{44,696},846317162},{{44,698},253991616},{{44,700},482990034},{{44,702},163822353},{{44,704},775754269},{{44,706},532037321},{{44,708},49173712},{{44,710},212326050},{{44,712},301906174},{{44,714},678424573},{{44,716},534302771},{{44,718},375782334},{{44,720},160287870},{{44,722},855370313},{{44,724},341617592},{{44,726},25457804},{{44,728},708941176},{{44,730},246832732},{{44,732},903916100},{{44,734},546588049},{{44,736},96029971},{{44,738},706821232},{{44,740},940560978},{{44,742},101534792},{{44,744},337492719},{{44,746},856837601},{{44,748},613769045},{{44,750},707646199},{{44,752},812028723},{{44,754},616833643},{{44,756},679800396},{{44,758},535428679},{{44,760},224426630},{{44,762},413895724},{{44,764},784683428},{{44,766},431644219},{{44,768},111092914},{{44,770},661756720},{{44,772},639659700},{{44,774},41894591},{{44,776},68359952},{{44,778},43802473},{{44,780},952730000},{{44,782},823133424},{{44,784},376059765},{{44,786},707785553},{{44,788},822330735},{{44,790},771301262},{{44,792},948220958},{{44,794},908479296},{{44,796},864547297},{{44,798},515908783},{{44,800},27167717},{{44,802},175015260},{{44,804},401476125},{{44,806},721945851},{{44,808},298498970},{{44,810},707819205},{{44,812},838011772},{{44,814},889483594},{{44,816},356594984},{{44,818},693435347},{{44,820},967781679},{{44,822},401435494},{{44,824},355846180},{{44,826},333596320},{{44,828},628919505},{{44,830},303558980},{{44,832},984974994},{{44,834},113643042},{{44,836},89409518},{{44,838},612893129},{{44,840},122412730},{{44,842},114900098},{{44,844},810658251},{{44,846},247580260},{{44,848},945287301},{{44,850},609126629},{{44,852},492005778},{{44,854},772356444},{{44,856},361927818},{{44,858},440145503},{{44,860},858752994},{{44,862},174471327},{{44,864},210890472},{{44,866},769016792},{{44,868},638211867},{{44,870},546015263},{{44,872},377533141},{{44,874},892710683},{{44,876},705066724},{{44,878},412035898},{{44,880},913706912},{{44,882},989583745},{{44,884},102815427},{{44,886},296051463},{{44,888},435828877},{{44,890},627348761},{{44,892},994079761},{{44,894},369313875},{{44,896},909339708},{{44,898},172995194},{{44,900},816793393},{{44,902},474860389},{{44,904},821690532},{{44,906},962160124},{{44,908},246051373},{{44,910},970475428},{{44,912},561698902},{{44,914},165844443},{{44,916},708639335},{{44,918},918973613},{{44,920},861542417},{{44,922},207950600},{{44,924},197794802},{{44,926},563223285},{{44,928},448456804},{{44,930},787570186},{{44,932},926930606},{{44,934},566070711},{{44,936},279041721},{{44,938},162328562},{{44,940},287318056},{{44,942},191225488},{{44,944},14318341},{{44,946},585550504},{{44,948},409974535},{{44,950},697728497},{{44,952},891226405},{{44,954},200433586},{{44,956},381575055},{{44,958},638337683},{{44,960},483277973},{{44,962},755030264},{{44,964},867834356},{{44,966},962849947},{{44,968},821535631},{{45,0},1},{{45,2},44},{{45,4},1032},{{45,6},17024},{{45,8},220625},{{45,10},2383232},{{45,12},22258540},{{45,14},184242832},{{45,16},375813872},{{45,18},392612893},{{45,20},231706087},{{45,22},882424931},{{45,24},687132034},{{45,26},689650073},{{45,28},577977876},{{45,30},303878988},{{45,32},24310937},{{45,34},406963663},{{45,36},625468735},{{45,38},582435950},{{45,40},41660062},{{45,42},421950986},{{45,44},98962940},{{45,46},938709884},{{45,48},758565048},{{45,50},969234571},{{45,52},703952131},{{45,54},900436492},{{45,56},658647225},{{45,58},285611947},{{45,60},399326780},{{45,62},419454732},{{45,64},205387170},{{45,66},983950227},{{45,68},49990302},{{45,70},189001672},{{45,72},62673927},{{45,74},586296391},{{45,76},184361166},{{45,78},506353667},{{45,80},438069708},{{45,82},256171907},{{45,84},825943859},{{45,86},951340167},{{45,88},368115756},{{45,90},522855639},{{45,92},198647246},{{45,94},263328246},{{45,96},450011807},{{45,98},434855284},{{45,100},725807775},{{45,102},648411666},{{45,104},18383140},{{45,106},128787399},{{45,108},387148373},{{45,110},905324825},{{45,112},158891954},{{45,114},656234845},{{45,116},213026076},{{45,118},490012707},{{45,120},365468167},{{45,122},200221292},{{45,124},298615515},{{45,126},290107567},{{45,128},35072337},{{45,130},317672326},{{45,132},60118064},{{45,134},676291945},{{45,136},898619095},{{45,138},494511021},{{45,140},35193707},{{45,142},681989460},{{45,144},255539191},{{45,146},6318676},{{45,148},181981289},{{45,150},309123618},{{45,152},769843578},{{45,154},942743189},{{45,156},29734288},{{45,158},954472400},{{45,160},463236670},{{45,162},747980714},{{45,164},175643037},{{45,166},260101113},{{45,168},77874147},{{45,170},589524374},{{45,172},710018290},{{45,174},567729062},{{45,176},854908844},{{45,178},767838566},{{45,180},521233813},{{45,182},535397022},{{45,184},395450772},{{45,186},519565978},{{45,188},430844324},{{45,190},691804767},{{45,192},750969410},{{45,194},915664434},{{45,196},335442962},{{45,198},327801393},{{45,200},599337662},{{45,202},151524696},{{45,204},372580414},{{45,206},756807473},{{45,208},202845724},{{45,210},578628778},{{45,212},324772867},{{45,214},495203100},{{45,216},594805038},{{45,218},176866440},{{45,220},134364432},{{45,222},797477913},{{45,224},981614510},{{45,226},128692174},{{45,228},938852792},{{45,230},42148884},{{45,232},122641852},{{45,234},370944239},{{45,236},473851910},{{45,238},935488807},{{45,240},532851475},{{45,242},689984371},{{45,244},438315593},{{45,246},696398812},{{45,248},66001022},{{45,250},428174065},{{45,252},54501471},{{45,254},80878480},{{45,256},666016821},{{45,258},47295976},{{45,260},813797397},{{45,262},317765605},{{45,264},714997505},{{45,266},258919731},{{45,268},82884010},{{45,270},661027522},{{45,272},582655484},{{45,274},361252385},{{45,276},24311003},{{45,278},432884688},{{45,280},368733632},{{45,282},23821090},{{45,284},792526029},{{45,286},846601436},{{45,288},536812192},{{45,290},29313630},{{45,292},382435159},{{45,294},426147993},{{45,296},517181759},{{45,298},645690342},{{45,300},270896281},{{45,302},775661220},{{45,304},283600768},{{45,306},240876557},{{45,308},135665693},{{45,310},104458079},{{45,312},616729602},{{45,314},497103691},{{45,316},828815240},{{45,318},86098789},{{45,320},998656307},{{45,322},754065783},{{45,324},488969594},{{45,326},91503702},{{45,328},52278308},{{45,330},883359011},{{45,332},733253122},{{45,334},448869387},{{45,336},985543203},{{45,338},116773170},{{45,340},582006344},{{45,342},860482711},{{45,344},481797421},{{45,346},498040658},{{45,348},240829616},{{45,350},836032529},{{45,352},195942841},{{45,354},508465042},{{45,356},970760583},{{45,358},262117458},{{45,360},515914406},{{45,362},802808161},{{45,364},784332475},{{45,366},374122343},{{45,368},146224696},{{45,370},841597534},{{45,372},586439935},{{45,374},244148601},{{45,376},788204315},{{45,378},767547799},{{45,380},776362337},{{45,382},510076278},{{45,384},624681830},{{45,386},364806405},{{45,388},36907700},{{45,390},539421266},{{45,392},800828005},{{45,394},512242954},{{45,396},899834647},{{45,398},163376162},{{45,400},50294413},{{45,402},18654970},{{45,404},84289561},{{45,406},55576943},{{45,408},421249957},{{45,410},34930346},{{45,412},752291330},{{45,414},162276973},{{45,416},265235612},{{45,418},648593820},{{45,420},174309283},{{45,422},472188614},{{45,424},715911113},{{45,426},367773012},{{45,428},121970433},{{45,430},269868616},{{45,432},883985007},{{45,434},980070897},{{45,436},514347496},{{45,438},412293057},{{45,440},574601560},{{45,442},116830355},{{45,444},45453500},{{45,446},562859501},{{45,448},189078677},{{45,450},827602581},{{45,452},712444490},{{45,454},316586780},{{45,456},733065979},{{45,458},840949184},{{45,460},60074648},{{45,462},135398686},{{45,464},424428452},{{45,466},321968689},{{45,468},410040315},{{45,470},273128858},{{45,472},471407472},{{45,474},574966766},{{45,476},873880166},{{45,478},875045586},{{45,480},51088331},{{45,482},163730111},{{45,484},878321231},{{45,486},726127318},{{45,488},966070068},{{45,490},992549896},{{45,492},363335253},{{45,494},89848987},{{45,496},723352311},{{45,498},66759579},{{45,500},406269326},{{45,502},227087300},{{45,504},150259572},{{45,506},36586234},{{45,508},121181736},{{45,510},671327424},{{45,512},433664784},{{45,514},948164313},{{45,516},657988535},{{45,518},451431758},{{45,520},352880293},{{45,522},341991927},{{45,524},179834471},{{45,526},17796695},{{45,528},709446365},{{45,530},576526708},{{45,532},534876965},{{45,534},620591563},{{45,536},749402589},{{45,538},628280366},{{45,540},213414310},{{45,542},982746106},{{45,544},780180633},{{45,546},458647121},{{45,548},527146575},{{45,550},210950823},{{45,552},363805011},{{45,554},571210392},{{45,556},912463620},{{45,558},153315485},{{45,560},532024632},{{45,562},427468951},{{45,564},230879114},{{45,566},869803861},{{45,568},964025520},{{45,570},480715223},{{45,572},895116735},{{45,574},766188327},{{45,576},419338263},{{45,578},475074013},{{45,580},158183698},{{45,582},899486620},{{45,584},551866464},{{45,586},830407504},{{45,588},385674668},{{45,590},305150124},{{45,592},25769566},{{45,594},438519248},{{45,596},46473036},{{45,598},427624180},{{45,600},723264512},{{45,602},651472006},{{45,604},264633252},{{45,606},457374493},{{45,608},476392005},{{45,610},982968243},{{45,612},594462543},{{45,614},141658727},{{45,616},489344824},{{45,618},433530156},{{45,620},442633667},{{45,622},193279091},{{45,624},506366676},{{45,626},618868695},{{45,628},731227096},{{45,630},902261819},{{45,632},499005142},{{45,634},38842574},{{45,636},647293009},{{45,638},470120821},{{45,640},963932040},{{45,642},826530559},{{45,644},427769181},{{45,646},52186234},{{45,648},243569284},{{45,650},806914289},{{45,652},77294303},{{45,654},605077946},{{45,656},125786816},{{45,658},193185124},{{45,660},669741115},{{45,662},146483601},{{45,664},421911450},{{45,666},244025223},{{45,668},607708016},{{45,670},920909811},{{45,672},503255382},{{45,674},458139691},{{45,676},962827176},{{45,678},614853461},{{45,680},60315827},{{45,682},350564197},{{45,684},429760397},{{45,686},252570002},{{45,688},854719144},{{45,690},336843776},{{45,692},342192419},{{45,694},596659989},{{45,696},924243516},{{45,698},172320579},{{45,700},980212083},{{45,702},387574794},{{45,704},749118912},{{45,706},796421442},{{45,708},338721201},{{45,710},731277700},{{45,712},423355068},{{45,714},842226704},{{45,716},398877706},{{45,718},643899462},{{45,720},276311394},{{45,722},413568057},{{45,724},530987554},{{45,726},558156380},{{45,728},825270018},{{45,730},71652153},{{45,732},764304967},{{45,734},575174245},{{45,736},41877959},{{45,738},189656159},{{45,740},729954858},{{45,742},472722511},{{45,744},759829544},{{45,746},285982254},{{45,748},921037034},{{45,750},543320666},{{45,752},873711613},{{45,754},829723375},{{45,756},146980729},{{45,758},88768980},{{45,760},242470712},{{45,762},9284436},{{45,764},325379730},{{45,766},426922557},{{45,768},253585643},{{45,770},473459335},{{45,772},496125795},{{45,774},212116723},{{45,776},579959160},{{45,778},525505189},{{45,780},681915634},{{45,782},797942363},{{45,784},691505794},{{45,786},454823298},{{45,788},342255990},{{45,790},994255712},{{45,792},284908161},{{45,794},275004161},{{45,796},935102263},{{45,798},472107098},{{45,800},948357256},{{45,802},856671615},{{45,804},528973823},{{45,806},649773881},{{45,808},963952149},{{45,810},308388016},{{45,812},911396221},{{45,814},251193820},{{45,816},721175020},{{45,818},199750213},{{45,820},907595892},{{45,822},491208059},{{45,824},66513541},{{45,826},911357998},{{45,828},28185931},{{45,830},408941602},{{45,832},745821213},{{45,834},601730782},{{45,836},8869191},{{45,838},260152446},{{45,840},11616084},{{45,842},492782894},{{45,844},282010506},{{45,846},115926945},{{45,848},586669273},{{45,850},760307966},{{45,852},135350671},{{45,854},730510115},{{45,856},701832702},{{45,858},230080848},{{45,860},284697593},{{45,862},182609947},{{45,864},968668397},{{45,866},822892958},{{45,868},20031466},{{45,870},582030222},{{45,872},113170973},{{45,874},44631330},{{45,876},117449096},{{45,878},742186715},{{45,880},393019551},{{45,882},475653487},{{45,884},44400405},{{45,886},854169605},{{45,888},417464027},{{45,890},638137059},{{45,892},767027912},{{45,894},156446839},{{45,896},993857936},{{45,898},340495049},{{45,900},620457258},{{45,902},138844665},{{45,904},409760846},{{45,906},178352112},{{45,908},82788960},{{45,910},388732194},{{45,912},649306589},{{45,914},798058368},{{45,916},662337136},{{45,918},564354859},{{45,920},463324080},{{45,922},651997437},{{45,924},151329929},{{45,926},798760314},{{45,928},140393196},{{45,930},82249686},{{45,932},534814725},{{45,934},624568021},{{45,936},130746531},{{45,938},950081340},{{45,940},74895509},{{45,942},582830295},{{45,944},80288213},{{45,946},896322580},{{45,948},930247101},{{45,950},961634195},{{45,952},343840503},{{45,954},151542664},{{45,956},791653321},{{45,958},891526646},{{45,960},512046490},{{45,962},292522561},{{45,964},321986893},{{45,966},483787584},{{45,968},926080170},{{45,970},410378864},{{45,972},504638099},{{45,974},532986681},{{45,976},138953386},{{45,978},701001827},{{45,980},64586773},{{45,982},800287681},{{45,984},592917926},{{45,986},845148767},{{45,988},612516645},{{45,990},103437292},{{45,992},360749745},{{45,994},802262044},{{45,996},905182790},{{45,998},741928176},{{45,1000},827192105},{{45,1002},608668686},{{45,1004},275550867},{{45,1006},759837767},{{45,1008},768468707},{{45,1010},652063776},{{45,1012},969103143},{{46,0},1},{{46,2},45},{{46,4},1078},{{46,6},18146},{{46,8},239803},{{46,10},2640055},{{46,12},25119048},{{46,14},211741156},{{46,16},609749448},{{46,18},185787670},{{46,20},784612981},{{46,22},979654374},{{46,24},245960280},{{46,26},15201333},{{46,28},958496287},{{46,30},21110097},{{46,32},315107827},{{46,34},742613444},{{46,36},350112648},{{46,38},551346765},{{46,40},22689059},{{46,42},646342016},{{46,44},52427180},{{46,46},113726997},{{46,48},20972491},{{46,50},531552248},{{46,52},493279562},{{46,54},92962089},{{46,56},319571072},{{46,58},658193556},{{46,60},921146440},{{46,62},975234478},{{46,64},32484025},{{46,66},175484024},{{46,68},620442122},{{46,70},566033382},{{46,72},228886883},{{46,74},301912152},{{46,76},137109958},{{46,78},37427138},{{46,80},531183271},{{46,82},684452057},{{46,84},239066445},{{46,86},806400806},{{46,88},345167706},{{46,90},766401402},{{46,92},659593100},{{46,94},342864185},{{46,96},793254425},{{46,98},754419464},{{46,100},829307575},{{46,102},253460669},{{46,104},788296808},{{46,106},455700810},{{46,108},203460090},{{46,110},299960617},{{46,112},672027544},{{46,114},662169751},{{46,116},130171479},{{46,118},226661975},{{46,120},16040291},{{46,122},641167104},{{46,124},11608362},{{46,126},92735361},{{46,128},828424038},{{46,130},151425031},{{46,132},757058935},{{46,134},838944903},{{46,136},705030989},{{46,138},271605017},{{46,140},832315720},{{46,142},525711262},{{46,144},695893337},{{46,146},524834613},{{46,148},616761109},{{46,150},89325780},{{46,152},498691877},{{46,154},390082387},{{46,156},413410547},{{46,158},86170624},{{46,160},733987779},{{46,162},857386717},{{46,164},121183471},{{46,166},378540433},{{46,168},791481061},{{46,170},602874536},{{46,172},895775257},{{46,174},706223069},{{46,176},9499},{{46,178},916233199},{{46,180},610175789},{{46,182},305910126},{{46,184},402086898},{{46,186},380865911},{{46,188},987929263},{{46,190},784720236},{{46,192},752249361},{{46,194},533065111},{{46,196},750214951},{{46,198},512527924},{{46,200},120069833},{{46,202},497034065},{{46,204},691332267},{{46,206},542878776},{{46,208},324018841},{{46,210},841280375},{{46,212},368737196},{{46,214},213532423},{{46,216},972352910},{{46,218},856518833},{{46,220},695976280},{{46,222},832491001},{{46,224},482258020},{{46,226},288928023},{{46,228},37469870},{{46,230},669147935},{{46,232},728824530},{{46,234},312167670},{{46,236},98462828},{{46,238},664815478},{{46,240},37466991},{{46,242},488559701},{{46,244},805407681},{{46,246},555656112},{{46,248},449333572},{{46,250},115257333},{{46,252},422614443},{{46,254},217564969},{{46,256},709154128},{{46,258},523463461},{{46,260},73425486},{{46,262},892488653},{{46,264},72758100},{{46,266},139084611},{{46,268},245397266},{{46,270},356349189},{{46,272},258341975},{{46,274},374070936},{{46,276},726599734},{{46,278},907199192},{{46,280},145474167},{{46,282},868900328},{{46,284},80767170},{{46,286},435742131},{{46,288},604761267},{{46,290},550372021},{{46,292},238314098},{{46,294},858506407},{{46,296},406280874},{{46,298},734533546},{{46,300},294613351},{{46,302},569709112},{{46,304},578499728},{{46,306},811514468},{{46,308},971780315},{{46,310},806793934},{{46,312},105431100},{{46,314},109183449},{{46,316},48863833},{{46,318},577768093},{{46,320},679710969},{{46,322},415227663},{{46,324},41263734},{{46,326},575857153},{{46,328},381654592},{{46,330},178237376},{{46,332},962188807},{{46,334},96401085},{{46,336},816699360},{{46,338},379978},{{46,340},698529453},{{46,342},815682387},{{46,344},657011537},{{46,346},324418972},{{46,348},693645417},{{46,350},573047105},{{46,352},308103161},{{46,354},882958960},{{46,356},454854080},{{46,358},319280881},{{46,360},638681315},{{46,362},366562235},{{46,364},558670399},{{46,366},767575020},{{46,368},418970310},{{46,370},599121706},{{46,372},533764150},{{46,374},589341596},{{46,376},935247125},{{46,378},342450103},{{46,380},752510984},{{46,382},17885861},{{46,384},270962366},{{46,386},936052758},{{46,388},754048953},{{46,390},578853463},{{46,392},395299411},{{46,394},975776432},{{46,396},660809842},{{46,398},714104917},{{46,400},664542262},{{46,402},888472526},{{46,404},460099640},{{46,406},981638523},{{46,408},92874960},{{46,410},177231620},{{46,412},389704303},{{46,414},815325394},{{46,416},892076514},{{46,418},810821143},{{46,420},435904186},{{46,422},382196425},{{46,424},459031152},{{46,426},355917826},{{46,428},128881343},{{46,430},657597142},{{46,432},768648132},{{46,434},489510758},{{46,436},615223177},{{46,438},785945817},{{46,440},514595120},{{46,442},566588750},{{46,444},607013232},{{46,446},187911920},{{46,448},428934627},{{46,450},690400146},{{46,452},385480557},{{46,454},274884476},{{46,456},214574226},{{46,458},202705516},{{46,460},78809920},{{46,462},768678876},{{46,464},104566183},{{46,466},54811645},{{46,468},783466377},{{46,470},78714677},{{46,472},225394661},{{46,474},571378521},{{46,476},194681502},{{46,478},425310485},{{46,480},768219090},{{46,482},304793231},{{46,484},206900396},{{46,486},615627160},{{46,488},652872143},{{46,490},605935098},{{46,492},888495311},{{46,494},608958308},{{46,496},684600222},{{46,498},150382009},{{46,500},670451269},{{46,502},632074742},{{46,504},29926906},{{46,506},676412361},{{46,508},727588975},{{46,510},541140282},{{46,512},152873820},{{46,514},396851079},{{46,516},644404346},{{46,518},44361987},{{46,520},675992732},{{46,522},795525664},{{46,524},898044746},{{46,526},408945421},{{46,528},518637916},{{46,530},428148139},{{46,532},754863856},{{46,534},398182352},{{46,536},901207212},{{46,538},713356422},{{46,540},978366083},{{46,542},314876385},{{46,544},700685480},{{46,546},450639991},{{46,548},507197672},{{46,550},750335365},{{46,552},694787156},{{46,554},659670168},{{46,556},536065922},{{46,558},58255852},{{46,560},874808151},{{46,562},601680063},{{46,564},300562698},{{46,566},308983506},{{46,568},144763409},{{46,570},291800793},{{46,572},77526020},{{46,574},485403753},{{46,576},904665596},{{46,578},240987930},{{46,580},592380858},{{46,582},131116194},{{46,584},318805303},{{46,586},40941643},{{46,588},253699630},{{46,590},655235690},{{46,592},431599614},{{46,594},508389196},{{46,596},766960976},{{46,598},64307752},{{46,600},83604788},{{46,602},642165815},{{46,604},298107337},{{46,606},143184667},{{46,608},782909601},{{46,610},97135064},{{46,612},800759539},{{46,614},594114128},{{46,616},462420032},{{46,618},946857620},{{46,620},578998109},{{46,622},847963761},{{46,624},556321528},{{46,626},57391815},{{46,628},681855904},{{46,630},181815656},{{46,632},486333346},{{46,634},837072759},{{46,636},524567487},{{46,638},328595763},{{46,640},549915998},{{46,642},810586503},{{46,644},921107919},{{46,646},625157836},{{46,648},520890292},{{46,650},832156974},{{46,652},502972509},{{46,654},844559735},{{46,656},189855766},{{46,658},821823028},{{46,660},625190873},{{46,662},310510259},{{46,664},495827691},{{46,666},683011136},{{46,668},462720297},{{46,670},218315456},{{46,672},558392392},{{46,674},789434995},{{46,676},973556645},{{46,678},730884239},{{46,680},996176654},{{46,682},617108310},{{46,684},869866261},{{46,686},672230385},{{46,688},823462275},{{46,690},454316955},{{46,692},569646417},{{46,694},836576125},{{46,696},486906178},{{46,698},189726176},{{46,700},941091111},{{46,702},447563926},{{46,704},715506888},{{46,706},259006307},{{46,708},152570437},{{46,710},178255829},{{46,712},705545293},{{46,714},756368978},{{46,716},655390691},{{46,718},445318929},{{46,720},656847742},{{46,722},582354283},{{46,724},964611397},{{46,726},757172000},{{46,728},601301680},{{46,730},424348696},{{46,732},51484783},{{46,734},19240319},{{46,736},282677827},{{46,738},308226295},{{46,740},848392338},{{46,742},155829926},{{46,744},371112122},{{46,746},224524783},{{46,748},972970693},{{46,750},890401898},{{46,752},186586738},{{46,754},229535528},{{46,756},744395297},{{46,758},436751188},{{46,760},287103606},{{46,762},767393594},{{46,764},221149011},{{46,766},725319915},{{46,768},148703291},{{46,770},142739608},{{46,772},565503173},{{46,774},66967587},{{46,776},579759051},{{46,778},568848401},{{46,780},146971072},{{46,782},400042251},{{46,784},42796974},{{46,786},930117091},{{46,788},516575412},{{46,790},958322295},{{46,792},49672443},{{46,794},25502320},{{46,796},669481138},{{46,798},837449618},{{46,800},7837933},{{46,802},569472200},{{46,804},125364493},{{46,806},253977071},{{46,808},938687542},{{46,810},347213905},{{46,812},923213402},{{46,814},374713215},{{46,816},103889249},{{46,818},423021360},{{46,820},42560340},{{46,822},446498368},{{46,824},893011213},{{46,826},263552847},{{46,828},473020638},{{46,830},594960497},{{46,832},638188472},{{46,834},306243047},{{46,836},631678307},{{46,838},460262893},{{46,840},114330448},{{46,842},196301356},{{46,844},120279822},{{46,846},408786998},{{46,848},213927614},{{46,850},687965452},{{46,852},221650209},{{46,854},761159253},{{46,856},159653422},{{46,858},237951119},{{46,860},705996510},{{46,862},183076481},{{46,864},962207888},{{46,866},939920456},{{46,868},729428244},{{46,870},527536009},{{46,872},933629825},{{46,874},48104537},{{46,876},426892607},{{46,878},222940406},{{46,880},156477133},{{46,882},294062878},{{46,884},856995315},{{46,886},562470362},{{46,888},935041969},{{46,890},210948751},{{46,892},968306167},{{46,894},842365144},{{46,896},520781012},{{46,898},542464204},{{46,900},753086923},{{46,902},742421303},{{46,904},62000597},{{46,906},644679235},{{46,908},71406991},{{46,910},633199433},{{46,912},272647461},{{46,914},452692051},{{46,916},412108892},{{46,918},971466694},{{46,920},51102980},{{46,922},982720545},{{46,924},17172841},{{46,926},800141833},{{46,928},835541670},{{46,930},112517201},{{46,932},389287762},{{46,934},451060806},{{46,936},667438631},{{46,938},372888210},{{46,940},71363616},{{46,942},925222882},{{46,944},974951293},{{46,946},516878304},{{46,948},717488009},{{46,950},957226897},{{46,952},42671831},{{46,954},558776576},{{46,956},623171604},{{46,958},305500795},{{46,960},631070922},{{46,962},102790598},{{46,964},482941055},{{46,966},578335399},{{46,968},805101814},{{46,970},173951677},{{46,972},379242816},{{46,974},368922629},{{46,976},730730546},{{46,978},873191134},{{46,980},654555294},{{46,982},282999571},{{46,984},122452789},{{46,986},92227034},{{46,988},843713012},{{46,990},807240125},{{46,992},801145367},{{46,994},399481174},{{46,996},81195926},{{46,998},292593849},{{46,1000},487745170},{{46,1002},77737545},{{46,1004},120468361},{{46,1006},275563695},{{46,1008},294725580},{{46,1010},329691567},{{46,1012},323060707},{{46,1014},128192468},{{46,1016},940264172},{{46,1018},278390124},{{46,1020},237020514},{{46,1022},693096287},{{46,1024},868976326},{{46,1026},357620751},{{46,1028},777387506},{{46,1030},600499325},{{46,1032},283061659},{{46,1034},552760619},{{46,1036},551343042},{{46,1038},374674126},{{46,1040},67456147},{{46,1042},355451755},{{46,1044},309520773},{{46,1046},188033652},{{46,1048},438124708},{{46,1050},963234900},{{46,1052},524570431},{{46,1054},966112342},{{46,1056},609641134},{{46,1058},592345761},{{47,0},1},{{47,2},46},{{47,4},1125},{{47,6},19316},{{47,8},260197},{{47,10},2918394},{{47,12},28277069},{{47,14},242654144},{{47,16},877454212},{{47,18},274093151},{{47,20},658806941},{{47,22},733787098},{{47,24},12686768},{{47,26},373279778},{{47,28},972151771},{{47,30},700803085},{{47,32},323660829},{{47,34},529034010},{{47,36},15342046},{{47,38},14519348},{{47,40},617205005},{{47,42},151932388},{{47,44},986173050},{{47,46},673700068},{{47,48},544467810},{{47,50},964286681},{{47,52},515278420},{{47,54},556139518},{{47,56},340574896},{{47,58},558301369},{{47,60},203169010},{{47,62},995039572},{{47,64},456888812},{{47,66},641435231},{{47,68},165153057},{{47,70},140522292},{{47,72},660622205},{{47,74},195293121},{{47,76},536816710},{{47,78},963078287},{{47,80},7389104},{{47,82},204944482},{{47,84},754195920},{{47,86},468292992},{{47,88},782743724},{{47,90},983001140},{{47,92},866703245},{{47,94},496885028},{{47,96},44229335},{{47,98},385957410},{{47,100},278539952},{{47,102},468949573},{{47,104},420982388},{{47,106},313452346},{{47,108},869856814},{{47,110},98935497},{{47,112},204399132},{{47,114},112520568},{{47,116},660616311},{{47,118},229799510},{{47,120},228233497},{{47,122},492491671},{{47,124},631417681},{{47,126},54933646},{{47,128},149425728},{{47,130},621332861},{{47,132},339088208},{{47,134},164640489},{{47,136},629238436},{{47,138},824895721},{{47,140},154091091},{{47,142},876001533},{{47,144},408513031},{{47,146},998443240},{{47,148},581987593},{{47,150},639413342},{{47,152},564182232},{{47,154},919538600},{{47,156},946772636},{{47,158},882410774},{{47,160},972663920},{{47,162},656083562},{{47,164},92818},{{47,166},266781815},{{47,168},775781699},{{47,170},746031288},{{47,172},222736672},{{47,174},245153398},{{47,176},853395663},{{47,178},612580130},{{47,180},998160370},{{47,182},644539418},{{47,184},268757618},{{47,186},522753001},{{47,188},961290581},{{47,190},775849265},{{47,192},167666621},{{47,194},207332842},{{47,196},699178165},{{47,198},754169098},{{47,200},895892786},{{47,202},110804927},{{47,204},209717022},{{47,206},224332021},{{47,208},783584762},{{47,210},168756823},{{47,212},846734143},{{47,214},820517435},{{47,216},567375827},{{47,218},214226237},{{47,220},514413130},{{47,222},94334242},{{47,224},56417678},{{47,226},452070622},{{47,228},302779049},{{47,230},643793464},{{47,232},45275321},{{47,234},465081583},{{47,236},721848633},{{47,238},905142006},{{47,240},304646178},{{47,242},594655979},{{47,244},909007937},{{47,246},734286949},{{47,248},886228757},{{47,250},175346016},{{47,252},613908391},{{47,254},543890160},{{47,256},182181133},{{47,258},880150750},{{47,260},840065256},{{47,262},833202286},{{47,264},948664835},{{47,266},99995047},{{47,268},986587901},{{47,270},143761895},{{47,272},873393215},{{47,274},472341142},{{47,276},369663112},{{47,278},813013714},{{47,280},860504625},{{47,282},731747262},{{47,284},545041246},{{47,286},583231233},{{47,288},427381591},{{47,290},37913038},{{47,292},537312918},{{47,294},219404202},{{47,296},592801409},{{47,298},727962123},{{47,300},878247573},{{47,302},121527391},{{47,304},62101177},{{47,306},856133295},{{47,308},688561557},{{47,310},4927109},{{47,312},639161755},{{47,314},216890863},{{47,316},944378755},{{47,318},396352437},{{47,320},878653962},{{47,322},905668778},{{47,324},386987830},{{47,326},935008847},{{47,328},899701147},{{47,330},100650401},{{47,332},955831377},{{47,334},336099358},{{47,336},325599961},{{47,338},655390214},{{47,340},368725260},{{47,342},410912881},{{47,344},868037904},{{47,346},255016544},{{47,348},51552711},{{47,350},320078126},{{47,352},868474642},{{47,354},332377928},{{47,356},241406268},{{47,358},35418479},{{47,360},170587950},{{47,362},775390874},{{47,364},598922434},{{47,366},616742075},{{47,368},563583865},{{47,370},362204509},{{47,372},606438997},{{47,374},894815935},{{47,376},49721736},{{47,378},43588534},{{47,380},841088924},{{47,382},703571407},{{47,384},258771291},{{47,386},525460849},{{47,388},233015242},{{47,390},491199815},{{47,392},325653075},{{47,394},858892862},{{47,396},519655123},{{47,398},115437087},{{47,400},727491564},{{47,402},149427446},{{47,404},582972761},{{47,406},204458210},{{47,408},871579136},{{47,410},737982490},{{47,412},129452738},{{47,414},424878982},{{47,416},856725917},{{47,418},336920826},{{47,420},730532856},{{47,422},841738688},{{47,424},738232572},{{47,426},913319995},{{47,428},816486040},{{47,430},235770118},{{47,432},427698004},{{47,434},930569686},{{47,436},569011751},{{47,438},212446463},{{47,440},508105319},{{47,442},803897811},{{47,444},496189040},{{47,446},948372030},{{47,448},432798655},{{47,450},784691260},{{47,452},809769369},{{47,454},691850475},{{47,456},577558004},{{47,458},62715847},{{47,460},947764060},{{47,462},196109904},{{47,464},506172286},{{47,466},447735266},{{47,468},980867772},{{47,470},417186123},{{47,472},46557919},{{47,474},986790130},{{47,476},277584037},{{47,478},822619391},{{47,480},621076591},{{47,482},388367593},{{47,484},68342324},{{47,486},236699370},{{47,488},119970164},{{47,490},657351210},{{47,492},878868802},{{47,494},794459312},{{47,496},436412351},{{47,498},290870119},{{47,500},503296346},{{47,502},564802634},{{47,504},58773734},{{47,506},218770767},{{47,508},842309450},{{47,510},694735121},{{47,512},712067611},{{47,514},605426442},{{47,516},634737321},{{47,518},598847809},{{47,520},189964014},{{47,522},104895974},{{47,524},463967300},{{47,526},12836011},{{47,528},374171101},{{47,530},422839429},{{47,532},769990513},{{47,534},562838372},{{47,536},23465799},{{47,538},935303296},{{47,540},758855803},{{47,542},832260567},{{47,544},373886738},{{47,546},362866660},{{47,548},831747060},{{47,550},745193763},{{47,552},842521525},{{47,554},971131364},{{47,556},323409153},{{47,558},328965945},{{47,560},810807795},{{47,562},987986960},{{47,564},514599613},{{47,566},697337301},{{47,568},518676386},{{47,570},255182547},{{47,572},320862033},{{47,574},438306682},{{47,576},656059329},{{47,578},246817307},{{47,580},296427451},{{47,582},518314128},{{47,584},212813255},{{47,586},401599307},{{47,588},322632262},{{47,590},651271379},{{47,592},102975853},{{47,594},978392574},{{47,596},171788197},{{47,598},425477753},{{47,600},865141598},{{47,602},200230496},{{47,604},352371432},{{47,606},128877128},{{47,608},483645145},{{47,610},487174027},{{47,612},207964600},{{47,614},565016864},{{47,616},366179929},{{47,618},769999162},{{47,620},980709292},{{47,622},279413092},{{47,624},778963675},{{47,626},322935221},{{47,628},775556840},{{47,630},152203885},{{47,632},621120920},{{47,634},754303914},{{47,636},144652778},{{47,638},603456104},{{47,640},397495432},{{47,642},911648885},{{47,644},161631342},{{47,646},183072379},{{47,648},436197254},{{47,650},410415743},{{47,652},654211646},{{47,654},998944149},{{47,656},660332881},{{47,658},659092994},{{47,660},407158213},{{47,662},993390015},{{47,664},62237745},{{47,666},342306369},{{47,668},807083806},{{47,670},460112259},{{47,672},598009122},{{47,674},34231667},{{47,676},354435262},{{47,678},237881432},{{47,680},155417941},{{47,682},495370397},{{47,684},996923439},{{47,686},566380833},{{47,688},854227389},{{47,690},702509945},{{47,692},42544433},{{47,694},284265702},{{47,696},294553519},{{47,698},149363293},{{47,700},27077251},{{47,702},84953964},{{47,704},442875086},{{47,706},52560456},{{47,708},900402134},{{47,710},145229989},{{47,712},73758817},{{47,714},191009440},{{47,716},854994962},{{47,718},638721915},{{47,720},122661714},{{47,722},185868970},{{47,724},77283521},{{47,726},869275152},{{47,728},18655948},{{47,730},313026284},{{47,732},709600476},{{47,734},473812539},{{47,736},310414874},{{47,738},881320952},{{47,740},952459523},{{47,742},248120422},{{47,744},525865505},{{47,746},878780555},{{47,748},987277088},{{47,750},840681160},{{47,752},676792790},{{47,754},412115993},{{47,756},140030918},{{47,758},974129475},{{47,760},721196483},{{47,762},656805079},{{47,764},905290349},{{47,766},47935904},{{47,768},451920705},{{47,770},209356056},{{47,772},551066765},{{47,774},377150442},{{47,776},379611973},{{47,778},957219941},{{47,780},151470005},{{47,782},815021467},{{47,784},645207971},{{47,786},427463516},{{47,788},863082600},{{47,790},325313522},{{47,792},124436219},{{47,794},624577057},{{47,796},614877838},{{47,798},455973640},{{47,800},851822937},{{47,802},25478672},{{47,804},694724523},{{47,806},841056623},{{47,808},311625157},{{47,810},733217559},{{47,812},234679922},{{47,814},488590424},{{47,816},672460808},{{47,818},393534712},{{47,820},496209755},{{47,822},929085969},{{47,824},673429468},{{47,826},675205481},{{47,828},477828672},{{47,830},541309112},{{47,832},421475544},{{47,834},478494486},{{47,836},773959869},{{47,838},620756099},{{47,840},817295158},{{47,842},343366608},{{47,844},474968096},{{47,846},138789669},{{47,848},1261477},{{47,850},581929663},{{47,852},193727536},{{47,854},890932863},{{47,856},10823177},{{47,858},566850894},{{47,860},774883564},{{47,862},16714666},{{47,864},326523886},{{47,866},969386350},{{47,868},297903394},{{47,870},330603328},{{47,872},602435368},{{47,874},640131734},{{47,876},422205271},{{47,878},722651837},{{47,880},536164302},{{47,882},931111157},{{47,884},119137488},{{47,886},728875089},{{47,888},985577117},{{47,890},985476890},{{47,892},17918009},{{47,894},917723365},{{47,896},472997173},{{47,898},89115107},{{47,900},916366434},{{47,902},502538821},{{47,904},230961609},{{47,906},303908854},{{47,908},617061492},{{47,910},736625515},{{47,912},131713887},{{47,914},339453221},{{47,916},738950163},{{47,918},633262610},{{47,920},426758031},{{47,922},238112917},{{47,924},779917917},{{47,926},838020550},{{47,928},66019448},{{47,930},650675847},{{47,932},778117049},{{47,934},610691432},{{47,936},213274580},{{47,938},385410347},{{47,940},146924004},{{47,942},364868172},{{47,944},467790003},{{47,946},719723336},{{47,948},134820272},{{47,950},752419541},{{47,952},477278067},{{47,954},249134595},{{47,956},704095466},{{47,958},475445405},{{47,960},736299900},{{47,962},879265925},{{47,964},152926089},{{47,966},845846141},{{47,968},495967193},{{47,970},279498385},{{47,972},571884448},{{47,974},188818617},{{47,976},160584873},{{47,978},477296264},{{47,980},718325160},{{47,982},376134972},{{47,984},29944771},{{47,986},994040918},{{47,988},900529668},{{47,990},502667072},{{47,992},63109761},{{47,994},493032874},{{47,996},781301515},{{47,998},461834757},{{47,1000},82343644},{{47,1002},481132313},{{47,1004},514447042},{{47,1006},33858163},{{47,1008},779555233},{{47,1010},748165656},{{47,1012},15592733},{{47,1014},72424287},{{47,1016},572256728},{{47,1018},868353288},{{47,1020},210902382},{{47,1022},873738113},{{47,1024},462082508},{{47,1026},116372507},{{47,1028},317994063},{{47,1030},320661573},{{47,1032},43412947},{{47,1034},698165915},{{47,1036},782179405},{{47,1038},544478699},{{47,1040},376533191},{{47,1042},591100852},{{47,1044},669522818},{{47,1046},718785967},{{47,1048},689856669},{{47,1050},868867194},{{47,1052},692259782},{{47,1054},326169003},{{47,1056},372530014},{{47,1058},278822874},{{47,1060},245059471},{{47,1062},536750832},{{47,1064},337386716},{{47,1066},351509954},{{47,1068},600150419},{{47,1070},771930319},{{47,1072},812137400},{{47,1074},268506281},{{47,1076},52663290},{{47,1078},576040882},{{47,1080},250206016},{{47,1082},182636529},{{47,1084},238498760},{{47,1086},83748189},{{47,1088},556944302},{{47,1090},408365242},{{47,1092},877381661},{{47,1094},687598532},{{47,1096},206936328},{{47,1098},93325077},{{47,1100},375585930},{{47,1102},311118119},{{47,1104},840250578},{{48,0},1},{{48,2},47},{{48,4},1173},{{48,6},20535},{{48,8},281857},{{48,10},3219563},{{48,12},31756649},{{48,14},277324867},{{48,16},182983217},{{48,18},698763572},{{48,20},224340727},{{48,22},130185913},{{48,24},938338213},{{48,26},457596872},{{48,28},500667258},{{48,30},726272186},{{48,32},242531386},{{48,34},490324006},{{48,36},697265581},{{48,38},186365736},{{48,40},123707347},{{48,42},149163288},{{48,44},89978475},{{48,46},985283339},{{48,48},584841356},{{48,50},785509005},{{48,52},693590689},{{48,54},256394211},{{48,56},919078587},{{48,58},671307265},{{48,60},271140497},{{48,62},146527772},{{48,64},508423202},{{48,66},678732983},{{48,68},767147115},{{48,70},418422439},{{48,72},470469749},{{48,74},411147184},{{48,76},246424306},{{48,78},580998273},{{48,80},228726677},{{48,82},964726100},{{48,84},955513349},{{48,86},444565758},{{48,88},668191949},{{48,90},622619432},{{48,92},792082487},{{48,94},929348032},{{48,96},601983375},{{48,98},875985614},{{48,100},424117930},{{48,102},730694027},{{48,104},740975250},{{48,106},920167707},{{48,108},500437835},{{48,110},690210005},{{48,112},493329701},{{48,114},913508192},{{48,116},695611331},{{48,118},515433292},{{48,120},682059417},{{48,122},760833644},{{48,124},299135864},{{48,126},144219873},{{48,128},937695856},{{48,130},872711671},{{48,132},176916492},{{48,134},348891212},{{48,136},334587033},{{48,138},49595521},{{48,140},749704350},{{48,142},806067034},{{48,144},773327860},{{48,146},183297942},{{48,148},590517602},{{48,150},642228939},{{48,152},275941227},{{48,154},305722242},{{48,156},165986509},{{48,158},644370063},{{48,160},71211109},{{48,162},994092320},{{48,164},193064301},{{48,166},728492690},{{48,168},76982066},{{48,170},397536959},{{48,172},240992716},{{48,174},459846893},{{48,176},745186728},{{48,178},715105963},{{48,180},864528752},{{48,182},8495685},{{48,184},753272988},{{48,186},61740216},{{48,188},691254120},{{48,190},133693721},{{48,192},536597663},{{48,194},806042634},{{48,196},964981978},{{48,198},37162518},{{48,200},164112239},{{48,202},637759779},{{48,204},841824460},{{48,206},829311498},{{48,208},573961610},{{48,210},622092127},{{48,212},856298148},{{48,214},23010232},{{48,216},90428839},{{48,218},608194623},{{48,220},46765621},{{48,222},381935126},{{48,224},362962166},{{48,226},452925715},{{48,228},585602790},{{48,230},768818647},{{48,232},88708532},{{48,234},942042803},{{48,236},418311021},{{48,238},521378251},{{48,240},499003594},{{48,242},126819649},{{48,244},281499536},{{48,246},951375086},{{48,248},146412815},{{48,250},883657287},{{48,252},598780576},{{48,254},163659546},{{48,256},959278876},{{48,258},560517421},{{48,260},665346319},{{48,262},929162776},{{48,264},164983787},{{48,266},77699826},{{48,268},451232846},{{48,270},342897676},{{48,272},483260356},{{48,274},399557298},{{48,276},954841649},{{48,278},593150358},{{48,280},617703430},{{48,282},292815034},{{48,284},3827776},{{48,286},631211917},{{48,288},629217856},{{48,290},387782790},{{48,292},117795063},{{48,294},964508694},{{48,296},824603912},{{48,298},347867132},{{48,300},217932218},{{48,302},808071571},{{48,304},466159291},{{48,306},919428338},{{48,308},306867765},{{48,310},310085680},{{48,312},347929669},{{48,314},103137973},{{48,316},445637697},{{48,318},645585557},{{48,320},573817817},{{48,322},596387955},{{48,324},672995733},{{48,326},578127218},{{48,328},402908135},{{48,330},115353766},{{48,332},244018895},{{48,334},365778204},{{48,336},555835033},{{48,338},188328988},{{48,340},247770780},{{48,342},214263457},{{48,344},844226086},{{48,346},575129810},{{48,348},998900133},{{48,350},642186262},{{48,352},886066131},{{48,354},9933705},{{48,356},609621463},{{48,358},398319031},{{48,360},223920768},{{48,362},209742125},{{48,364},519163806},{{48,366},74615456},{{48,368},814536291},{{48,370},217678251},{{48,372},205417278},{{48,374},306418059},{{48,376},464475526},{{48,378},330591049},{{48,380},614947407},{{48,382},841330174},{{48,384},17421893},{{48,386},462387593},{{48,388},572435987},{{48,390},550253368},{{48,392},393354277},{{48,394},125715312},{{48,396},124567536},{{48,398},533400012},{{48,400},599797708},{{48,402},528236566},{{48,404},670562226},{{48,406},867851657},{{48,408},488086533},{{48,410},312725786},{{48,412},238592338},{{48,414},37063455},{{48,416},385067665},{{48,418},487783197},{{48,420},118051898},{{48,422},700641656},{{48,424},71282753},{{48,426},435781034},{{48,428},103306472},{{48,430},894876554},{{48,432},845215295},{{48,434},848516},{{48,436},105817111},{{48,438},455104275},{{48,440},971250603},{{48,442},659938256},{{48,444},173306291},{{48,446},702024160},{{48,448},716038595},{{48,450},487118454},{{48,452},170680030},{{48,454},880373959},{{48,456},881689085},{{48,458},153725278},{{48,460},74926408},{{48,462},143593976},{{48,464},537712434},{{48,466},635112688},{{48,468},530810156},{{48,470},750175992},{{48,472},211491335},{{48,474},495469862},{{48,476},938874667},{{48,478},906814766},{{48,480},530322450},{{48,482},654580872},{{48,484},345961757},{{48,486},642596517},{{48,488},63791230},{{48,490},944154048},{{48,492},670877958},{{48,494},937127089},{{48,496},186748489},{{48,498},915912734},{{48,500},209561832},{{48,502},276486399},{{48,504},229476817},{{48,506},558761321},{{48,508},226557040},{{48,510},227364465},{{48,512},312169979},{{48,514},745218623},{{48,516},741668605},{{48,518},732242764},{{48,520},141121784},{{48,522},862165956},{{48,524},612899824},{{48,526},26577011},{{48,528},945385273},{{48,530},251793938},{{48,532},946782241},{{48,534},731260038},{{48,536},244678083},{{48,538},406380914},{{48,540},904932224},{{48,542},539791264},{{48,544},681567161},{{48,546},903979395},{{48,548},522313639},{{48,550},307479666},{{48,552},592336384},{{48,554},274405785},{{48,556},808155145},{{48,558},116439879},{{48,560},610551965},{{48,562},466693001},{{48,564},783212908},{{48,566},356926408},{{48,568},441684284},{{48,570},460337698},{{48,572},929744044},{{48,574},6376955},{{48,576},718008169},{{48,578},946348344},{{48,580},771828366},{{48,582},973818233},{{48,584},895371075},{{48,586},977137826},{{48,588},380169268},{{48,590},772257849},{{48,592},31334848},{{48,594},472603919},{{48,596},411133545},{{48,598},814229722},{{48,600},268412684},{{48,602},269984826},{{48,604},925865608},{{48,606},465876593},{{48,608},90547760},{{48,610},192297128},{{48,612},107314233},{{48,614},564985934},{{48,616},624177562},{{48,618},939350415},{{48,620},164843750},{{48,622},127698384},{{48,624},375467125},{{48,626},733175906},{{48,628},272735725},{{48,630},449176665},{{48,632},148653187},{{48,634},981408173},{{48,636},518395662},{{48,638},539465581},{{48,640},376426572},{{48,642},523018009},{{48,644},244326749},{{48,646},117372211},{{48,648},788925566},{{48,650},998562683},{{48,652},66998700},{{48,654},958836224},{{48,656},912519308},{{48,658},243826028},{{48,660},372775429},{{48,662},817271079},{{48,664},249393258},{{48,666},980817911},{{48,668},290157076},{{48,670},803249202},{{48,672},54296904},{{48,674},967950499},{{48,676},259586185},{{48,678},891527285},{{48,680},197070576},{{48,682},229312354},{{48,684},227197980},{{48,686},799697366},{{48,688},938796541},{{48,690},780082061},{{48,692},90937344},{{48,694},484280959},{{48,696},41280132},{{48,698},365255061},{{48,700},357940368},{{48,702},463355056},{{48,704},931322797},{{48,706},484716584},{{48,708},549219150},{{48,710},927360223},{{48,712},836260928},{{48,714},974511964},{{48,716},168938341},{{48,718},138740543},{{48,720},617041490},{{48,722},552137623},{{48,724},940491117},{{48,726},311751083},{{48,728},797191757},{{48,730},581186247},{{48,732},747525174},{{48,734},464341615},{{48,736},45074367},{{48,738},877273095},{{48,740},118604361},{{48,742},820377975},{{48,744},651223472},{{48,746},330450797},{{48,748},299712101},{{48,750},798402816},{{48,752},155978336},{{48,754},76119913},{{48,756},279749437},{{48,758},94544299},{{48,760},576902970},{{48,762},337821847},{{48,764},762491092},{{48,766},205421212},{{48,768},628488971},{{48,770},912880168},{{48,772},293200919},{{48,774},74345429},{{48,776},106904237},{{48,778},117214135},{{48,780},997309646},{{48,782},440117215},{{48,784},601730010},{{48,786},44099662},{{48,788},275878624},{{48,790},579837056},{{48,792},734358196},{{48,794},740396992},{{48,796},105320711},{{48,798},497734455},{{48,800},593389397},{{48,802},892951024},{{48,804},375888233},{{48,806},469355971},{{48,808},904918031},{{48,810},759963217},{{48,812},159920933},{{48,814},656339936},{{48,816},82028185},{{48,818},635763012},{{48,820},494109863},{{48,822},887577439},{{48,824},747214684},{{48,826},51704021},{{48,828},870514178},{{48,830},310168296},{{48,832},344440919},{{48,834},671389360},{{48,836},63636271},{{48,838},867520663},{{48,840},253359253},{{48,842},809561479},{{48,844},515218518},{{48,846},735486509},{{48,848},595414813},{{48,850},855063768},{{48,852},809133514},{{48,854},296905455},{{48,856},403829884},{{48,858},13706060},{{48,860},521945271},{{48,862},406722813},{{48,864},508410711},{{48,866},177195219},{{48,868},735377028},{{48,870},927006199},{{48,872},631467156},{{48,874},561281245},{{48,876},747357347},{{48,878},2938426},{{48,880},465345595},{{48,882},461810717},{{48,884},851331500},{{48,886},936133185},{{48,888},709629669},{{48,890},764183492},{{48,892},336958888},{{48,894},999734612},{{48,896},886346709},{{48,898},929391292},{{48,900},283117585},{{48,902},489898780},{{48,904},493902211},{{48,906},377860665},{{48,908},233672406},{{48,910},313970515},{{48,912},130449778},{{48,914},925311516},{{48,916},829665465},{{48,918},27964512},{{48,920},47478431},{{48,922},502231137},{{48,924},77997958},{{48,926},450616449},{{48,928},231073347},{{48,930},922519036},{{48,932},577962078},{{48,934},74763491},{{48,936},840109600},{{48,938},825429573},{{48,940},325716083},{{48,942},462423227},{{48,944},684091307},{{48,946},610980133},{{48,948},146344297},{{48,950},230702558},{{48,952},840583842},{{48,954},568780809},{{48,956},837872774},{{48,958},467777629},{{48,960},918753619},{{48,962},868791683},{{48,964},692922864},{{48,966},937076083},{{48,968},487643358},{{48,970},553595896},{{48,972},717484731},{{48,974},882361644},{{48,976},739294901},{{48,978},547711612},{{48,980},781629368},{{48,982},821302751},{{48,984},368923697},{{48,986},499416921},{{48,988},374122329},{{48,990},146178192},{{48,992},867117817},{{48,994},743635071},{{48,996},435195107},{{48,998},43377741},{{48,1000},23687167},{{48,1002},878990481},{{48,1004},99110158},{{48,1006},262344925},{{48,1008},137035868},{{48,1010},292609610},{{48,1012},625408058},{{48,1014},171070693},{{48,1016},281506530},{{48,1018},350758492},{{48,1020},515834894},{{48,1022},237732608},{{48,1024},828774443},{{48,1026},840832942},{{48,1028},431386878},{{48,1030},857791323},{{48,1032},291378943},{{48,1034},894741249},{{48,1036},559570546},{{48,1038},881728336},{{48,1040},216217018},{{48,1042},497590589},{{48,1044},210577047},{{48,1046},706853900},{{48,1048},528807154},{{48,1050},595327246},{{48,1052},243687205},{{48,1054},679896105},{{48,1056},276389715},{{48,1058},520651743},{{48,1060},981854062},{{48,1062},782051052},{{48,1064},628779694},{{48,1066},482906971},{{48,1068},308000266},{{48,1070},98460224},{{48,1072},329039027},{{48,1074},663453182},{{48,1076},866909422},{{48,1078},358447817},{{48,1080},756042580},{{48,1082},103701857},{{48,1084},530184673},{{48,1086},82157052},{{48,1088},864831037},{{48,1090},833622836},{{48,1092},129557279},{{48,1094},680891914},{{48,1096},903510655},{{48,1098},223117879},{{48,1100},584910098},{{48,1102},872789802},{{48,1104},683398377},{{48,1106},818673921},{{48,1108},424793316},{{48,1110},162530200},{{48,1112},461191009},{{48,1114},233747923},{{48,1116},764377859},{{48,1118},866276050},{{48,1120},20068038},{{48,1122},599500015},{{48,1124},419525268},{{48,1126},504837656},{{48,1128},702339633},{{48,1130},161478719},{{48,1132},731429464},{{48,1134},9977417},{{48,1136},955013204},{{48,1138},944736389},{{48,1140},868359658},{{48,1142},303235910},{{48,1144},570685307},{{48,1146},762022093},{{48,1148},973456873},{{48,1150},491776893},{{48,1152},191155949},{{49,0},1},{{49,2},48},{{49,4},1222},{{49,6},21804},{{49,8},304834},{{49,10},3544928},{{49,12},35583250},{{49,14},316123172},{{49,16},530785426},{{49,18},505824986},{{49,20},901343166},{{49,22},615485588},{{49,24},789348648},{{49,26},698747334},{{49,28},657848248},{{49,30},964586458},{{49,32},476943547},{{49,34},698458295},{{49,36},801769019},{{49,38},257736525},{{49,40},542576587},{{49,42},933572174},{{49,44},9542546},{{49,46},488292838},{{49,48},779820677},{{49,50},404677231},{{49,52},568188493},{{49,54},931045218},{{49,56},340825658},{{49,58},205993974},{{49,60},185959269},{{49,62},78058729},{{49,64},445883053},{{49,66},431770274},{{49,68},625502333},{{49,70},180277174},{{49,72},804167964},{{49,74},894493650},{{49,76},995189957},{{49,78},934651928},{{49,80},779076648},{{49,82},286076285},{{49,84},196236261},{{49,86},433504295},{{49,88},796345349},{{49,90},46608071},{{49,92},262327913},{{49,94},615865530},{{49,96},569486410},{{49,98},232121371},{{49,100},86175778},{{49,102},154003167},{{49,104},455565337},{{49,106},592635041},{{49,108},449778081},{{49,110},946011559},{{49,112},315342730},{{49,114},523152035},{{49,116},660192808},{{49,118},984322053},{{49,120},918448908},{{49,122},362530845},{{49,124},976500024},{{49,126},826353996},{{49,128},979299043},{{49,130},20455239},{{49,132},106430716},{{49,134},169990095},{{49,136},856925551},{{49,138},339927417},{{49,140},872925000},{{49,142},454748405},{{49,144},844111855},{{49,146},778706572},{{49,148},953334777},{{49,150},367875579},{{49,152},54603227},{{49,154},952723870},{{49,156},746089521},{{49,158},114899675},{{49,160},378338080},{{49,162},515017450},{{49,164},901556480},{{49,166},75514717},{{49,168},118586517},{{49,170},750778341},{{49,172},164215503},{{49,174},398032943},{{49,176},932771419},{{49,178},175973529},{{49,180},371281707},{{49,182},414155738},{{49,184},136305212},{{49,186},176477492},{{49,188},529591042},{{49,190},473449712},{{49,192},104580388},{{49,194},917944592},{{49,196},711611694},{{49,198},275529831},{{49,200},657391663},{{49,202},618370464},{{49,204},182199238},{{49,206},863262145},{{49,208},671572410},{{49,210},926093081},{{49,212},964697471},{{49,214},20599847},{{49,216},886336884},{{49,218},976845790},{{49,220},332330830},{{49,222},936899217},{{49,224},469444206},{{49,226},333826539},{{49,228},382006323},{{49,230},404644652},{{49,232},86283892},{{49,234},711449573},{{49,236},711524895},{{49,238},240243757},{{49,240},137744674},{{49,242},52585102},{{49,244},502954368},{{49,246},568353873},{{49,248},424768720},{{49,250},673699213},{{49,252},453807002},{{49,254},277591996},{{49,256},614231800},{{49,258},858886730},{{49,260},933633627},{{49,262},855960053},{{49,264},795294602},{{49,266},320736325},{{49,268},160050137},{{49,270},741837408},{{49,272},875372187},{{49,274},933116510},{{49,276},439299086},{{49,278},339530899},{{49,280},998809886},{{49,282},988163112},{{49,284},414204450},{{49,286},626581582},{{49,288},425958595},{{49,290},547450689},{{49,292},257877182},{{49,294},25212376},{{49,296},487090639},{{49,298},693248108},{{49,300},736165691},{{49,302},261048117},{{49,304},530252319},{{49,306},667332870},{{49,308},224234420},{{49,310},283256778},{{49,312},493030047},{{49,314},381167115},{{49,316},959191937},{{49,318},567700201},{{49,320},408470930},{{49,322},456733167},{{49,324},877572444},{{49,326},640070139},{{49,328},177231251},{{49,330},53889209},{{49,332},630925282},{{49,334},764167042},{{49,336},903138510},{{49,338},822950867},{{49,340},161878067},{{49,342},741376139},{{49,344},620673064},{{49,346},828400388},{{49,348},989198090},{{49,350},398235498},{{49,352},335164252},{{49,354},650259410},{{49,356},895482301},{{49,358},288920533},{{49,360},986020511},{{49,362},960531109},{{49,364},692510577},{{49,366},743863232},{{49,368},159848129},{{49,370},639142915},{{49,372},658806616},{{49,374},286815941},{{49,376},569150064},{{49,378},996156909},{{49,380},474086872},{{49,382},377428234},{{49,384},108191201},{{49,386},968576455},{{49,388},934066962},{{49,390},520785392},{{49,392},648351310},{{49,394},322768543},{{49,396},500047228},{{49,398},717012630},{{49,400},366640002},{{49,402},617370336},{{49,404},747113890},{{49,406},647615517},{{49,408},420668064},{{49,410},485924194},{{49,412},28548015},{{49,414},242698362},{{49,416},20265134},{{49,418},481161073},{{49,420},780894508},{{49,422},716872330},{{49,424},925052871},{{49,426},809234518},{{49,428},209608950},{{49,430},454869307},{{49,432},42621234},{{49,434},266915957},{{49,436},548835092},{{49,438},11648368},{{49,440},200676498},{{49,442},803279760},{{49,444},609790836},{{49,446},522043768},{{49,448},787672824},{{49,450},264643232},{{49,452},571421826},{{49,454},762085826},{{49,456},854807719},{{49,458},119023111},{{49,460},660310435},{{49,462},945098645},{{49,464},838260736},{{49,466},592383406},{{49,468},728604232},{{49,470},586121308},{{49,472},18945549},{{49,474},62079587},{{49,476},8000021},{{49,478},137221342},{{49,480},936745518},{{49,482},867913927},{{49,484},937623778},{{49,486},183088542},{{49,488},624248829},{{49,490},606106136},{{49,492},815005922},{{49,494},728188591},{{49,496},164502140},{{49,498},885086995},{{49,500},646575964},{{49,502},60630781},{{49,504},250914884},{{49,506},619961376},{{49,508},835493684},{{49,510},1794097},{{49,512},350786557},{{49,514},222634027},{{49,516},605402916},{{49,518},871984975},{{49,520},140157610},{{49,522},784428245},{{49,524},701028584},{{49,526},784157139},{{49,528},199990301},{{49,530},49282014},{{49,532},806191394},{{49,534},544636448},{{49,536},696393844},{{49,538},625422532},{{49,540},306981977},{{49,542},200109353},{{49,544},819880255},{{49,546},622554727},{{49,548},966234587},{{49,550},1715755},{{49,552},884432882},{{49,554},186517679},{{49,556},414057470},{{49,558},559202957},{{49,560},356291776},{{49,562},440462056},{{49,564},76496043},{{49,566},54502936},{{49,568},82793754},{{49,570},693820485},{{49,572},333532789},{{49,574},139408482},{{49,576},538301356},{{49,578},908601203},{{49,580},663844984},{{49,582},277481039},{{49,584},494620179},{{49,586},126148065},{{49,588},101563902},{{49,590},543304970},{{49,592},40138848},{{49,594},255494176},{{49,596},250466774},{{49,598},181548534},{{49,600},183041503},{{49,602},553027506},{{49,604},468172977},{{49,606},571880068},{{49,608},685135214},{{49,610},70030015},{{49,612},431414252},{{49,614},965377675},{{49,616},285528459},{{49,618},577690235},{{49,620},3039911},{{49,622},424468115},{{49,624},149219671},{{49,626},315258608},{{49,628},442938842},{{49,630},340124780},{{49,632},620577523},{{49,634},697442435},{{49,636},606981307},{{49,638},195766252},{{49,640},513624332},{{49,642},160814831},{{49,644},144529981},{{49,646},626344971},{{49,648},929525101},{{49,650},167384034},{{49,652},985564306},{{49,654},757660450},{{49,656},674490248},{{49,658},404160553},{{49,660},218780132},{{49,662},253152109},{{49,664},588527766},{{49,666},276135385},{{49,668},293545669},{{49,670},229980166},{{49,672},406532593},{{49,674},544661736},{{49,676},944987368},{{49,678},74067610},{{49,680},979465423},{{49,682},367319108},{{49,684},691015763},{{49,686},308068787},{{49,688},270297211},{{49,690},892899529},{{49,692},571121326},{{49,694},682341094},{{49,696},508186314},{{49,698},992592910},{{49,700},570463576},{{49,702},551864557},{{49,704},443417375},{{49,706},102996223},{{49,708},180706669},{{49,710},66278518},{{49,712},547390018},{{49,714},97982020},{{49,716},377733797},{{49,718},642211092},{{49,720},809569594},{{49,722},442856622},{{49,724},912786312},{{49,726},563198351},{{49,728},549331531},{{49,730},576357131},{{49,732},891027263},{{49,734},77805689},{{49,736},816522985},{{49,738},731749256},{{49,740},313952972},{{49,742},411776160},{{49,744},795006290},{{49,746},22615421},{{49,748},348238413},{{49,750},716260746},{{49,752},223962550},{{49,754},78670864},{{49,756},47765882},{{49,758},267128253},{{49,760},587371111},{{49,762},927656165},{{49,764},192469863},{{49,766},806624234},{{49,768},136996971},{{49,770},759497678},{{49,772},646978177},{{49,774},833527505},{{49,776},472805550},{{49,778},754214240},{{49,780},960030895},{{49,782},232746388},{{49,784},490616131},{{49,786},420542303},{{49,788},904038549},{{49,790},210637836},{{49,792},74285318},{{49,794},144447351},{{49,796},742135765},{{49,798},244372617},{{49,800},87595635},{{49,802},852731251},{{49,804},594678505},{{49,806},794681848},{{49,808},228154101},{{49,810},363702627},{{49,812},673985808},{{49,814},239196945},{{49,816},836249623},{{49,818},602064792},{{49,820},462168907},{{49,822},430511049},{{49,824},331217937},{{49,826},84426505},{{49,828},529390112},{{49,830},953694258},{{49,832},768941491},{{49,834},296949641},{{49,836},617567965},{{49,838},759210871},{{49,840},554347066},{{49,842},314959464},{{49,844},855978152},{{49,846},459336095},{{49,848},416019714},{{49,850},554419893},{{49,852},643616814},{{49,854},307318600},{{49,856},193723511},{{49,858},342506504},{{49,860},737708842},{{49,862},961578294},{{49,864},644413804},{{49,866},283651295},{{49,868},449519877},{{49,870},262823100},{{49,872},438065978},{{49,874},195660179},{{49,876},15479674},{{49,878},929627357},{{49,880},712657286},{{49,882},867475048},{{49,884},618979059},{{49,886},615899609},{{49,888},290553872},{{49,890},46585860},{{49,892},675146342},{{49,894},899293157},{{49,896},138576244},{{49,898},932939832},{{49,900},413352510},{{49,902},228638502},{{49,904},577046541},{{49,906},52412367},{{49,908},271101119},{{49,910},704058715},{{49,912},716195674},{{49,914},113738084},{{49,916},976781966},{{49,918},417637854},{{49,920},201849275},{{49,922},137988263},{{49,924},703452509},{{49,926},833173534},{{49,928},774723430},{{49,930},98520292},{{49,932},647910333},{{49,934},702073064},{{49,936},101667724},{{49,938},93613248},{{49,940},4773372},{{49,942},993672667},{{49,944},598539625},{{49,946},298728331},{{49,948},547262186},{{49,950},609550837},{{49,952},42278975},{{49,954},203431476},{{49,956},764589375},{{49,958},791435299},{{49,960},273439277},{{49,962},15186943},{{49,964},247517820},{{49,966},332116413},{{49,968},672582410},{{49,970},88991345},{{49,972},573172714},{{49,974},370502342},{{49,976},495515460},{{49,978},486357723},{{49,980},529038430},{{49,982},112617630},{{49,984},9655079},{{49,986},54905538},{{49,988},630913486},{{49,990},94540925},{{49,992},694069860},{{49,994},101033114},{{49,996},601510215},{{49,998},405093272},{{49,1000},877399916},{{49,1002},606786230},{{49,1004},712700446},{{49,1006},365826653},{{49,1008},440611748},{{49,1010},222502187},{{49,1012},628732942},{{49,1014},260127071},{{49,1016},415183336},{{49,1018},331627148},{{49,1020},603111841},{{49,1022},484627861},{{49,1024},252203062},{{49,1026},603610758},{{49,1028},918118836},{{49,1030},775502591},{{49,1032},558836403},{{49,1034},458735214},{{49,1036},903545723},{{49,1038},229008632},{{49,1040},239177179},{{49,1042},70767308},{{49,1044},751925156},{{49,1046},652119146},{{49,1048},980361868},{{49,1050},450630793},{{49,1052},63075950},{{49,1054},714904102},{{49,1056},795480239},{{49,1058},196855664},{{49,1060},446357279},{{49,1062},343343138},{{49,1064},751184330},{{49,1066},353543327},{{49,1068},265335039},{{49,1070},291055365},{{49,1072},141693974},{{49,1074},952501609},{{49,1076},772988967},{{49,1078},982806649},{{49,1080},295006336},{{49,1082},142133453},{{49,1084},389243658},{{49,1086},551050114},{{49,1088},837354729},{{49,1090},288032982},{{49,1092},926886748},{{49,1094},940810321},{{49,1096},996269340},{{49,1098},544323652},{{49,1100},123254721},{{49,1102},449847916},{{49,1104},164321665},{{49,1106},408440169},{{49,1108},540527971},{{49,1110},235735087},{{49,1112},384560805},{{49,1114},888470688},{{49,1116},711171300},{{49,1118},414716347},{{49,1120},219479361},{{49,1122},559050803},{{49,1124},610845133},{{49,1126},321258507},{{49,1128},296543705},{{49,1130},253557800},{{49,1132},771631909},{{49,1134},466270561},{{49,1136},966519146},{{49,1138},100544233},{{49,1140},474799959},{{49,1142},147649345},{{49,1144},956135303},{{49,1146},808272257},{{49,1148},279282920},{{49,1150},472357219},{{49,1152},422709994},{{49,1154},530025514},{{49,1156},999788009},{{49,1158},64593897},{{49,1160},709199531},{{49,1162},479060735},{{49,1164},311654131},{{49,1166},943520011},{{49,1168},427742758},{{49,1170},799287390},{{49,1172},782392773},{{49,1174},191335024},{{49,1176},830990096},{{49,1178},336010037},{{49,1180},237942831},{{49,1182},237453992},{{49,1184},695887098},{{49,1186},398366572},{{49,1188},529644737},{{49,1190},344086296},{{49,1192},862051533},{{49,1194},684436865},{{49,1196},317549101},{{49,1198},968659087},{{49,1200},366641438},{{50,0},1},{{50,2},49},{{50,4},1272},{{50,6},23124},{{50,8},329180},{{50,10},3895908},{{50,12},39783804},{{50,14},359447204},{{50,16},925733384},{{50,18},746545659},{{50,20},165655001},{{50,22},158091124},{{50,24},719304162},{{50,26},111160209},{{50,28},171158550},{{50,30},935012406},{{50,32},874008903},{{50,34},988755604},{{50,36},608336289},{{50,38},351327718},{{50,40},211049418},{{50,42},970686245},{{50,44},441380023},{{50,46},920727544},{{50,48},396494781},{{50,50},218114186},{{50,52},934368772},{{50,54},753990221},{{50,56},203263446},{{50,58},488226646},{{50,60},946324350},{{50,62},642441651},{{50,64},816607227},{{50,66},122420091},{{50,68},629716118},{{50,70},498106515},{{50,72},488881569},{{50,74},100763230},{{50,76},814241373},{{50,78},430998026},{{50,80},986590664},{{50,82},188596813},{{50,84},238499794},{{50,86},887765759},{{50,88},719310391},{{50,90},819612870},{{50,92},840885905},{{50,94},584773429},{{50,96},811468143},{{50,98},396065785},{{50,100},368868801},{{50,102},299761844},{{50,104},617462619},{{50,106},308704442},{{50,108},206242421},{{50,110},833439007},{{50,112},106715469},{{50,114},970135543},{{50,116},972244832},{{50,118},66232618},{{50,120},207050932},{{50,122},577078708},{{50,124},955731123},{{50,126},103929249},{{50,128},632790957},{{50,130},297717977},{{50,132},280927805},{{50,134},856143814},{{50,136},140717794},{{50,138},889342899},{{50,140},570959166},{{50,142},553036683},{{50,144},311778062},{{50,146},833874032},{{50,148},321035571},{{50,150},629235909},{{50,152},60666525},{{50,154},19636232},{{50,156},889773198},{{50,158},837811568},{{50,160},283828621},{{50,162},499062871},{{50,164},459250525},{{50,166},468391935},{{50,168},389843786},{{50,170},80632526},{{50,172},462481073},{{50,174},859711240},{{50,176},66143264},{{50,178},831825780},{{50,180},518914304},{{50,182},998480225},{{50,184},496960804},{{50,186},480385724},{{50,188},483317701},{{50,190},923742113},{{50,192},771054094},{{50,194},630267330},{{50,196},478946945},{{50,198},527928962},{{50,200},674723787},{{50,202},882998613},{{50,204},123711144},{{50,206},324674723},{{50,208},964132061},{{50,210},961988031},{{50,212},65215295},{{50,214},858250635},{{50,216},924300325},{{50,218},577545014},{{50,220},241841560},{{50,222},172586320},{{50,224},726876085},{{50,226},210684082},{{50,228},897202470},{{50,230},742850020},{{50,232},161301259},{{50,234},120853804},{{50,236},344539574},{{50,238},836860211},{{50,240},667275920},{{50,242},72688787},{{50,244},930704832},{{50,246},179668299},{{50,248},861726583},{{50,250},168665810},{{50,252},834696469},{{50,254},672920894},{{50,256},419563732},{{50,258},302874180},{{50,260},454615268},{{50,262},934181182},{{50,264},119694911},{{50,266},779976833},{{50,268},216225187},{{50,270},244379028},{{50,272},586838513},{{50,274},942544272},{{50,276},397970796},{{50,278},155525782},{{50,280},435250288},{{50,282},609294947},{{50,284},697035870},{{50,286},790138207},{{50,288},313089121},{{50,290},451259481},{{50,292},904475234},{{50,294},15500998},{{50,296},428233316},{{50,298},352796372},{{50,300},805867626},{{50,302},355791012},{{50,304},191743365},{{50,306},390372515},{{50,308},86113794},{{50,310},224579645},{{50,312},34292553},{{50,314},472538607},{{50,316},244805809},{{50,318},799547326},{{50,320},350596592},{{50,322},550928379},{{50,324},248605526},{{50,326},858957317},{{50,328},809083222},{{50,330},418025439},{{50,332},717379009},{{50,334},843111164},{{50,336},748566980},{{50,338},795763411},{{50,340},344249103},{{50,342},246799165},{{50,344},468081584},{{50,346},533360568},{{50,348},97839725},{{50,350},814208152},{{50,352},370784820},{{50,354},149643652},{{50,356},648814350},{{50,358},586462723},{{50,360},179226570},{{50,362},323415874},{{50,364},413399345},{{50,366},830824722},{{50,368},901264775},{{50,370},785155020},{{50,372},673315179},{{50,374},883230707},{{50,376},320461657},{{50,378},209574161},{{50,380},896187167},{{50,382},641537195},{{50,384},580708044},{{50,386},615201169},{{50,388},907420567},{{50,390},226969633},{{50,392},44823693},{{50,394},653925850},{{50,396},618905940},{{50,398},556249274},{{50,400},683808190},{{50,402},595045606},{{50,404},406684866},{{50,406},817926872},{{50,408},498013040},{{50,410},741888764},{{50,412},255307898},{{50,414},750076370},{{50,416},226664326},{{50,418},45791371},{{50,420},138249186},{{50,422},182084615},{{50,424},925519009},{{50,426},32002450},{{50,428},507648904},{{50,430},36302093},{{50,432},164244320},{{50,434},134446595},{{50,436},176304234},{{50,438},443232913},{{50,440},204696272},{{50,442},377207389},{{50,444},330407781},{{50,446},317016375},{{50,448},255990328},{{50,450},346121343},{{50,452},776903928},{{50,454},865285835},{{50,456},180645765},{{50,458},94169320},{{50,460},523805568},{{50,462},66571932},{{50,464},958229276},{{50,466},706032441},{{50,468},157122799},{{50,470},174128102},{{50,472},265560802},{{50,474},960871567},{{50,476},814597354},{{50,478},840895548},{{50,480},702037},{{50,482},848074074},{{50,484},17426708},{{50,486},276377856},{{50,488},55696613},{{50,490},206160180},{{50,492},32721003},{{50,494},453495162},{{50,496},587538197},{{50,498},204676036},{{50,500},610254246},{{50,502},936113705},{{50,504},842825687},{{50,506},202272844},{{50,508},145230437},{{50,510},624393323},{{50,512},739106533},{{50,514},700708897},{{50,516},523328161},{{50,518},691038973},{{50,520},656087189},{{50,522},213848962},{{50,524},927815456},{{50,526},921255504},{{50,528},609475698},{{50,530},113463094},{{50,532},529085932},{{50,534},807792149},{{50,536},579407091},{{50,538},163833313},{{50,540},694176222},{{50,542},471399591},{{50,544},346973697},{{50,546},718259544},{{50,548},297359882},{{50,550},892552532},{{50,552},451373341},{{50,554},120883534},{{50,556},8029910},{{50,558},624607649},{{50,560},606649877},{{50,562},815313728},{{50,564},231664869},{{50,566},673443919},{{50,568},615486405},{{50,570},94571095},{{50,572},110823650},{{50,574},950289120},{{50,576},646876432},{{50,578},928906934},{{50,580},684469503},{{50,582},297251947},{{50,584},919054473},{{50,586},285157267},{{50,588},967739040},{{50,590},274416446},{{50,592},465229888},{{50,594},656873003},{{50,596},825576691},{{50,598},53305194},{{50,600},539107135},{{50,602},609069516},{{50,604},669008004},{{50,606},585520763},{{50,608},526072937},{{50,610},91836656},{{50,612},101778461},{{50,614},538228891},{{50,616},424599066},{{50,618},719851020},{{50,620},234795290},{{50,622},701214554},{{50,624},914481398},{{50,626},497763115},{{50,628},504286064},{{50,630},212679726},{{50,632},409710596},{{50,634},134500525},{{50,636},154608785},{{50,638},554889670},{{50,640},267547678},{{50,642},851784437},{{50,644},749366191},{{50,646},681515762},{{50,648},587313005},{{50,650},604179607},{{50,652},297539881},{{50,654},51380469},{{50,656},30897443},{{50,658},988568867},{{50,660},430543091},{{50,662},168358864},{{50,664},325894509},{{50,666},131217074},{{50,668},122226126},{{50,670},289735266},{{50,672},2541560},{{50,674},697428098},{{50,676},339809826},{{50,678},339814711},{{50,680},568813016},{{50,682},256466301},{{50,684},865405619},{{50,686},710940331},{{50,688},7424767},{{50,690},660900037},{{50,692},729644940},{{50,694},444},{{50,696},450105203},{{50,698},690939247},{{50,700},459755659},{{50,702},92556107},{{50,704},42398758},{{50,706},782901298},{{50,708},483436309},{{50,710},73995240},{{50,712},784415989},{{50,714},602791285},{{50,716},655683750},{{50,718},744368335},{{50,720},684929720},{{50,722},939318197},{{50,724},1937536},{{50,726},94209990},{{50,728},544006669},{{50,730},195169186},{{50,732},297173575},{{50,734},151918090},{{50,736},559870646},{{50,738},425964491},{{50,740},818978660},{{50,742},571568643},{{50,744},60393204},{{50,746},415731654},{{50,748},547756555},{{50,750},991386612},{{50,752},383053326},{{50,754},997830526},{{50,756},963081859},{{50,758},107336308},{{50,760},898219937},{{50,762},906988404},{{50,764},550036125},{{50,766},981857264},{{50,768},691293427},{{50,770},481189647},{{50,772},501756531},{{50,774},316529056},{{50,776},476096058},{{50,778},168221459},{{50,780},165690115},{{50,782},553028411},{{50,784},960794528},{{50,786},453386272},{{50,788},963889156},{{50,790},71983103},{{50,792},494867184},{{50,794},462967097},{{50,796},635240847},{{50,798},989817132},{{50,800},23786457},{{50,802},968645733},{{50,804},163475174},{{50,806},884798755},{{50,808},971346358},{{50,810},8231228},{{50,812},947835970},{{50,814},751371876},{{50,816},21594745},{{50,818},702982989},{{50,820},997528759},{{50,822},30899466},{{50,824},874470660},{{50,826},839706683},{{50,828},64336797},{{50,830},183002010},{{50,832},415355406},{{50,834},851375333},{{50,836},802315034},{{50,838},662347966},{{50,840},459017349},{{50,842},83113197},{{50,844},807783874},{{50,846},686211775},{{50,848},665742332},{{50,850},548408223},{{50,852},38712773},{{50,854},947065654},{{50,856},224142524},{{50,858},544199777},{{50,860},554457822},{{50,862},161813447},{{50,864},59932464},{{50,866},324817969},{{50,868},826816639},{{50,870},159675767},{{50,872},610260222},{{50,874},802832692},{{50,876},962264291},{{50,878},230527850},{{50,880},654881259},{{50,882},493134625},{{50,884},56109407},{{50,886},491401533},{{50,888},163680598},{{50,890},892934948},{{50,892},889185132},{{50,894},78662275},{{50,896},741528574},{{50,898},616484511},{{50,900},204394884},{{50,902},120980232},{{50,904},4959172},{{50,906},884202370},{{50,908},468625389},{{50,910},987185268},{{50,912},797914336},{{50,914},292935354},{{50,916},542176515},{{50,918},965256954},{{50,920},25044127},{{50,922},701524209},{{50,924},669825969},{{50,926},264620823},{{50,928},983915826},{{50,930},463815578},{{50,932},325409981},{{50,934},142164710},{{50,936},946513145},{{50,938},626025918},{{50,940},890502327},{{50,942},456729879},{{50,944},921471703},{{50,946},889764153},{{50,948},10834930},{{50,950},550258959},{{50,952},888111963},{{50,954},456661896},{{50,956},560525119},{{50,958},254574198},{{50,960},379302005},{{50,962},359197537},{{50,964},748972811},{{50,966},432885247},{{50,968},174603143},{{50,970},495215302},{{50,972},304225805},{{50,974},499574},{{50,976},89067439},{{50,978},956588800},{{50,980},479903186},{{50,982},900293862},{{50,984},918419160},{{50,986},874312513},{{50,988},779518268},{{50,990},750190343},{{50,992},34999197},{{50,994},204187488},{{50,996},29703716},{{50,998},310295240},{{50,1000},212734818},{{50,1002},705461990},{{50,1004},880565621},{{50,1006},542764103},{{50,1008},578132976},{{50,1010},871657196},{{50,1012},920555643},{{50,1014},635330221},{{50,1016},603836039},{{50,1018},905337022},{{50,1020},446003049},{{50,1022},531829391},{{50,1024},914627500},{{50,1026},109964459},{{50,1028},793773872},{{50,1030},883594493},{{50,1032},588890899},{{50,1034},761763418},{{50,1036},850946563},{{50,1038},47045637},{{50,1040},406265955},{{50,1042},398330580},{{50,1044},175033998},{{50,1046},98562597},{{50,1048},74022406},{{50,1050},109783010},{{50,1052},888406279},{{50,1054},62923507},{{50,1056},851720727},{{50,1058},920064661},{{50,1060},659715101},{{50,1062},731241623},{{50,1064},740764931},{{50,1066},68490942},{{50,1068},26861674},{{50,1070},832409630},{{50,1072},156628069},{{50,1074},65837301},{{50,1076},277330611},{{50,1078},504531610},{{50,1080},621094682},{{50,1082},513712789},{{50,1084},824543274},{{50,1086},863846088},{{50,1088},522929299},{{50,1090},50674845},{{50,1092},205053841},{{50,1094},391074024},{{50,1096},703020653},{{50,1098},598865065},{{50,1100},977680558},{{50,1102},126857946},{{50,1104},571772915},{{50,1106},596794646},{{50,1108},195429545},{{50,1110},328266420},{{50,1112},36051456},{{50,1114},451216030},{{50,1116},522276964},{{50,1118},948367998},{{50,1120},561406981},{{50,1122},389510759},{{50,1124},585943971},{{50,1126},108053297},{{50,1128},459413669},{{50,1130},288907310},{{50,1132},136029766},{{50,1134},802792879},{{50,1136},520247265},{{50,1138},414339912},{{50,1140},337619243},{{50,1142},597859489},{{50,1144},40005835},{{50,1146},350918},{{50,1148},321070418},{{50,1150},199829979},{{50,1152},141119131},{{50,1154},515535428},{{50,1156},350920730},{{50,1158},314377413},{{50,1160},808898947},{{50,1162},900198037},{{50,1164},799762368},{{50,1166},570476717},{{50,1168},244997759},{{50,1170},402733111},{{50,1172},626061442},{{50,1174},103647198},{{50,1176},938528989},{{50,1178},898060580},{{50,1180},652361018},{{50,1182},641847472},{{50,1184},149112119},{{50,1186},134262079},{{50,1188},887185896},{{50,1190},606038263},{{50,1192},859408453},{{50,1194},950373236},{{50,1196},692335861},{{50,1198},405660442},{{50,1200},565431386},{{50,1202},959094106},{{50,1204},393940636},{{50,1206},423632434},{{50,1208},612413824},{{50,1210},143336067},{{50,1212},663257107},{{50,1214},9730523},{{50,1216},471491852},{{50,1218},112828340},{{50,1220},936303905},{{50,1222},998673093},{{50,1224},55233966},{{50,1226},416039620},{{50,1228},144081002},{{50,1230},565258672},{{50,1232},539355694},{{50,1234},202448366},{{50,1236},14002378},{{50,1238},539019751},{{50,1240},307827209},{{50,1242},288622328},{{50,1244},788194350},{{50,1246},570120788},{{50,1248},965430343},{{50,1250},472467292}, // }; void solve_umekomi() { map<PII, int> m; int n, k; cin >> n >> k; if (k % 2 == 1) cout << 0 << endl; else { cout << m[PII(n, k)] << endl; } } template <std::uint_least32_t MODULO> class modint { public: using uint32 = std::uint_least32_t; using uint64 = std::uint_least64_t; using iint64 = std::int_fast64_t; class optimize_tag_t {}; static constexpr optimize_tag_t optimize_tag{}; public: using value_type = uint32; value_type a; static constexpr value_type cst(iint64 x) noexcept { x %= static_cast<iint64>(MODULO); if (x < static_cast<iint64>(0)) { x += static_cast<iint64>(MODULO); } return static_cast<value_type>(x); } constexpr modint(optimize_tag_t, const value_type &x) noexcept : a(x) {} constexpr modint() noexcept : a(static_cast<value_type>(0)) {} constexpr modint(const iint64 &x) noexcept : a(cst(x)) {} constexpr modint operator+(const modint &o) const noexcept { return modint(optimize_tag, a + o.a < MODULO ? a + o.a : a + o.a - MODULO); } constexpr modint operator-(const modint &o) const noexcept { return modint(optimize_tag, a < o.a ? a + MODULO - o.a : a - o.a); } constexpr modint operator*(const modint &o) const noexcept { return modint(optimize_tag, static_cast<value_type>(static_cast<uint64>(a) * static_cast<uint64>(o.a) % static_cast<uint64>(MODULO))); } constexpr modint operator/(const modint &o) const { return modint(optimize_tag, static_cast<value_type>(static_cast<uint64>(a) * static_cast<uint64>((~o).a) % static_cast<uint64>(MODULO))); } modint &operator+=(const modint &o) noexcept { if ((a += o.a) >= MODULO) a -= MODULO; return *this; } modint &operator-=(const modint &o) noexcept { if (a < o.a) a += MODULO; a -= o.a; return *this; } modint &operator*=(const modint &o) noexcept { a = static_cast<value_type>(static_cast<uint64>(a) * static_cast<uint64>(o.a) % static_cast<uint64>(MODULO)); return *this; } modint &operator/=(const modint &o) { a = static_cast<uint64>(a) * (~o).a % MODULO; return *this; } constexpr modint inverse() const noexcept { assert(a != static_cast<value_type>(0) && "0 does not have inverse"); return pow(static_cast<uint64>(MODULO - static_cast<value_type>(2))); } constexpr modint operator~() const noexcept { return inverse(); } constexpr modint operator-() const noexcept { if (a == static_cast<value_type>(0)) { return modint(optimize_tag, static_cast<value_type>(0)); } else { return modint(optimize_tag, MODULO - a); } } modint &operator++() noexcept { if (++a == MODULO) { a = static_cast<value_type>(0); } return *this; } modint &operator--() noexcept { if (a == static_cast<value_type>(0)) { a = MODULO; } --a; return *this; } constexpr bool operator==(const modint &o) const noexcept { return a == o.a; } constexpr bool operator!=(const modint &o) const noexcept { return a != o.a; } constexpr bool operator<(const modint &o) const noexcept { return a < o.a; } constexpr bool operator<=(const modint &o) const noexcept { return a <= o.a; } constexpr bool operator>(const modint &o) const noexcept { return a > o.a; } constexpr bool operator>=(const modint &o) const noexcept { return a >= o.a; } constexpr explicit operator bool() const noexcept { return a; } constexpr explicit operator value_type() const noexcept { return a; } modint pow(iint64 inx) const noexcept { if (inx < 0) assert(a != static_cast<value_type>(0) && "not pow index < 0"); uint64 x = inx; uint64 t = a, u = 1; while (x) { if (x & 1) u = u * t % MODULO; t = (t * t) % MODULO; x >>= 1; } return modint(optimize_tag, static_cast<value_type>(u)); } constexpr value_type get() const noexcept { return a; } }; using mint = modint<MOD>; mint dp[51][51][2503]; void solve_dp() { LL N, score; cin >> N >> score; dp[0][0][0] = 1; // (i,j left, score sum) FOR(i, 0, N) { FOR(j, 0, i + 1) { FOR(k, 0, score + 1) { { // o---o int nj = j; dp[i + 1][nj][k + 2 * nj] += dp[i][j][k]; } { // o...o int nj = j + 1; dp[i + 1][nj][k + 2 * nj] += dp[i][j][k]; } { // o/...o int nj = j; dp[i + 1][nj][k + 2 * nj] += dp[i][j][k] * (2 * j); } if (j) { // o/..\o int nj = j - 1; dp[i + 1][nj][k + 2 * nj] += dp[i][j][k] * (j * j); } } } } mint ans = dp[N][0][score]; cout << ans.get() << "\n"; } int main() { cin.tie(0); ios_base::sync_with_stdio(false); // maintest(); // cap(); // return 0; // solve_umekomi(); solve_dp(); return 0; }
#include <bits/stdc++.h> using namespace std; using VS = vector<string>; using LL = long long; using VI = vector<int>; using VVI = vector<VI>; using PII = pair<int, int>; using PLL = pair<LL, LL>; using VL = vector<LL>; using VVL = vector<VL>; #define ALL(a) begin((a)), end((a)) #define RALL(a) (a).rbegin(), (a).rend() #define SZ(a) int((a).size()) #define SORT(c) sort(ALL((c))) #define RSORT(c) sort(RALL((c))) #define UNIQ(c) (c).erase(unique(ALL((c))), end((c))) #define FOR(i, s, e) for (int(i) = (s); (i) < (e); (i)++) #define FORR(i, s, e) for (int(i) = (s); (i) > (e); (i)--) // #pragma GCC optimize ("-O3") #ifdef YANG33 #include "mydebug.hpp" #else #define DD(x) #endif const int INF = 1e9; const LL LINF = 1e16; const LL MOD = 1000000007; const double PI = acos(-1.0); /* ----- 2019/07/20 Problem: ABC 134 F / Link: * http://abc134.contest.atcoder.jp/tasks/abc134_f ----- */ int test(int n, int k) { vector<int> p(n); iota(p.begin(), p.end(), 1); int ans = 0; do { int sum = 0; FOR(i, 0, n) { sum += abs((i + 1) - p[i]); } ans += sum == k; } while (next_permutation(p.begin(), p.end())); return ans; } void maintest() { int n; while (cin >> n, n) { FOR(k, 0, n * n + 1) { cout << test(n, k) << ", "; } cout << endl; cout << "---" << endl; } } LL str_mod(const string &s, LL mod) { LL res = 0; for (auto c : s) { res *= 10; res += (c - '0'); res %= mod; } return res; } void cap() { string i, n; vector<vector<LL>> x(51); int id = -1; while (cin >> i >> n) { if (n == "1") { id++; } if (id <= 50) x[id].push_back(str_mod(n, LL(1e9 + 7))); } cout << "map<PII,int>m={"; FOR(y, 1, 8) { int cnt = 0; for (auto it : x[y]) { cout << "{{" << y << "," << cnt * 2 << "},"; cout << "" << it << "},"; cnt++; } } cout << "};"; } // map<PII, int>m = { // {{1,0},1},{{2,0},1},{{2,2},1},{{3,0},1},{{3,2},2},{{3,4},3},{{4,0},1},{{4,2},3},{{4,4},7},{{4,6},9},{{4,8},4},{{5,0},1},{{5,2},4},{{5,4},12},{{5,6},24},{{5,8},35},{{5,10},24},{{5,12},20},{{6,0},1},{{6,2},5},{{6,4},18},{{6,6},46},{{6,8},93},{{6,10},137},{{6,12},148},{{6,14},136},{{6,16},100},{{6,18},36},{{7,0},1},{{7,2},6},{{7,4},25},{{7,6},76},{{7,8},187},{{7,10},366},{{7,12},591},{{7,14},744},{{7,16},884},{{7,18},832},{{7,20},716},{{7,22},360},{{7,24},252},{{8,0},1},{{8,2},7},{{8,4},33},{{8,6},115},{{8,8},327},{{8,10},765},{{8,12},1523},{{8,14},2553},{{8,16},3696},{{8,18},4852},{{8,20},5708},{{8,22},5892},{{8,24},5452},{{8,26},4212},{{8,28},2844},{{8,30},1764},{{8,32},576},{{9,0},1},{{9,2},8},{{9,4},42},{{9,6},164},{{9,8},524},{{9,10},1400},{{9,12},3226},{{9,14},6436},{{9,16},11323},{{9,18},17640},{{9,20},25472},{{9,22},33280},{{9,24},40520},{{9,26},44240},{{9,28},45512},{{9,30},40608},{{9,32},35496},{{9,34},25632},{{9,36},18108},{{9,38},8064},{{9,40},5184},{{10,0},1},{{10,2},9},{{10,4},52},{{10,6},224},{{10,8},790},{{10,10},2350},{{10,12},6072},{{10,14},13768},{{10,16},27821},{{10,18},50461},{{10,20},83420},{{10,22},127840},{{10,24},182256},{{10,26},242272},{{10,28},301648},{{10,30},350864},{{10,32},382576},{{10,34},389232},{{10,36},373536},{{10,38},332640},{{10,40},273060},{{10,42},208548},{{10,44},136512},{{10,46},81792},{{10,48},46656},{{10,50},14400},{{11,0},1},{{11,2},10},{{11,4},63},{{11,6},296},{{11,8},1138},{{11,10},3708},{{11,12},10538},{{11,14},26480},{{11,16},59673},{{11,18},121626},{{11,20},226787},{{11,22},390144},{{11,24},628744},{{11,26},949472},{{11,28},1355952},{{11,30},1826464},{{11,32},2341600},{{11,34},2833632},{{11,36},3282464},{{11,38},3584160},{{11,40},3765600},{{11,42},3719664},{{11,44},3531924},{{11,46},3093336},{{11,48},2642364},{{11,50},2010240},{{11,52},1508544},{{11,54},963072},{{11,56},621504},{{11,58},259200},{{11,60},158400},{{12,0},1},{{12,2},11},{{12,4},75},{{12,6},381},{{12,8},1582},{{12,10},5582},{{12,12},17222},{{12,14},47194},{{12,16},116457},{{12,18},261163},{{12,20},537459},{{12,22},1022981},{{12,24},1817652},{{12,26},3040352},{{12,28},4810720},{{12,30},7230928},{{12,32},10360160},{{12,34},14178912},{{12,36},18577792},{{12,38},23327872},{{12,40},28132048},{{12,42},32571504},{{12,44},36310464},{{12,46},38903904},{{12,48},40028724},{{12,50},39552156},{{12,52},37457388},{{12,54},33941412},{{12,56},29314944},{{12,58},24179904},{{12,60},18835776},{{12,62},13777344},{{12,64},9452736},{{12,66},5716800},{{12,68},3211200},{{12,70},1742400},{{12,72},518400},{{13,0},1},{{13,2},12},{{13,4},88},{{13,6},480},{{13,8},2137},{{13,10},8096},{{13,12},26860},{{13,14},79376},{{13,16},211811},{{13,18},515308},{{13,20},1153268},{{13,22},2391936},{{13,24},4633331},{{13,26},8438664},{{13,28},14557048},{{13,30},23874176},{{13,32},37407760},{{13,34},56117824},{{13,36},80906752},{{13,38},112162240},{{13,40},150052400},{{13,42},193572736},{{13,44},241706624},{{13,46},291576384},{{13,48},341323776},{{13,50},386160048},{{13,52},424359540},{{13,54},450394992},{{13,56},464545584},{{13,58},461528208},{{13,60},446428476},{{13,62},413557632},{{13,64},373573440},{{13,66},321120000},{{13,68},268449408},{{13,70},210332160},{{13,72},162330624},{{13,74},112550400},{{13,76},77788800},{{13,78},46540800},{{13,80},28497600},{{13,82},11404800},{{13,84},6739200},{{14,0},1},{{14,2},13},{{14,4},102},{{14,6},594},{{14,8},2819},{{14,10},11391},{{14,12},40344},{{14,14},127508},{{14,16},364587},{{14,18},952559},{{14,20},2293742},{{14,22},5126898},{{14,24},10710633},{{14,26},21042989},{{14,28},39117852},{{14,30},69175664},{{14,32},116857024},{{14,34},189256368},{{14,36},294745440},{{14,38},442503456},{{14,40},641759376},{{14,42},900689616},{{14,44},225195321},{{14,46},617201401},{{14,48},74227554},{{14,50},586823330},{{14,52},140227131},{{14,54},711888699},{{14,56},274217080},{{14,58},795069832},{{14,60},242715461},{{14,62},585116357},{{14,64},796764497},{{14,66},861974465},{{14,68},769155485},{{14,70},525176285},{{14,72},146566301},{{14,74},650715556},{{14,76},73773796},{{14,78},455145195},{{14,80},828946802},{{14,82},226153586},{{14,84},685663993},{{14,86},216281593},{{14,88},828705600},{{14,90},536385600},{{14,92},309484800},{{14,94},166924800},{{14,96},87609600},{{14,98},25401600},{{15,0},1},{{15,2},14},{{15,4},117},{{15,6},724},{{15,8},3645},{{15,10},15626},{{15,12},58741},{{15,14},197280},{{15,16},600215},{{15,18},1671266},{{15,20},4295107},{{15,22},10259436},{{15,24},22922995},{{15,26},48184950},{{15,28},95816051},{{15,30},181136304},{{15,32},327071752},{{15,34},566117888},{{15,36},942525072},{{15,38},513281017},{{15,40},349163810},{{15,42},532145419},{{15,44},154557773},{{15,46},309226767},{{15,48},88509354},{{15,50},563257605},{{15,52},789064441},{{15,54},766807654},{{15,56},474675580},{{15,58},795689314},{{15,60},599134613},{{15,62},627066840},{{15,64},658988947},{{15,66},307608398},{{15,68},337632800},{{15,70},295701193},{{15,72},44870369},{{15,74},150212311},{{15,76},705302359},{{15,78},336038622},{{15,80},452522163},{{15,82},797367958},{{15,84},62674553},{{15,86},57993322},{{15,88},777736994},{{15,90},845298906},{{15,92},452367755},{{15,94},90655804},{{15,96},810196653},{{15,98},976943895},{{15,100},564798323},{{15,102},582118351},{{15,104},994783972},{{15,106},869862386},{{15,108},697759993},{{15,110},660441600},{{15,112},381024000},{{16,0},1},{{16,2},15},{{16,4},133},{{16,6},871},{{16,8},4633},{{16,10},20979},{{16,12},83313},{{16,14},295803},{{16,16},952299},{{16,18},2809009},{{16,20},7656027},{{16,22},19414457},{{16,24},46086247},{{16,26},102967901},{{16,28},217634463},{{16,30},437195525},{{16,32},838372452},{{16,34},540635289},{{16,36},722168530},{{16,38},638311860},{{16,40},640827391},{{16,42},196046908},{{16,44},898688562},{{16,46},478199884},{{16,48},793020369},{{16,50},808862771},{{16,52},562236075},{{16,54},94791602},{{16,56},385333320},{{16,58},237794527},{{16,60},197694759},{{16,62},398043392},{{16,64},504456766},{{16,66},579736664},{{16,68},78137089},{{16,70},793367253},{{16,72},961295251},{{16,74},280517488},{{16,76},179779783},{{16,78},947563092},{{16,80},901772777},{{16,82},859566930},{{16,84},199212409},{{16,86},920781370},{{16,88},362900807},{{16,90},735004334},{{16,92},297264154},{{16,94},482748036},{{16,96},653703312},{{16,98},140400674},{{16,100},623159781},{{16,102},320434095},{{16,104},373194802},{{16,106},13313867},{{16,108},205909676},{{16,110},360223815},{{16,112},570584277},{{16,114},68075848},{{16,116},372652149},{{16,118},961247580},{{16,120},23084534},{{16,122},261139053},{{16,124},151302323},{{16,126},715359965},{{16,128},625702393},{{17,0},1},{{17,2},16},{{17,4},150},{{17,6},1036},{{17,8},5802},{{17,10},27648},{{17,12},115538},{{17,14},431844},{{17,16},1464468},{{17,18},4554040},{{17,20},13096378},{{17,22},35069940},{{17,24},87969166},{{17,26},207781760},{{17,28},464351910},{{17,30},986188668},{{17,32},998611836},{{17,34},879505923},{{17,36},237509223},{{17,38},15110629},{{17,40},621334822},{{17,42},88677622},{{17,44},257578542},{{17,46},963016850},{{17,48},235638961},{{17,50},442107823},{{17,52},429101453},{{17,54},483004748},{{17,56},329733855},{{17,58},718448185},{{17,60},266304376},{{17,62},413950543},{{17,64},256286771},{{17,66},626720357},{{17,68},318467482},{{17,70},59069608},{{17,72},81901162},{{17,74},352730851},{{17,76},104241055},{{17,78},503595237},{{17,80},956355036},{{17,82},534522134},{{17,84},457799859},{{17,86},108929893},{{17,88},887297322},{{17,90},424614770},{{17,92},265024591},{{17,94},876853471},{{17,96},515703045},{{17,98},692038809},{{17,100},210906163},{{17,102},20070317},{{17,104},468291405},{{17,106},145357835},{{17,108},797577421},{{17,110},232358134},{{17,112},747771239},{{17,114},343859985},{{17,116},833879609},{{17,118},78548665},{{17,120},289896769},{{17,122},449285934},{{17,124},313197004},{{17,126},379603290},{{17,128},397630660},{{17,130},609910102},{{17,132},442642726},{{17,134},627950853},{{17,136},722186028},{{17,138},705163253},{{17,140},998661511},{{17,142},771071664},{{17,144},636940611},{{18,0},1},{{18,2},17},{{18,4},168},{{18,6},1220},{{18,8},7172},{{18,10},35852},{{18,12},157132},{{18,14},616084},{{18,16},2192506},{{18,18},7159090},{{18,20},21631676},{{18,22},60902460},{{18,24},160707468},{{18,26},399489140},{{18,28},939796228},{{18,30},101060910},{{18,32},481320121},{{18,34},151453550},{{18,36},952463061},{{18,38},931694473},{{18,40},957528293},{{18,42},554162053},{{18,44},990142499},{{18,46},644946993},{{18,48},651797781},{{18,50},791594351},{{18,52},556120466},{{18,54},271969917},{{18,56},107619398},{{18,58},710253075},{{18,60},280526462},{{18,62},615698879},{{18,64},99748930},{{18,66},775178221},{{18,68},257586036},{{18,70},645364809},{{18,72},806795120},{{18,74},340635512},{{18,76},801741075},{{18,78},790520661},{{18,80},68328385},{{18,82},331513794},{{18,84},351728404},{{18,86},931812262},{{18,88},91105169},{{18,90},176869824},{{18,92},445724501},{{18,94},370449983},{{18,96},359815736},{{18,98},918724628},{{18,100},869062973},{{18,102},659791249},{{18,104},657727222},{{18,106},395793733},{{18,108},32692523},{{18,110},78858425},{{18,112},151369211},{{18,114},628504487},{{18,116},842750087},{{18,118},152091477},{{18,120},889718876},{{18,122},908002421},{{18,124},944598446},{{18,126},656459208},{{18,128},712920845},{{18,130},47550280},{{18,132},92244967},{{18,134},110652620},{{18,136},951703750},{{18,138},217822851},{{18,140},901098263},{{18,142},655149074},{{18,144},861896271},{{18,146},859184013},{{18,148},992613245},{{18,150},768042116},{{18,152},807916959},{{18,154},335381553},{{18,156},909568095},{{18,158},153171069},{{18,160},827990317},{{18,162},681893483},{{19,0},1},{{19,2},18},{{19,4},187},{{19,6},1424},{{19,8},8764},{{19,10},45832},{{19,12},210072},{{19,14},861400},{{19,16},3206786},{{19,18},10957868},{{19,20},34666130},{{19,22},102239488},{{19,24},282743580},{{19,26},736889224},{{19,28},817936097},{{19,30},262532028},{{19,32},534038590},{{19,34},412279142},{{19,36},965109380},{{19,38},86702267},{{19,40},846482566},{{19,42},945052509},{{19,44},644517943},{{19,46},548776024},{{19,48},679330947},{{19,50},152291502},{{19,52},882910517},{{19,54},188127435},{{19,56},636778925},{{19,58},902059202},{{19,60},132531208},{{19,62},193904122},{{19,64},893705022},{{19,66},246193070},{{19,68},652079051},{{19,70},958060250},{{19,72},148697872},{{19,74},504141990},{{19,76},371410212},{{19,78},807466717},{{19,80},514477363},{{19,82},565424570},{{19,84},560794838},{{19,86},11419155},{{19,88},215137208},{{19,90},665710713},{{19,92},791504234},{{19,94},359367396},{{19,96},224050172},{{19,98},509091270},{{19,100},125989128},{{19,102},782600310},{{19,104},957126038},{{19,106},667219607},{{19,108},386301613},{{19,110},605448653},{{19,112},296557741},{{19,114},618019404},{{19,116},194294675},{{19,118},222923480},{{19,120},765962783},{{19,122},743934970},{{19,124},24324611},{{19,126},512643153},{{19,128},214242880},{{19,130},286900578},{{19,132},228877964},{{19,134},91240846},{{19,136},430467141},{{19,138},533029377},{{19,140},904804693},{{19,142},373207899},{{19,144},916503101},{{19,146},83598539},{{19,148},560288494},{{19,150},363356684},{{19,152},68282446},{{19,154},152683809},{{19,156},284461190},{{19,158},124425011},{{19,160},167972327},{{19,162},428909487},{{19,164},373215034},{{19,166},420008537},{{19,168},513304383},{{19,170},874743039},{{19,172},487193257},{{19,174},97337408},{{19,176},532639641},{{19,178},184378261},{{19,180},955976093},{{20,0},1},{{20,2},19},{{20,4},207},{{20,6},1649},{{20,8},10600},{{20,10},57852},{{20,12},276620},{{20,14},1183172},{{20,16},4595034},{{20,18},16384606},{{20,20},54107670},{{20,22},166643130},{{20,24},481442164},{{20,26},311240781},{{20,28},381378831},{{20,30},288429444},{{20,32},380463632},{{20,34},370477330},{{20,36},171662912},{{20,38},688513797},{{20,40},626045604},{{20,42},789881798},{{20,44},844990830},{{20,46},70546834},{{20,48},230422087},{{20,50},267733218},{{20,52},970080423},{{20,54},75064762},{{20,56},104073936},{{20,58},888990608},{{20,60},393490487},{{20,62},819401315},{{20,64},362017415},{{20,66},197941501},{{20,68},97730360},{{20,70},491049732},{{20,72},790022455},{{20,74},142301163},{{20,76},381999002},{{20,78},81566974},{{20,80},255547256},{{20,82},500580164},{{20,84},503785886},{{20,86},874661360},{{20,88},953064009},{{20,90},357278689},{{20,92},416715628},{{20,94},656421867},{{20,96},311332859},{{20,98},849655408},{{20,100},575613107},{{20,102},850236831},{{20,104},533549113},{{20,106},255339339},{{20,108},611845477},{{20,110},501164398},{{20,112},135987981},{{20,114},672393680},{{20,116},678611757},{{20,118},552403430},{{20,120},470027818},{{20,122},333312311},{{20,124},203812034},{{20,126},929380798},{{20,128},133842121},{{20,130},497262544},{{20,132},839881753},{{20,134},29703780},{{20,136},133717366},{{20,138},249364505},{{20,140},959337844},{{20,142},632980495},{{20,144},72879056},{{20,146},356819838},{{20,148},662140760},{{20,150},182352973},{{20,152},260787823},{{20,154},329159184},{{20,156},423643610},{{20,158},488600943},{{20,160},164109163},{{20,162},8143787},{{20,164},184454683},{{20,166},684285006},{{20,168},693158498},{{20,170},382122550},{{20,172},488552031},{{20,174},777204359},{{20,176},564238497},{{20,178},598675373},{{20,180},603916585},{{20,182},720234840},{{20,184},93182262},{{20,186},238936257},{{20,188},486420235},{{20,190},352604922},{{20,192},958291193},{{20,194},880928218},{{20,196},736558676},{{20,198},163545641},{{20,200},189347824},{{21,0},1},{{21,2},20},{{21,4},228},{{21,6},1896},{{21,8},12703},{{21,10},72200},{{21,12},359348},{{21,14},1599616},{{21,16},6465450},{{21,18},23997032},{{21,20},82508708},{{21,22},264654080},{{21,24},796563486},{{21,26},260832418},{{21,28},76986106},{{21,30},528774007},{{21,32},854313906},{{21,34},307546108},{{21,36},722735109},{{21,38},61004626},{{21,40},805619536},{{21,42},18191861},{{21,44},511411798},{{21,46},993782454},{{21,48},401030744},{{21,50},633897378},{{21,52},70862649},{{21,54},96855526},{{21,56},314416445},{{21,58},92910833},{{21,60},135520920},{{21,62},492052755},{{21,64},24334887},{{21,66},643976444},{{21,68},574388511},{{21,70},317610455},{{21,72},122930943},{{21,74},637889505},{{21,76},255461238},{{21,78},950861369},{{21,80},48876234},{{21,82},149504663},{{21,84},198682481},{{21,86},942670278},{{21,88},866921314},{{21,90},563621302},{{21,92},960474580},{{21,94},980132644},{{21,96},624295523},{{21,98},399490883},{{21,100},351714973},{{21,102},945626033},{{21,104},827908349},{{21,106},157456205},{{21,108},481861323},{{21,110},472454109},{{21,112},343580291},{{21,114},683697065},{{21,116},95059407},{{21,118},841332348},{{21,120},464714941},{{21,122},596887160},{{21,124},38681949},{{21,126},757883329},{{21,128},590303711},{{21,130},64921694},{{21,132},730086270},{{21,134},15240461},{{21,136},714742087},{{21,138},32874447},{{21,140},175996750},{{21,142},277466516},{{21,144},788882909},{{21,146},11880203},{{21,148},95097385},{{21,150},778398376},{{21,152},531252352},{{21,154},479554466},{{21,156},557013590},{{21,158},609738833},{{21,160},798714176},{{21,162},859324339},{{21,164},721484640},{{21,166},268442938},{{21,168},861267595},{{21,170},806087188},{{21,172},31691029},{{21,174},950412807},{{21,176},580575404},{{21,178},849451646},{{21,180},691790951},{{21,182},264837637},{{21,184},967322620},{{21,186},365040170},{{21,188},622467624},{{21,190},456436788},{{21,192},658680316},{{21,194},60575186},{{21,196},387550026},{{21,198},215002020},{{21,200},31349904},{{21,202},449373833},{{21,204},559514745},{{21,206},640364153},{{21,208},807042078},{{21,210},450172023},{{21,212},562637973},{{21,214},109112418},{{21,216},545193132},{{21,218},195217263},{{21,220},976304283},{{22,0},1},{{22,2},21},{{22,4},250},{{22,6},2166},{{22,8},15097},{{22,10},89189},{{22,12},461164},{{22,14},2132144},{{22,16},8950214},{{22,18},34503182},{{22,20},123236828},{{22,22},410729140},{{22,24},284813823},{{22,26},790835929},{{22,28},594736274},{{22,30},153822108},{{22,32},374418504},{{22,34},157537842},{{22,36},147846917},{{22,38},133568389},{{22,40},483576696},{{22,42},508616649},{{22,44},656867821},{{22,46},84463125},{{22,48},640047601},{{22,50},955370715},{{22,52},182167616},{{22,54},49108700},{{22,56},229345632},{{22,58},795610484},{{22,60},502493987},{{22,62},857101031},{{22,64},142485158},{{22,66},996679960},{{22,68},742503997},{{22,70},723858587},{{22,72},317526153},{{22,74},365342533},{{22,76},250775491},{{22,78},442738912},{{22,80},408346120},{{22,82},881242865},{{22,84},135363327},{{22,86},231979623},{{22,88},347291745},{{22,90},824934645},{{22,92},995772018},{{22,94},164592917},{{22,96},354883487},{{22,98},450805745},{{22,100},963969802},{{22,102},171006181},{{22,104},92161176},{{22,106},169883419},{{22,108},961669090},{{22,110},26844445},{{22,112},393784092},{{22,114},571606470},{{22,116},464707158},{{22,118},34144520},{{22,120},652396373},{{22,122},745405475},{{22,124},202923498},{{22,126},135935314},{{22,128},703695236},{{22,130},776259115},{{22,132},48310283},{{22,134},874186699},{{22,136},219390686},{{22,138},510394758},{{22,140},751965065},{{22,142},418424556},{{22,144},8781061},{{22,146},736058807},{{22,148},674014147},{{22,150},674780706},{{22,152},590530540},{{22,154},4352977},{{22,156},803825827},{{22,158},167292329},{{22,160},541083402},{{22,162},260679638},{{22,164},665083995},{{22,166},939990721},{{22,168},816665296},{{22,170},886017767},{{22,172},669822229},{{22,174},694816125},{{22,176},643235536},{{22,178},937314556},{{22,180},115942268},{{22,182},261159535},{{22,184},687177905},{{22,186},12245758},{{22,188},694615643},{{22,190},977706180},{{22,192},217949106},{{22,194},118952653},{{22,196},898868241},{{22,198},856650616},{{22,200},42954342},{{22,202},330321980},{{22,204},535121720},{{22,206},982503521},{{22,208},719423135},{{22,210},714354007},{{22,212},18745970},{{22,214},333448882},{{22,216},302037622},{{22,218},935654015},{{22,220},778423936},{{22,222},317991952},{{22,224},284756555},{{22,226},504736970},{{22,228},155871365},{{22,230},118263505},{{22,232},797065125},{{22,234},640838446},{{22,236},258037348},{{22,238},34344762},{{22,240},502389803},{{22,242},911086550},{{23,0},1},{{23,2},22},{{23,4},273},{{23,6},2460},{{23,8},17807},{{23,10},109158},{{23,12},585339},{{23,14},2805752},{{23,16},12209406},{{23,18},48792492},{{23,20},180680070},{{23,22},624410736},{{23,24},25734764},{{23,26},199973794},{{23,28},977710523},{{23,30},571365953},{{23,32},412869707},{{23,34},328237414},{{23,36},214863466},{{23,38},633048751},{{23,40},257394955},{{23,42},317735309},{{23,44},673309005},{{23,46},193600985},{{23,48},704135816},{{23,50},514918834},{{23,52},650479735},{{23,54},33606857},{{23,56},490034801},{{23,58},698396427},{{23,60},67986999},{{23,62},220797055},{{23,64},218864611},{{23,66},931163713},{{23,68},940790978},{{23,70},675674698},{{23,72},85542051},{{23,74},543018292},{{23,76},61247584},{{23,78},910803604},{{23,80},831296179},{{23,82},923943160},{{23,84},89478028},{{23,86},104500393},{{23,88},161998091},{{23,90},254912705},{{23,92},539249258},{{23,94},547749719},{{23,96},357852173},{{23,98},690014841},{{23,100},206926249},{{23,102},893887199},{{23,104},747112232},{{23,106},382059625},{{23,108},148865046},{{23,110},301618706},{{23,112},260333115},{{23,114},442306036},{{23,116},247371284},{{23,118},782005651},{{23,120},233300621},{{23,122},920894203},{{23,124},317455792},{{23,126},678639547},{{23,128},427050277},{{23,130},482884001},{{23,132},854060466},{{23,134},980543322},{{23,136},860769666},{{23,138},701293636},{{23,140},771136168},{{23,142},670745480},{{23,144},486701027},{{23,146},168461356},{{23,148},848787800},{{23,150},289825171},{{23,152},498776317},{{23,154},33320170},{{23,156},430165721},{{23,158},821516580},{{23,160},115533370},{{23,162},398776967},{{23,164},333310602},{{23,166},563097053},{{23,168},553134182},{{23,170},219816464},{{23,172},216637272},{{23,174},206027601},{{23,176},933677337},{{23,178},925510467},{{23,180},267639197},{{23,182},43693887},{{23,184},486722546},{{23,186},270929495},{{23,188},877730912},{{23,190},261947307},{{23,192},375318068},{{23,194},692508932},{{23,196},989184491},{{23,198},226696206},{{23,200},288508969},{{23,202},739837562},{{23,204},849035543},{{23,206},782296408},{{23,208},273955665},{{23,210},801085382},{{23,212},431898190},{{23,214},935043965},{{23,216},202752072},{{23,218},867866169},{{23,220},151133676},{{23,222},67940990},{{23,224},78118516},{{23,226},742654574},{{23,228},165553271},{{23,230},254022475},{{23,232},668960857},{{23,234},929973305},{{23,236},656759571},{{23,238},877339826},{{23,240},925206924},{{23,242},133648890},{{23,244},623964326},{{23,246},796176354},{{23,248},256442424},{{23,250},844384225},{{23,252},955053908},{{23,254},35821657},{{23,256},33969824},{{23,258},328610099},{{23,260},171474448},{{23,262},265634834},{{23,264},954990510},{{24,0},1},{{24,2},23},{{24,4},297},{{24,6},2779},{{24,8},20859},{{24,10},132473},{{24,12},735535},{{24,14},3649437},{{24,16},16435370},{{24,18},67971642},{{24,20},260491974},{{24,22},931772466},{{24,24},129241853},{{24,26},915880695},{{24,28},773220207},{{24,30},21124907},{{24,32},663657824},{{24,34},89235883},{{24,36},562087424},{{24,38},395633225},{{24,40},79602143},{{24,42},818737728},{{24,44},503346111},{{24,46},923762587},{{24,48},810187543},{{24,50},71950684},{{24,52},872552891},{{24,54},722894374},{{24,56},788701216},{{24,58},792043650},{{24,60},839896539},{{24,62},577542972},{{24,64},345484502},{{24,66},350106805},{{24,68},159630680},{{24,70},594479078},{{24,72},806985602},{{24,74},451202244},{{24,76},562057157},{{24,78},345406448},{{24,80},404888318},{{24,82},371479292},{{24,84},122121086},{{24,86},196184273},{{24,88},855722413},{{24,90},625056343},{{24,92},209132008},{{24,94},580725504},{{24,96},234791519},{{24,98},683270249},{{24,100},879431955},{{24,102},820639155},{{24,104},890517789},{{24,106},877206124},{{24,108},780147370},{{24,110},943542736},{{24,112},532169988},{{24,114},134361777},{{24,116},389279830},{{24,118},486085405},{{24,120},212150153},{{24,122},60309713},{{24,124},36144061},{{24,126},220641769},{{24,128},167907687},{{24,130},433032241},{{24,132},672669299},{{24,134},4840381},{{24,136},543970499},{{24,138},860603358},{{24,140},920463673},{{24,142},899153827},{{24,144},269139419},{{24,146},99866794},{{24,148},833550296},{{24,150},732963165},{{24,152},649634036},{{24,154},220976898},{{24,156},948879986},{{24,158},81746947},{{24,160},249278044},{{24,162},943429751},{{24,164},227240067},{{24,166},617290217},{{24,168},857759442},{{24,170},317672542},{{24,172},702411387},{{24,174},392102340},{{24,176},598392406},{{24,178},771484657},{{24,180},20769431},{{24,182},772211314},{{24,184},777981688},{{24,186},103043307},{{24,188},336611982},{{24,190},922346108},{{24,192},46010568},{{24,194},620920750},{{24,196},740298345},{{24,198},143296430},{{24,200},127113300},{{24,202},229361025},{{24,204},452883985},{{24,206},298773134},{{24,208},583669967},{{24,210},430943791},{{24,212},878469881},{{24,214},498554889},{{24,216},377075156},{{24,218},399618101},{{24,220},518539100},{{24,222},610655946},{{24,224},762624102},{{24,226},339746521},{{24,228},193491143},{{24,230},582788075},{{24,232},58498274},{{24,234},139175929},{{24,236},439487543},{{24,238},659039143},{{24,240},969039085},{{24,242},205473123},{{24,244},149794944},{{24,246},735361805},{{24,248},144310487},{{24,250},952281582},{{24,252},885994682},{{24,254},290034640},{{24,256},449859219},{{24,258},870975475},{{24,260},717604104},{{24,262},930837761},{{24,264},466542500},{{24,266},510501275},{{24,268},368063612},{{24,270},61813298},{{24,272},959329905},{{24,274},938922014},{{24,276},660077190},{{24,278},12025968},{{24,280},335011033},{{24,282},657136343},{{24,284},351072920},{{24,286},964781583},{{24,288},196462283},{{25,0},1},{{25,2},24},{{25,4},322},{{25,6},3124},{{25,8},24280},{{25,10},159528},{{25,12},915834},{{25,14},4696644},{{25,16},21857553},{{25,18},93405656},{{25,20},369882084},{{25,22},367190881},{{25,24},745178532},{{25,26},541448535},{{25,28},237690972},{{25,30},408537702},{{25,32},191376116},{{25,34},678513161},{{25,36},493570976},{{25,38},397907192},{{25,40},9101765},{{25,42},658714208},{{25,44},122356973},{{25,46},514532531},{{25,48},911169029},{{25,50},6916896},{{25,52},782796},{{25,54},910119724},{{25,56},942560918},{{25,58},62371227},{{25,60},773940129},{{25,62},523667340},{{25,64},669757203},{{25,66},42568262},{{25,68},891666384},{{25,70},467022993},{{25,72},486796667},{{25,74},727294526},{{25,76},413613585},{{25,78},787453753},{{25,80},599953158},{{25,82},417187968},{{25,84},359849625},{{25,86},117069116},{{25,88},879478181},{{25,90},12380000},{{25,92},910899870},{{25,94},838986319},{{25,96},102687453},{{25,98},103327364},{{25,100},376800830},{{25,102},429223538},{{25,104},780159138},{{25,106},706916356},{{25,108},587575355},{{25,110},971169352},{{25,112},36010810},{{25,114},483798044},{{25,116},344462034},{{25,118},787276711},{{25,120},359714668},{{25,122},737585540},{{25,124},514856433},{{25,126},506547585},{{25,128},7966248},{{25,130},935961},{{25,132},931790046},{{25,134},725219981},{{25,136},437246235},{{25,138},737823353},{{25,140},539625329},{{25,142},101294921},{{25,144},998345360},{{25,146},158678756},{{25,148},14552916},{{25,150},434899855},{{25,152},58679632},{{25,154},771567929},{{25,156},908041362},{{25,158},370603042},{{25,160},958461645},{{25,162},473954165},{{25,164},329932246},{{25,166},645017860},{{25,168},950250115},{{25,170},632956030},{{25,172},39737256},{{25,174},308287817},{{25,176},593859369},{{25,178},848980890},{{25,180},73354610},{{25,182},67983312},{{25,184},794665532},{{25,186},744501399},{{25,188},571146358},{{25,190},79777328},{{25,192},768540650},{{25,194},301591668},{{25,196},87146707},{{25,198},749547055},{{25,200},542914952},{{25,202},113807115},{{25,204},981646049},{{25,206},443442346},{{25,208},689844336},{{25,210},226785366},{{25,212},664441023},{{25,214},644644459},{{25,216},65534356},{{25,218},186334852},{{25,220},433121661},{{25,222},818953887},{{25,224},687026114},{{25,226},344822747},{{25,228},464015963},{{25,230},110899493},{{25,232},294091084},{{25,234},65199948},{{25,236},37449794},{{25,238},719226153},{{25,240},501099656},{{25,242},413337315},{{25,244},725255533},{{25,246},799293560},{{25,248},259962068},{{25,250},954615054},{{25,252},373654234},{{25,254},764439094},{{25,256},914044890},{{25,258},22085466},{{25,260},539035590},{{25,262},698634111},{{25,264},313016212},{{25,266},98993468},{{25,268},941478268},{{25,270},955683335},{{25,272},902077766},{{25,274},420565422},{{25,276},767959775},{{25,278},128648986},{{25,280},355285226},{{25,282},534029655},{{25,284},104714136},{{25,286},932643222},{{25,288},778200211},{{25,290},56428536},{{25,292},225880543},{{25,294},792355687},{{25,296},449940761},{{25,298},181471652},{{25,300},529937629},{{25,302},325235521},{{25,304},6575392},{{25,306},94094707},{{25,308},441392085},{{25,310},37264955},{{25,312},911557047},{{26,0},1},{{26,2},25},{{26,4},348},{{26,6},3496},{{26,8},28098},{{26,10},190746},{{26,12},1130768},{{26,14},5985744},{{26,16},28747851},{{26,18},126764795},{{26,20},517958180},{{26,22},975500521},{{26,24},75313899},{{26,26},914923483},{{26,28},611051644},{{26,30},458281681},{{26,32},932346365},{{26,34},712529240},{{26,36},185024083},{{26,38},463834094},{{26,40},950836649},{{26,42},286357381},{{26,44},871292163},{{26,46},434939852},{{26,48},58330077},{{26,50},629835295},{{26,52},27932676},{{26,54},66354549},{{26,56},10923173},{{26,58},590226200},{{26,60},526183672},{{26,62},176005584},{{26,64},809584977},{{26,66},222348292},{{26,68},260397896},{{26,70},396327746},{{26,72},178971085},{{26,74},774808076},{{26,76},78650222},{{26,78},507195902},{{26,80},144802453},{{26,82},299847298},{{26,84},581537053},{{26,86},724817078},{{26,88},350425193},{{26,90},503589319},{{26,92},654904119},{{26,94},595937600},{{26,96},992781673},{{26,98},82554146},{{26,100},868891604},{{26,102},769490422},{{26,104},119334199},{{26,106},287573489},{{26,108},85347169},{{26,110},118147346},{{26,112},949694675},{{26,114},540939467},{{26,116},927324362},{{26,118},545027201},{{26,120},610310429},{{26,122},769058023},{{26,124},21423},{{26,126},262519735},{{26,128},786795808},{{26,130},240407039},{{26,132},428554518},{{26,134},447092428},{{26,136},788617633},{{26,138},367724192},{{26,140},374279457},{{26,142},343082569},{{26,144},856162651},{{26,146},150954733},{{26,148},962857235},{{26,150},700751807},{{26,152},895999415},{{26,154},533537747},{{26,156},537990547},{{26,158},268357366},{{26,160},869434038},{{26,162},633081543},{{26,164},603452058},{{26,166},947934680},{{26,168},987367826},{{26,170},743179254},{{26,172},710352935},{{26,174},835787228},{{26,176},706586787},{{26,178},845202323},{{26,180},238777269},{{26,182},405136472},{{26,184},480736674},{{26,186},155194042},{{26,188},871452828},{{26,190},677921910},{{26,192},616952227},{{26,194},984554304},{{26,196},602482844},{{26,198},894952109},{{26,200},161534829},{{26,202},782737895},{{26,204},850072208},{{26,206},670793244},{{26,208},828100052},{{26,210},222399146},{{26,212},284700626},{{26,214},231919567},{{26,216},306545173},{{26,218},673216888},{{26,220},772842480},{{26,222},314744315},{{26,224},347738200},{{26,226},25002680},{{26,228},730048408},{{26,230},649455506},{{26,232},745857274},{{26,234},196252843},{{26,236},529935260},{{26,238},419302767},{{26,240},276709210},{{26,242},732855171},{{26,244},343508231},{{26,246},624945362},{{26,248},861002432},{{26,250},484757974},{{26,252},367927715},{{26,254},209929226},{{26,256},661865936},{{26,258},531107025},{{26,260},413469524},{{26,262},479519565},{{26,264},741904536},{{26,266},610072165},{{26,268},606639245},{{26,270},934344602},{{26,272},716197790},{{26,274},587584177},{{26,276},185414563},{{26,278},306822687},{{26,280},841034662},{{26,282},971868532},{{26,284},919896238},{{26,286},158358640},{{26,288},773475266},{{26,290},936203252},{{26,292},665923149},{{26,294},911486615},{{26,296},197651366},{{26,298},774528535},{{26,300},82937079},{{26,302},883806524},{{26,304},130206852},{{26,306},774201811},{{26,308},995994000},{{26,310},245370199},{{26,312},842572718},{{26,314},793423605},{{26,316},740588350},{{26,318},687616120},{{26,320},657690139},{{26,322},857790226},{{26,324},37323118},{{26,326},88399209},{{26,328},523321086},{{26,330},117621631},{{26,332},71036645},{{26,334},222192424},{{26,336},788926021},{{26,338},202125596},{{27,0},1},{{27,2},26},{{27,4},375},{{27,6},3896},{{27,8},32342},{{27,10},226580},{{27,12},1385350},{{27,14},7560544},{{27,16},37426495},{{27,18},170077814},{{27,20},716127109},{{27,22},814596482},{{27,24},388283574},{{27,26},187079164},{{27,28},480126707},{{27,30},290089727},{{27,32},38629756},{{27,34},54115650},{{27,36},64891257},{{27,38},901599546},{{27,40},718222041},{{27,42},911275669},{{27,44},323565019},{{27,46},817912019},{{27,48},805459451},{{27,50},803612364},{{27,52},201797073},{{27,54},732830955},{{27,56},80380678},{{27,58},23464457},{{27,60},701195891},{{27,62},272214917},{{27,64},913862649},{{27,66},132026200},{{27,68},669751010},{{27,70},759341231},{{27,72},973676755},{{27,74},794065196},{{27,76},967438659},{{27,78},308299894},{{27,80},10712690},{{27,82},949669597},{{27,84},781686555},{{27,86},88559004},{{27,88},727530543},{{27,90},318751597},{{27,92},278470531},{{27,94},434911202},{{27,96},804701133},{{27,98},324324750},{{27,100},981099143},{{27,102},232682614},{{27,104},987104568},{{27,106},776649739},{{27,108},786487389},{{27,110},442468777},{{27,112},569068005},{{27,114},663709268},{{27,116},881510700},{{27,118},203686642},{{27,120},57967683},{{27,122},568729400},{{27,124},236001193},{{27,126},623959074},{{27,128},703861418},{{27,130},908672716},{{27,132},70204475},{{27,134},867825588},{{27,136},827103298},{{27,138},241630317},{{27,140},362696969},{{27,142},415618616},{{27,144},805038660},{{27,146},598704556},{{27,148},10082872},{{27,150},643477587},{{27,152},415164213},{{27,154},703084166},{{27,156},477367476},{{27,158},20036406},{{27,160},629980785},{{27,162},802614294},{{27,164},952521645},{{27,166},17601466},{{27,168},311433959},{{27,170},830294700},{{27,172},548394039},{{27,174},535645146},{{27,176},521413012},{{27,178},929141249},{{27,180},283365227},{{27,182},727229980},{{27,184},443388093},{{27,186},410708269},{{27,188},286618040},{{27,190},319768543},{{27,192},938841603},{{27,194},93475597},{{27,196},394693465},{{27,198},931196821},{{27,200},495806189},{{27,202},902879580},{{27,204},707905623},{{27,206},303901454},{{27,208},576396872},{{27,210},484544924},{{27,212},486011674},{{27,214},564305854},{{27,216},311518869},{{27,218},856442237},{{27,220},372745088},{{27,222},366968335},{{27,224},813470622},{{27,226},720542245},{{27,228},551543931},{{27,230},596748971},{{27,232},778551123},{{27,234},354920979},{{27,236},984250497},{{27,238},691689872},{{27,240},327423759},{{27,242},52302396},{{27,244},920309409},{{27,246},457393341},{{27,248},162758194},{{27,250},401889329},{{27,252},760192486},{{27,254},361045291},{{27,256},58998809},{{27,258},845800809},{{27,260},8575285},{{27,262},649668894},{{27,264},501939170},{{27,266},542308042},{{27,268},574502757},{{27,270},192463535},{{27,272},690505425},{{27,274},204738512},{{27,276},689813836},{{27,278},483570629},{{27,280},525148782},{{27,282},216925832},{{27,284},952334594},{{27,286},68584858},{{27,288},946061868},{{27,290},229986068},{{27,292},113082103},{{27,294},705545851},{{27,296},563504064},{{27,298},430610853},{{27,300},209937938},{{27,302},608555345},{{27,304},578039088},{{27,306},750439353},{{27,308},944169681},{{27,310},417934823},{{27,312},74422181},{{27,314},960090808},{{27,316},568355902},{{27,318},435674968},{{27,320},894299009},{{27,322},15861008},{{27,324},618713868},{{27,326},509911155},{{27,328},168869978},{{27,330},339481775},{{27,332},369451744},{{27,334},600513141},{{27,336},71634326},{{27,338},781507214},{{27,340},857107917},{{27,342},106564183},{{27,344},736233715},{{27,346},362800524},{{27,348},615467708},{{27,350},519437498},{{27,352},342065337},{{27,354},206666492},{{27,356},505918934},{{27,358},308299385},{{27,360},20927738},{{27,362},106279730},{{27,364},457391057},{{28,0},1},{{28,2},27},{{28,4},403},{{28,6},4325},{{28,8},37042},{{28,10},267514},{{28,12},1685106},{{28,14},9470830},{{28,16},48268511},{{28,18},225792189},{{28,20},978561725},{{28,22},958557158},{{28,24},38052071},{{28,26},919433401},{{28,28},254995547},{{28,30},546697380},{{28,32},704487939},{{28,34},32839999},{{28,36},508901654},{{28,38},551556389},{{28,40},663564198},{{28,42},695178769},{{28,44},814009554},{{28,46},547143595},{{28,48},371559020},{{28,50},945387943},{{28,52},670094820},{{28,54},616330760},{{28,56},976064124},{{28,58},607380120},{{28,60},8699769},{{28,62},998280938},{{28,64},580008436},{{28,66},958036252},{{28,68},912203574},{{28,70},544195790},{{28,72},396609897},{{28,74},954428754},{{28,76},708902921},{{28,78},801338681},{{28,80},431017191},{{28,82},381717232},{{28,84},344144422},{{28,86},131861617},{{28,88},874277396},{{28,90},830300192},{{28,92},596462835},{{28,94},318671397},{{28,96},244894238},{{28,98},904557382},{{28,100},834593756},{{28,102},283869037},{{28,104},697514761},{{28,106},969250693},{{28,108},509524190},{{28,110},913260759},{{28,112},384371901},{{28,114},692021356},{{28,116},509945770},{{28,118},32685910},{{28,120},505430483},{{28,122},907189201},{{28,124},193340383},{{28,126},693205397},{{28,128},603006308},{{28,130},305262013},{{28,132},925218957},{{28,134},968092842},{{28,136},27052064},{{28,138},47727228},{{28,140},477199307},{{28,142},293774777},{{28,144},98292616},{{28,146},663047137},{{28,148},995897620},{{28,150},288543890},{{28,152},998081856},{{28,154},524487172},{{28,156},892499155},{{28,158},556044593},{{28,160},972323813},{{28,162},578208602},{{28,164},933674462},{{28,166},509188659},{{28,168},985492681},{{28,170},986901126},{{28,172},628028841},{{28,174},519717277},{{28,176},311965185},{{28,178},897395442},{{28,180},829761538},{{28,182},9680527},{{28,184},161715155},{{28,186},343759581},{{28,188},402616197},{{28,190},861303980},{{28,192},911400557},{{28,194},358697993},{{28,196},515548395},{{28,198},553147014},{{28,200},892738525},{{28,202},205604013},{{28,204},762111690},{{28,206},442223169},{{28,208},7841804},{{28,210},517369986},{{28,212},84729818},{{28,214},152655938},{{28,216},700957258},{{28,218},898706126},{{28,220},75157861},{{28,222},271201265},{{28,224},543855670},{{28,226},440588279},{{28,228},204308612},{{28,230},236683234},{{28,232},208667572},{{28,234},404506592},{{28,236},809547310},{{28,238},853106482},{{28,240},518815458},{{28,242},16491026},{{28,244},491832633},{{28,246},360120645},{{28,248},923872102},{{28,250},602086347},{{28,252},641452842},{{28,254},18221609},{{28,256},229080666},{{28,258},428455406},{{28,260},569262655},{{28,262},856993308},{{28,264},230900297},{{28,266},490066099},{{28,268},367669571},{{28,270},96292417},{{28,272},52365382},{{28,274},469261002},{{28,276},374633464},{{28,278},900617667},{{28,280},182287939},{{28,282},49700390},{{28,284},796588976},{{28,286},949085023},{{28,288},222503562},{{28,290},658471212},{{28,292},94278399},{{28,294},66098044},{{28,296},72459139},{{28,298},603916441},{{28,300},257635815},{{28,302},234793049},{{28,304},951525459},{{28,306},549173423},{{28,308},938321308},{{28,310},13662267},{{28,312},288258509},{{28,314},65326301},{{28,316},11071916},{{28,318},364716823},{{28,320},929353581},{{28,322},839483911},{{28,324},199241395},{{28,326},29486252},{{28,328},482468148},{{28,330},829994735},{{28,332},370892643},{{28,334},687560607},{{28,336},531658704},{{28,338},568187724},{{28,340},486108828},{{28,342},475403750},{{28,344},227529481},{{28,346},124500798},{{28,348},228110006},{{28,350},56292488},{{28,352},958873404},{{28,354},963718586},{{28,356},481659835},{{28,358},183136868},{{28,360},593123751},{{28,362},622015148},{{28,364},469053734},{{28,366},211587807},{{28,368},928091671},{{28,370},481375722},{{28,372},612130911},{{28,374},134707706},{{28,376},334981252},{{28,378},784422204},{{28,380},712253942},{{28,382},698883770},{{28,384},390222722},{{28,386},25478322},{{28,388},28778175},{{28,390},349558455},{{28,392},616616543},{{29,0},1},{{29,2},28},{{29,4},432},{{29,6},4784},{{29,8},42229},{{29,10},314064},{{29,12},2036108},{{29,14},11772944},{{29,16},61710789},{{29,18},296841956},{{29,20},322742117},{{29,22},501368237},{{29,24},486564198},{{29,26},208215103},{{29,28},787564548},{{29,30},236938424},{{29,32},301578523},{{29,34},866593178},{{29,36},461034739},{{29,38},153403692},{{29,40},741061604},{{29,42},268366308},{{29,44},41671958},{{29,46},999969805},{{29,48},820629183},{{29,50},540097933},{{29,52},348143198},{{29,54},290585123},{{29,56},709901036},{{29,58},830657214},{{29,60},397773343},{{29,62},205345230},{{29,64},80836479},{{29,66},744283025},{{29,68},767371096},{{29,70},13280133},{{29,72},166091858},{{29,74},688213267},{{29,76},405245759},{{29,78},999129285},{{29,80},957885801},{{29,82},125598090},{{29,84},229197648},{{29,86},232621259},{{29,88},771781842},{{29,90},15692966},{{29,92},623498734},{{29,94},209019752},{{29,96},451480479},{{29,98},405116698},{{29,100},905232949},{{29,102},522429827},{{29,104},160392239},{{29,106},911337480},{{29,108},463779522},{{29,110},870625842},{{29,112},997849245},{{29,114},364479050},{{29,116},834828},{{29,118},300785526},{{29,120},10186705},{{29,122},265101999},{{29,124},566806573},{{29,126},614983712},{{29,128},685595755},{{29,130},48653250},{{29,132},344390997},{{29,134},673637797},{{29,136},896886255},{{29,138},108856368},{{29,140},31386606},{{29,142},486989879},{{29,144},489263782},{{29,146},517653845},{{29,148},976993581},{{29,150},117774221},{{29,152},829510874},{{29,154},294191687},{{29,156},233225993},{{29,158},831800739},{{29,160},448583977},{{29,162},657291524},{{29,164},649603801},{{29,166},456575978},{{29,168},536862581},{{29,170},855051723},{{29,172},994222346},{{29,174},302476269},{{29,176},502749737},{{29,178},322446053},{{29,180},790323255},{{29,182},357338908},{{29,184},887312147},{{29,186},181428924},{{29,188},536100952},{{29,190},55330164},{{29,192},160205355},{{29,194},190454705},{{29,196},365581727},{{29,198},201998030},{{29,200},826748536},{{29,202},400273437},{{29,204},624522779},{{29,206},849319472},{{29,208},800147953},{{29,210},80982274},{{29,212},447705256},{{29,214},168185200},{{29,216},97822479},{{29,218},309878269},{{29,220},678607548},{{29,222},912097410},{{29,224},927785144},{{29,226},334246635},{{29,228},662138658},{{29,230},715198385},{{29,232},260363473},{{29,234},461374975},{{29,236},89468114},{{29,238},651175074},{{29,240},575096135},{{29,242},130470890},{{29,244},71518840},{{29,246},879845193},{{29,248},486812125},{{29,250},128678982},{{29,252},647847215},{{29,254},49005945},{{29,256},59417027},{{29,258},550597313},{{29,260},85275582},{{29,262},589669875},{{29,264},488581288},{{29,266},579391253},{{29,268},238935007},{{29,270},307933774},{{29,272},801626662},{{29,274},991248834},{{29,276},831660242},{{29,278},2289249},{{29,280},939337934},{{29,282},170802252},{{29,284},112167473},{{29,286},712496239},{{29,288},45742853},{{29,290},482400666},{{29,292},341362938},{{29,294},957391891},{{29,296},147812751},{{29,298},376451585},{{29,300},832724562},{{29,302},418101830},{{29,304},38563919},{{29,306},274362964},{{29,308},819817184},{{29,310},400041713},{{29,312},313141267},{{29,314},806456583},{{29,316},999307614},{{29,318},670677205},{{29,320},585839782},{{29,322},845991536},{{29,324},831623045},{{29,326},109161241},{{29,328},554327240},{{29,330},822718306},{{29,332},173814042},{{29,334},363700239},{{29,336},22366070},{{29,338},479904205},{{29,340},190929878},{{29,342},554951008},{{29,344},774006606},{{29,346},279182950},{{29,348},109357938},{{29,350},401823952},{{29,352},575672540},{{29,354},860574847},{{29,356},593910748},{{29,358},547825741},{{29,360},217594637},{{29,362},989467389},{{29,364},184852185},{{29,366},331539318},{{29,368},325720467},{{29,370},383229710},{{29,372},654245987},{{29,374},146654996},{{29,376},209385163},{{29,378},560462909},{{29,380},965812836},{{29,382},65583448},{{29,384},508391947},{{29,386},709539829},{{29,388},955465325},{{29,390},214525022},{{29,392},394005813},{{29,394},531700924},{{29,396},773028650},{{29,398},417539579},{{29,400},326670161},{{29,402},406612199},{{29,404},165245},{{29,406},699092510},{{29,408},550837077},{{29,410},14964582},{{29,412},527720684},{{29,414},440459594},{{29,416},268905155},{{29,418},297293091},{{29,420},881879628},{{30,0},1},{{30,2},29},{{30,4},462},{{30,6},5274},{{30,8},47935},{{30,10},366779},{{30,12},2445008},{{30,14},14530396},{{30,16},78259797},{{30,18},386723841},{{30,20},770080067},{{30,22},561338901},{{30,24},331351593},{{30,26},839635833},{{30,28},167817400},{{30,30},497149119},{{30,32},881282118},{{30,34},352201610},{{30,36},471630724},{{30,38},181160121},{{30,40},88806794},{{30,42},987377178},{{30,44},289689361},{{30,46},946592969},{{30,48},656979867},{{30,50},594487341},{{30,52},196240769},{{30,54},948508749},{{30,56},810784209},{{30,58},709855728},{{30,60},576276359},{{30,62},518417791},{{30,64},87667236},{{30,66},667014934},{{30,68},181628700},{{30,70},79050911},{{30,72},337053925},{{30,74},373883684},{{30,76},560120551},{{30,78},458872893},{{30,80},815731972},{{30,82},827954345},{{30,84},771964062},{{30,86},380463298},{{30,88},190074568},{{30,90},335845313},{{30,92},308369049},{{30,94},297128477},{{30,96},730684746},{{30,98},742600059},{{30,100},263592454},{{30,102},96421517},{{30,104},206168581},{{30,106},306386280},{{30,108},238588046},{{30,110},136275025},{{30,112},509837233},{{30,114},285349782},{{30,116},467079296},{{30,118},44733505},{{30,120},132275281},{{30,122},829959933},{{30,124},391862643},{{30,126},62600608},{{30,128},253168338},{{30,130},426879146},{{30,132},365435454},{{30,134},91732486},{{30,136},471304236},{{30,138},543190875},{{30,140},798110387},{{30,142},894371900},{{30,144},696428631},{{30,146},750022470},{{30,148},726550236},{{30,150},936549828},{{30,152},542410178},{{30,154},939184541},{{30,156},791578453},{{30,158},983635297},{{30,160},823881369},{{30,162},150676558},{{30,164},585328209},{{30,166},653882077},{{30,168},963087655},{{30,170},950795211},{{30,172},936066317},{{30,174},71868369},{{30,176},440124326},{{30,178},965151462},{{30,180},175368387},{{30,182},40663323},{{30,184},699428294},{{30,186},108367130},{{30,188},332044307},{{30,190},970432796},{{30,192},572024201},{{30,194},885659377},{{30,196},539317691},{{30,198},132218646},{{30,200},139253073},{{30,202},467726930},{{30,204},45351751},{{30,206},297376822},{{30,208},508633325},{{30,210},703469419},{{30,212},746467332},{{30,214},503668629},{{30,216},112630766},{{30,218},930570931},{{30,220},962347630},{{30,222},576196343},{{30,224},698904389},{{30,226},167199167},{{30,228},333129737},{{30,230},608922442},{{30,232},222067115},{{30,234},688206452},{{30,236},802821275},{{30,238},954540394},{{30,240},911151138},{{30,242},906746447},{{30,244},902608727},{{30,246},890863920},{{30,248},307268385},{{30,250},54404696},{{30,252},104370759},{{30,254},495676754},{{30,256},441341576},{{30,258},829087999},{{30,260},88911607},{{30,262},975336543},{{30,264},381836343},{{30,266},298727399},{{30,268},758323163},{{30,270},709721214},{{30,272},146811076},{{30,274},322114121},{{30,276},909574264},{{30,278},955852236},{{30,280},803216000},{{30,282},511491931},{{30,284},157225317},{{30,286},671670053},{{30,288},367885171},{{30,290},612666342},{{30,292},842261160},{{30,294},508147005},{{30,296},345029386},{{30,298},809990068},{{30,300},981225972},{{30,302},241279545},{{30,304},458275632},{{30,306},172983843},{{30,308},48836190},{{30,310},961296645},{{30,312},538132589},{{30,314},271432367},{{30,316},877708377},{{30,318},386417805},{{30,320},815731556},{{30,322},463571419},{{30,324},404450924},{{30,326},113136747},{{30,328},549319603},{{30,330},219464194},{{30,332},220054123},{{30,334},907114544},{{30,336},328856175},{{30,338},265047793},{{30,340},589592614},{{30,342},328159953},{{30,344},809008569},{{30,346},510434161},{{30,348},420313068},{{30,350},107873733},{{30,352},868895119},{{30,354},895337042},{{30,356},156863206},{{30,358},48004547},{{30,360},666506430},{{30,362},727609186},{{30,364},85858741},{{30,366},59205240},{{30,368},78940637},{{30,370},545962715},{{30,372},139572749},{{30,374},421355881},{{30,376},858507471},{{30,378},952603331},{{30,380},401020118},{{30,382},942925111},{{30,384},296295597},{{30,386},997986384},{{30,388},115737481},{{30,390},677010850},{{30,392},282276283},{{30,394},274892540},{{30,396},163700485},{{30,398},118592549},{{30,400},846472792},{{30,402},136765224},{{30,404},236032397},{{30,406},179431589},{{30,408},539549211},{{30,410},214067143},{{30,412},923131121},{{30,414},999465547},{{30,416},232088789},{{30,418},610013691},{{30,420},896204760},{{30,422},478686995},{{30,424},218989077},{{30,426},91096939},{{30,428},221616643},{{30,430},243944261},{{30,432},454787573},{{30,434},542927414},{{30,436},355318220},{{30,438},147354818},{{30,440},482630},{{30,442},675619041},{{30,444},634351197},{{30,446},478341164},{{30,448},574509037},{{30,450},738721209},{{31,0},1},{{31,2},30},{{31,4},493},{{31,6},5796},{{31,8},54193},{{31,10},426242},{{31,12},2919073},{{31,14},17814512},{{31,16},98499977},{{31,18},499582398},{{31,20},346636279},{{31,22},286311246},{{31,24},338970899},{{31,26},482987014},{{31,28},740494022},{{31,30},522312682},{{31,32},389124982},{{31,34},438269373},{{31,36},295660905},{{31,38},384589942},{{31,40},269003911},{{31,42},190728878},{{31,44},21841107},{{31,46},394443500},{{31,48},159301748},{{31,50},885681179},{{31,52},869073529},{{31,54},396029106},{{31,56},969827087},{{31,58},16747334},{{31,60},474716791},{{31,62},259235367},{{31,64},753984455},{{31,66},365768194},{{31,68},423375006},{{31,70},957390875},{{31,72},407261764},{{31,74},592999097},{{31,76},928039310},{{31,78},529328158},{{31,80},133251022},{{31,82},533719572},{{31,84},434981329},{{31,86},779487889},{{31,88},212784950},{{31,90},467080112},{{31,92},287628298},{{31,94},91658981},{{31,96},576061624},{{31,98},322787361},{{31,100},682746649},{{31,102},234833733},{{31,104},676878118},{{31,106},220869554},{{31,108},982232103},{{31,110},879428014},{{31,112},742840902},{{31,114},65876039},{{31,116},230084790},{{31,118},68776407},{{31,120},988541480},{{31,122},113769367},{{31,124},288661011},{{31,126},898604342},{{31,128},790158821},{{31,130},811679832},{{31,132},416532461},{{31,134},643426286},{{31,136},357304561},{{31,138},904850873},{{31,140},143689492},{{31,142},643378934},{{31,144},217587561},{{31,146},816799579},{{31,148},741653213},{{31,150},950522177},{{31,152},519192837},{{31,154},195766899},{{31,156},875531753},{{31,158},913462122},{{31,160},931740864},{{31,162},147485151},{{31,164},73473743},{{31,166},881407231},{{31,168},943949423},{{31,170},19375017},{{31,172},95185407},{{31,174},658198820},{{31,176},654223830},{{31,178},78841384},{{31,180},487272636},{{31,182},810454297},{{31,184},156111172},{{31,186},108214345},{{31,188},594083015},{{31,190},721613382},{{31,192},413639222},{{31,194},199581479},{{31,196},219296986},{{31,198},983776208},{{31,200},50034813},{{31,202},434669652},{{31,204},336761553},{{31,206},553659069},{{31,208},443256837},{{31,210},867959007},{{31,212},649693919},{{31,214},829394710},{{31,216},511124003},{{31,218},801382432},{{31,220},809258820},{{31,222},440312724},{{31,224},549557631},{{31,226},57091967},{{31,228},619973166},{{31,230},38255131},{{31,232},989252595},{{31,234},296849831},{{31,236},126449228},{{31,238},992478958},{{31,240},948085171},{{31,242},398912012},{{31,244},308493194},{{31,246},585304989},{{31,248},581850817},{{31,250},704472537},{{31,252},457658359},{{31,254},706849064},{{31,256},974235300},{{31,258},322942033},{{31,260},801441410},{{31,262},806760539},{{31,264},930211369},{{31,266},674605925},{{31,268},140615032},{{31,270},804334982},{{31,272},654022727},{{31,274},747554604},{{31,276},304695097},{{31,278},670935186},{{31,280},973200118},{{31,282},899755340},{{31,284},43016718},{{31,286},33443894},{{31,288},486649937},{{31,290},183173093},{{31,292},28680647},{{31,294},612676891},{{31,296},17478829},{{31,298},208078434},{{31,300},467131016},{{31,302},651933212},{{31,304},464433186},{{31,306},3993644},{{31,308},959280435},{{31,310},310671435},{{31,312},524438940},{{31,314},540166082},{{31,316},143663989},{{31,318},984026973},{{31,320},596317769},{{31,322},299039541},{{31,324},925611762},{{31,326},115137245},{{31,328},238184581},{{31,330},798462400},{{31,332},902062936},{{31,334},499673997},{{31,336},696053154},{{31,338},121959061},{{31,340},376644235},{{31,342},378356623},{{31,344},996412950},{{31,346},115590297},{{31,348},517087995},{{31,350},817795384},{{31,352},731733847},{{31,354},61225249},{{31,356},930096903},{{31,358},292653780},{{31,360},149516053},{{31,362},503527083},{{31,364},233497811},{{31,366},781589564},{{31,368},87992011},{{31,370},514696635},{{31,372},495015483},{{31,374},151617728},{{31,376},478098704},{{31,378},773499685},{{31,380},621536652},{{31,382},787266199},{{31,384},440325002},{{31,386},249898342},{{31,388},747360642},{{31,390},671517137},{{31,392},216648293},{{31,394},686506084},{{31,396},544204132},{{31,398},949750238},{{31,400},249236969},{{31,402},319054830},{{31,404},756596931},{{31,406},233403453},{{31,408},594672369},{{31,410},158463779},{{31,412},809106181},{{31,414},249481644},{{31,416},610711719},{{31,418},262167344},{{31,420},179138909},{{31,422},270160113},{{31,424},278492510},{{31,426},490828032},{{31,428},946977816},{{31,430},803242084},{{31,432},541036271},{{31,434},624688984},{{31,436},204404014},{{31,438},881539240},{{31,440},779609382},{{31,442},561095932},{{31,444},524976628},{{31,446},888316278},{{31,448},139701497},{{31,450},712146362},{{31,452},413036824},{{31,454},810411985},{{31,456},241441787},{{31,458},247390036},{{31,460},695355554},{{31,462},122993697},{{31,464},227371919},{{31,466},399947791},{{31,468},833892197},{{31,470},899399938},{{31,472},781528108},{{31,474},656359733},{{31,476},551706967},{{31,478},845829828},{{31,480},900357325},{{32,0},1},{{32,2},31},{{32,4},525},{{32,6},6351},{{32,8},61037},{{32,10},493071},{{32,12},3466221},{{32,14},21705119},{{32,16},123102861},{{32,18},640304911},{{32,20},83941000},{{32,22},859775332},{{32,24},485271727},{{32,26},929183599},{{32,28},393442380},{{32,30},976105677},{{32,32},287805815},{{32,34},238271867},{{32,36},74391877},{{32,38},765979021},{{32,40},335546599},{{32,42},709265303},{{32,44},808915958},{{32,46},907593582},{{32,48},463983041},{{32,50},147572225},{{32,52},888153362},{{32,54},391439968},{{32,56},221443415},{{32,58},801779213},{{32,60},245226914},{{32,62},866175931},{{32,64},810047153},{{32,66},267980729},{{32,68},805674759},{{32,70},955321032},{{32,72},906824500},{{32,74},367243333},{{32,76},486256638},{{32,78},145115859},{{32,80},530769671},{{32,82},290945081},{{32,84},932311137},{{32,86},51068986},{{32,88},807551107},{{32,90},185085629},{{32,92},261181005},{{32,94},959829857},{{32,96},118218336},{{32,98},295880881},{{32,100},506261294},{{32,102},848742193},{{32,104},936582961},{{32,106},153400705},{{32,108},578662225},{{32,110},341741810},{{32,112},161659811},{{32,114},816049772},{{32,116},839223846},{{32,118},559301757},{{32,120},400427189},{{32,122},216771109},{{32,124},207016492},{{32,126},505237766},{{32,128},795055758},{{32,130},945605740},{{32,132},555992642},{{32,134},907845643},{{32,136},982951177},{{32,138},401043526},{{32,140},597396374},{{32,142},84431994},{{32,144},362552441},{{32,146},746539639},{{32,148},303946121},{{32,150},357484364},{{32,152},893505269},{{32,154},526515449},{{32,156},560103044},{{32,158},121894895},{{32,160},445706213},{{32,162},592793631},{{32,164},713670463},{{32,166},810676671},{{32,168},143889731},{{32,170},392244416},{{32,172},73126772},{{32,174},488568958},{{32,176},542583029},{{32,178},752584772},{{32,180},7383345},{{32,182},155007498},{{32,184},994039957},{{32,186},804821801},{{32,188},379264833},{{32,190},525210782},{{32,192},239847467},{{32,194},126254398},{{32,196},219331239},{{32,198},753237922},{{32,200},434345445},{{32,202},635807399},{{32,204},872366121},{{32,206},133933893},{{32,208},590603804},{{32,210},32230684},{{32,212},70841222},{{32,214},840236255},{{32,216},909722819},{{32,218},689521789},{{32,220},529248821},{{32,222},178846494},{{32,224},980363222},{{32,226},548654005},{{32,228},434479841},{{32,230},697553680},{{32,232},35011089},{{32,234},544881135},{{32,236},260563063},{{32,238},695816358},{{32,240},44173506},{{32,242},726085055},{{32,244},671716390},{{32,246},781464159},{{32,248},450226987},{{32,250},146813053},{{32,252},877951734},{{32,254},991641337},{{32,256},221699230},{{32,258},419417817},{{32,260},794832550},{{32,262},810418558},{{32,264},969705412},{{32,266},219055178},{{32,268},274301546},{{32,270},503413612},{{32,272},695160244},{{32,274},74090275},{{32,276},26176299},{{32,278},695070748},{{32,280},341801549},{{32,282},897892431},{{32,284},470380437},{{32,286},3467372},{{32,288},448525308},{{32,290},439337134},{{32,292},724845391},{{32,294},9187155},{{32,296},585558376},{{32,298},372261444},{{32,300},277930003},{{32,302},34819054},{{32,304},431482585},{{32,306},279947765},{{32,308},492267585},{{32,310},818516372},{{32,312},484582901},{{32,314},390623889},{{32,316},856573701},{{32,318},179325546},{{32,320},611189228},{{32,322},688765384},{{32,324},847931848},{{32,326},534263758},{{32,328},557397045},{{32,330},116495491},{{32,332},85868985},{{32,334},610969731},{{32,336},478650084},{{32,338},585159686},{{32,340},14772190},{{32,342},776211983},{{32,344},474268574},{{32,346},460744792},{{32,348},134988124},{{32,350},912707317},{{32,352},105964987},{{32,354},809266690},{{32,356},785401545},{{32,358},161419686},{{32,360},653370610},{{32,362},499797235},{{32,364},534961655},{{32,366},323936668},{{32,368},802659551},{{32,370},370287438},{{32,372},326963010},{{32,374},342959476},{{32,376},313044094},{{32,378},148582386},{{32,380},976795271},{{32,382},120954501},{{32,384},724957759},{{32,386},860215558},{{32,388},270001726},{{32,390},640931921},{{32,392},833230238},{{32,394},701256342},{{32,396},242231076},{{32,398},286286219},{{32,400},13632467},{{32,402},253663042},{{32,404},129411109},{{32,406},603714672},{{32,408},564008356},{{32,410},523901279},{{32,412},216864213},{{32,414},524434304},{{32,416},182659511},{{32,418},983267072},{{32,420},644616701},{{32,422},707181007},{{32,424},618980658},{{32,426},405751838},{{32,428},571460922},{{32,430},136629759},{{32,432},744395053},{{32,434},539608518},{{32,436},963053644},{{32,438},97893406},{{32,440},866038338},{{32,442},265757870},{{32,444},944699732},{{32,446},964525924},{{32,448},892464175},{{32,450},168006507},{{32,452},562926324},{{32,454},742708490},{{32,456},132927348},{{32,458},526909479},{{32,460},79557205},{{32,462},129052432},{{32,464},157042523},{{32,466},659309142},{{32,468},834183171},{{32,470},802572815},{{32,472},517259737},{{32,474},256356803},{{32,476},353227137},{{32,478},87135975},{{32,480},224995979},{{32,482},596580540},{{32,484},402931204},{{32,486},515099940},{{32,488},793833445},{{32,490},691900231},{{32,492},589149123},{{32,494},114327507},{{32,496},887760880},{{32,498},389703467},{{32,500},830251700},{{32,502},783657579},{{32,504},433484966},{{32,506},412892473},{{32,508},432995349},{{32,510},911076886},{{32,512},112628181},{{33,0},1},{{33,2},32},{{33,4},558},{{33,6},6940},{{33,8},68502},{{33,10},567920},{{33,12},4095058},{{33,14},26291268},{{33,16},152836946},{{33,18},814626856},{{33,20},19929138},{{33,22},508014078},{{33,24},3627542},{{33,26},383619686},{{33,28},178749032},{{33,30},257695016},{{33,32},714018516},{{33,34},472708243},{{33,36},782289684},{{33,38},785010736},{{33,40},673452130},{{33,42},967313791},{{33,44},416615851},{{33,46},594708501},{{33,48},823838568},{{33,50},374885539},{{33,52},520875465},{{33,54},462873691},{{33,56},866641568},{{33,58},110422771},{{33,60},371334024},{{33,62},597629306},{{33,64},954905318},{{33,66},192386746},{{33,68},711820060},{{33,70},202869372},{{33,72},886359460},{{33,74},670157944},{{33,76},884126969},{{33,78},502946720},{{33,80},582271977},{{33,82},402610790},{{33,84},343533084},{{33,86},511648372},{{33,88},517557636},{{33,90},170605372},{{33,92},597697292},{{33,94},829559995},{{33,96},983984749},{{33,98},601678152},{{33,100},265076525},{{33,102},200313780},{{33,104},586898347},{{33,106},936910249},{{33,108},473920775},{{33,110},97417050},{{33,112},844866738},{{33,114},973357211},{{33,116},106398807},{{33,118},531568235},{{33,120},220592830},{{33,122},72245680},{{33,124},709223174},{{33,126},966562898},{{33,128},364453034},{{33,130},204299565},{{33,132},516186616},{{33,134},388239153},{{33,136},70201813},{{33,138},72763421},{{33,140},794896998},{{33,142},14537122},{{33,144},759848271},{{33,146},370782607},{{33,148},723372604},{{33,150},610938893},{{33,152},161728308},{{33,154},212501210},{{33,156},376508968},{{33,158},271352258},{{33,160},323852567},{{33,162},552136716},{{33,164},801650724},{{33,166},615740271},{{33,168},208656790},{{33,170},224034222},{{33,172},747809272},{{33,174},617340476},{{33,176},153891047},{{33,178},285642015},{{33,180},901118362},{{33,182},123777425},{{33,184},16228193},{{33,186},623027527},{{33,188},937436377},{{33,190},60747289},{{33,192},714381298},{{33,194},882770713},{{33,196},15381170},{{33,198},999192137},{{33,200},197256049},{{33,202},480638655},{{33,204},953137460},{{33,206},883599778},{{33,208},148656904},{{33,210},722191509},{{33,212},39402136},{{33,214},582147050},{{33,216},757441169},{{33,218},260428827},{{33,220},253172482},{{33,222},508174417},{{33,224},834955862},{{33,226},157349819},{{33,228},261175551},{{33,230},247577251},{{33,232},264652493},{{33,234},595186522},{{33,236},812752039},{{33,238},875384578},{{33,240},747313263},{{33,242},224431706},{{33,244},462673707},{{33,246},39074204},{{33,248},237357876},{{33,250},896371707},{{33,252},361524710},{{33,254},10299862},{{33,256},761952483},{{33,258},924315000},{{33,260},304463541},{{33,262},831385606},{{33,264},228637562},{{33,266},845205390},{{33,268},599099308},{{33,270},177524018},{{33,272},209006125},{{33,274},256908838},{{33,276},355221513},{{33,278},792061054},{{33,280},713446694},{{33,282},397486564},{{33,284},756107839},{{33,286},527866716},{{33,288},337624854},{{33,290},575430320},{{33,292},456754471},{{33,294},959728018},{{33,296},921786900},{{33,298},102983773},{{33,300},936936381},{{33,302},473475121},{{33,304},131588049},{{33,306},189268154},{{33,308},863126769},{{33,310},700571091},{{33,312},871530822},{{33,314},832046604},{{33,316},609629520},{{33,318},45186676},{{33,320},853387560},{{33,322},464311797},{{33,324},368430192},{{33,326},151536782},{{33,328},691919878},{{33,330},176735598},{{33,332},972465597},{{33,334},804610607},{{33,336},50289062},{{33,338},722819065},{{33,340},20410813},{{33,342},11987321},{{33,344},648373171},{{33,346},889715409},{{33,348},778512390},{{33,350},280809979},{{33,352},767453391},{{33,354},155472064},{{33,356},275305459},{{33,358},296611231},{{33,360},377220752},{{33,362},229158487},{{33,364},259857310},{{33,366},987705391},{{33,368},873889855},{{33,370},448418244},{{33,372},657467052},{{33,374},301028637},{{33,376},400332864},{{33,378},304525446},{{33,380},853531448},{{33,382},201469133},{{33,384},757430782},{{33,386},288842043},{{33,388},292821474},{{33,390},389580374},{{33,392},148645279},{{33,394},450672899},{{33,396},404696472},{{33,398},399758661},{{33,400},549392647},{{33,402},972607841},{{33,404},459482261},{{33,406},344863732},{{33,408},405989209},{{33,410},14412475},{{33,412},913865943},{{33,414},988039851},{{33,416},302203080},{{33,418},293916756},{{33,420},28383491},{{33,422},502818531},{{33,424},791480646},{{33,426},619991127},{{33,428},151573496},{{33,430},311251301},{{33,432},362738947},{{33,434},457688580},{{33,436},884177111},{{33,438},390413172},{{33,440},889218635},{{33,442},530910268},{{33,444},818241216},{{33,446},542232757},{{33,448},765042883},{{33,450},885001834},{{33,452},10229128},{{33,454},574524301},{{33,456},836418812},{{33,458},984923781},{{33,460},235783687},{{33,462},868003012},{{33,464},379478756},{{33,466},832878398},{{33,468},751487743},{{33,470},496700139},{{33,472},587857943},{{33,474},624473538},{{33,476},510088706},{{33,478},778144708},{{33,480},214176553},{{33,482},953029206},{{33,484},646822434},{{33,486},252787767},{{33,488},281229254},{{33,490},401166205},{{33,492},434753895},{{33,494},343430684},{{33,496},941989547},{{33,498},465870277},{{33,500},861407908},{{33,502},387687010},{{33,504},216509894},{{33,506},375279811},{{33,508},453878600},{{33,510},982073623},{{33,512},677731113},{{33,514},95924240},{{33,516},198468867},{{33,518},861679672},{{33,520},204003039},{{33,522},472066136},{{33,524},228890861},{{33,526},880462406},{{33,528},133638984},{{33,530},924365283},{{33,532},274136081},{{33,534},742318625},{{33,536},898640542},{{33,538},85174164},{{33,540},775817726},{{33,542},982947180},{{33,544},716729952},{{34,0},1},{{34,2},33},{{34,4},592},{{34,6},7564},{{34,8},76624},{{34,10},651480},{{34,12},4814916},{{34,14},31671996},{{34,16},188578368},{{34,18},29248753},{{34,20},200002145},{{34,22},508415428},{{34,24},442411092},{{34,26},823607844},{{34,28},339155380},{{34,30},84465338},{{34,32},814093820},{{34,34},347929398},{{34,36},722645092},{{34,38},146033429},{{34,40},312847170},{{34,42},460125097},{{34,44},915837300},{{34,46},530134554},{{34,48},683613860},{{34,50},22911398},{{34,52},950166343},{{34,54},297700883},{{34,56},874171812},{{34,58},779302544},{{34,60},705201416},{{34,62},91735442},{{34,64},764568060},{{34,66},448540109},{{34,68},794383951},{{34,70},50664826},{{34,72},501387621},{{34,74},764478731},{{34,76},392332791},{{34,78},697065547},{{34,80},136584719},{{34,82},904822171},{{34,84},811342153},{{34,86},498086442},{{34,88},66346910},{{34,90},903864157},{{34,92},648069920},{{34,94},294527566},{{34,96},68277872},{{34,98},192952288},{{34,100},465503414},{{34,102},89641650},{{34,104},342876181},{{34,106},975687654},{{34,108},849073744},{{34,110},732768838},{{34,112},299144725},{{34,114},960087859},{{34,116},432060633},{{34,118},521050995},{{34,120},669642411},{{34,122},783220798},{{34,124},964761936},{{34,126},888496451},{{34,128},578822675},{{34,130},774117896},{{34,132},595815330},{{34,134},556187991},{{34,136},328078421},{{34,138},497539038},{{34,140},461150544},{{34,142},593197759},{{34,144},454579240},{{34,146},228665398},{{34,148},675695769},{{34,150},189021504},{{34,152},506127036},{{34,154},683711210},{{34,156},767254008},{{34,158},372876392},{{34,160},950363733},{{34,162},781425867},{{34,164},518441353},{{34,166},618578159},{{34,168},210702480},{{34,170},146366158},{{34,172},211092828},{{34,174},25645664},{{34,176},252569415},{{34,178},768287264},{{34,180},315751220},{{34,182},46304131},{{34,184},875313001},{{34,186},63062094},{{34,188},41563387},{{34,190},521548621},{{34,192},882111752},{{34,194},325592507},{{34,196},674715724},{{34,198},754661696},{{34,200},386558110},{{34,202},154963091},{{34,204},238088464},{{34,206},48050421},{{34,208},639662963},{{34,210},70331570},{{34,212},315682289},{{34,214},290604457},{{34,216},553625701},{{34,218},114470501},{{34,220},286499320},{{34,222},302628334},{{34,224},934963054},{{34,226},90280656},{{34,228},946037777},{{34,230},701374947},{{34,232},21339121},{{34,234},663053978},{{34,236},944685826},{{34,238},452543047},{{34,240},117230904},{{34,242},560747251},{{34,244},199227363},{{34,246},16627409},{{34,248},318622953},{{34,250},147892287},{{34,252},924956445},{{34,254},813803967},{{34,256},785002825},{{34,258},524657750},{{34,260},94619872},{{34,262},228326183},{{34,264},399365341},{{34,266},370689535},{{34,268},675442405},{{34,270},908504726},{{34,272},873312142},{{34,274},624281896},{{34,276},910865167},{{34,278},214431914},{{34,280},356568789},{{34,282},649815619},{{34,284},48684312},{{34,286},203060656},{{34,288},723151845},{{34,290},388405201},{{34,292},798060040},{{34,294},729614446},{{34,296},977682164},{{34,298},533436928},{{34,300},146813819},{{34,302},149571082},{{34,304},895803037},{{34,306},777214043},{{34,308},552248021},{{34,310},204656845},{{34,312},982800841},{{34,314},733286978},{{34,316},63964308},{{34,318},481147156},{{34,320},389291330},{{34,322},76639625},{{34,324},311176854},{{34,326},441157810},{{34,328},671041225},{{34,330},83215916},{{34,332},462900391},{{34,334},792922861},{{34,336},933493638},{{34,338},911064426},{{34,340},640299582},{{34,342},658369868},{{34,344},816565473},{{34,346},95242536},{{34,348},385493380},{{34,350},848295064},{{34,352},737403618},{{34,354},437312030},{{34,356},117969370},{{34,358},718173112},{{34,360},995019578},{{34,362},309321859},{{34,364},756181744},{{34,366},40101942},{{34,368},426476878},{{34,370},702396178},{{34,372},795715493},{{34,374},835764511},{{34,376},743326504},{{34,378},209546865},{{34,380},430615231},{{34,382},826070511},{{34,384},334341237},{{34,386},118979238},{{34,388},371120144},{{34,390},839568659},{{34,392},676120384},{{34,394},72519},{{34,396},845333099},{{34,398},357629799},{{34,400},910834209},{{34,402},593346831},{{34,404},104377605},{{34,406},380654497},{{34,408},634970517},{{34,410},115890735},{{34,412},793059350},{{34,414},887063630},{{34,416},651636452},{{34,418},507749972},{{34,420},783577804},{{34,422},143656503},{{34,424},242083869},{{34,426},911105370},{{34,428},970085702},{{34,430},524972130},{{34,432},465698950},{{34,434},325374351},{{34,436},536364599},{{34,438},196104291},{{34,440},139239152},{{34,442},633851401},{{34,444},256158579},{{34,446},919175466},{{34,448},894613648},{{34,450},315818683},{{34,452},5141779},{{34,454},876022828},{{34,456},934709255},{{34,458},681050535},{{34,460},191918360},{{34,462},662583345},{{34,464},207316521},{{34,466},848780031},{{34,468},272975543},{{34,470},702356884},{{34,472},769886013},{{34,474},961041057},{{34,476},6500208},{{34,478},70262300},{{34,480},494310602},{{34,482},739703998},{{34,484},384177576},{{34,486},343193798},{{34,488},693062586},{{34,490},969762392},{{34,492},66952659},{{34,494},685150241},{{34,496},630304511},{{34,498},413041585},{{34,500},515441116},{{34,502},191001103},{{34,504},912006289},{{34,506},473846745},{{34,508},605301455},{{34,510},795067847},{{34,512},856671001},{{34,514},508821454},{{34,516},735406667},{{34,518},258084054},{{34,520},117733205},{{34,522},780290039},{{34,524},23367661},{{34,526},593944851},{{34,528},692132515},{{34,530},4650353},{{34,532},187487602},{{34,534},151055135},{{34,536},898863554},{{34,538},673507355},{{34,540},215091232},{{34,542},603704193},{{34,544},594167428},{{34,546},682519378},{{34,548},496434131},{{34,550},965159536},{{34,552},430378180},{{34,554},248402836},{{34,556},470772870},{{34,558},307340881},{{34,560},347656961},{{34,562},749714755},{{34,564},122062081},{{34,566},558277910},{{34,568},169666679},{{34,570},941915597},{{34,572},277380477},{{34,574},270070849},{{34,576},652088255},{{34,578},549544085},{{35,0},1},{{35,2},34},{{35,4},627},{{35,6},8224},{{35,8},85440},{{35,10},744480},{{35,12},5635892},{{35,14},37957128},{{35,16},231322416},{{35,18},291965329},{{35,20},678229698},{{35,22},199102832},{{35,24},733159273},{{35,26},432255582},{{35,28},825398987},{{35,30},945721657},{{35,32},530531857},{{35,34},605903605},{{35,36},198451639},{{35,38},405128341},{{35,40},881104650},{{35,42},95712824},{{35,44},87475937},{{35,46},88052462},{{35,48},854657880},{{35,50},671362129},{{35,52},345256719},{{35,54},279913923},{{35,56},405600244},{{35,58},791623773},{{35,60},184158289},{{35,62},548244621},{{35,64},559931899},{{35,66},811302745},{{35,68},822463013},{{35,70},829884052},{{35,72},612803610},{{35,74},114370483},{{35,76},717655175},{{35,78},250670751},{{35,80},158660853},{{35,82},996989593},{{35,84},922821653},{{35,86},403693850},{{35,88},640224917},{{35,90},726696528},{{35,92},558324649},{{35,94},504260316},{{35,96},457498775},{{35,98},235424755},{{35,100},214797729},{{35,102},595578763},{{35,104},703649058},{{35,106},668639597},{{35,108},273743575},{{35,110},830864733},{{35,112},8621856},{{35,114},152359528},{{35,116},351252345},{{35,118},54682531},{{35,120},631863641},{{35,122},533130514},{{35,124},548187372},{{35,126},212107229},{{35,128},690348600},{{35,130},269650465},{{35,132},644636821},{{35,134},588449397},{{35,136},716956418},{{35,138},569059993},{{35,140},571818753},{{35,142},620732748},{{35,144},238441683},{{35,146},628780105},{{35,148},73251606},{{35,150},77232245},{{35,152},265685085},{{35,154},860541096},{{35,156},181038883},{{35,158},995121568},{{35,160},787161997},{{35,162},984175916},{{35,164},994855981},{{35,166},70309595},{{35,168},279951259},{{35,170},412871815},{{35,172},881913054},{{35,174},268261177},{{35,176},575207129},{{35,178},196951994},{{35,180},610045829},{{35,182},705950877},{{35,184},200402175},{{35,186},179100085},{{35,188},912730914},{{35,190},795237101},{{35,192},264189519},{{35,194},756871237},{{35,196},840795855},{{35,198},477498958},{{35,200},568161700},{{35,202},101820158},{{35,204},478938140},{{35,206},546807900},{{35,208},824972458},{{35,210},320572966},{{35,212},375535061},{{35,214},712736750},{{35,216},146215080},{{35,218},296045377},{{35,220},892271196},{{35,222},198915619},{{35,224},973312163},{{35,226},292266224},{{35,228},766955048},{{35,230},774760742},{{35,232},724672108},{{35,234},189810671},{{35,236},590576941},{{35,238},955913056},{{35,240},705860403},{{35,242},956268133},{{35,244},120026477},{{35,246},977289531},{{35,248},897970234},{{35,250},594373646},{{35,252},802624855},{{35,254},16139526},{{35,256},294245189},{{35,258},661099173},{{35,260},505327457},{{35,262},687552139},{{35,264},570417673},{{35,266},288750674},{{35,268},928298666},{{35,270},124243321},{{35,272},103493234},{{35,274},782666425},{{35,276},810561902},{{35,278},479140046},{{35,280},567654010},{{35,282},66398299},{{35,284},87173858},{{35,286},171094018},{{35,288},401077961},{{35,290},201022453},{{35,292},649177770},{{35,294},751032860},{{35,296},458665510},{{35,298},583069945},{{35,300},3741921},{{35,302},644139368},{{35,304},777863779},{{35,306},427938859},{{35,308},574083500},{{35,310},968708036},{{35,312},5259009},{{35,314},14753514},{{35,316},566158894},{{35,318},428971413},{{35,320},29779639},{{35,322},601893398},{{35,324},934948155},{{35,326},463945886},{{35,328},442386091},{{35,330},787098075},{{35,332},294593703},{{35,334},467511028},{{35,336},998601384},{{35,338},749411810},{{35,340},495421040},{{35,342},283658473},{{35,344},287441865},{{35,346},687819162},{{35,348},964614928},{{35,350},353638623},{{35,352},648210867},{{35,354},238886215},{{35,356},893364457},{{35,358},158958124},{{35,360},29345292},{{35,362},800368429},{{35,364},595552294},{{35,366},572640574},{{35,368},913495958},{{35,370},705720935},{{35,372},850127566},{{35,374},83220185},{{35,376},799386246},{{35,378},848828465},{{35,380},335228800},{{35,382},498492912},{{35,384},819731260},{{35,386},972790229},{{35,388},191002130},{{35,390},289923062},{{35,392},997108332},{{35,394},479589354},{{35,396},13686350},{{35,398},377632380},{{35,400},915241611},{{35,402},38445376},{{35,404},115515812},{{35,406},312111610},{{35,408},862313776},{{35,410},36444206},{{35,412},491509332},{{35,414},899038496},{{35,416},494299749},{{35,418},577210085},{{35,420},925017398},{{35,422},377889538},{{35,424},129014425},{{35,426},544007299},{{35,428},134491550},{{35,430},77644047},{{35,432},150186363},{{35,434},549177782},{{35,436},243194000},{{35,438},889811949},{{35,440},476414356},{{35,442},302027816},{{35,444},934223010},{{35,446},116351600},{{35,448},936035078},{{35,450},728736728},{{35,452},99057293},{{35,454},233685532},{{35,456},715949090},{{35,458},484999785},{{35,460},527817757},{{35,462},40017975},{{35,464},403976200},{{35,466},963752121},{{35,468},230480821},{{35,470},165554215},{{35,472},501580240},{{35,474},480519751},{{35,476},374582722},{{35,478},588438105},{{35,480},13652788},{{35,482},835399525},{{35,484},909982574},{{35,486},63720437},{{35,488},165170490},{{35,490},768431894},{{35,492},385829327},{{35,494},268804006},{{35,496},950180874},{{35,498},398363435},{{35,500},512876602},{{35,502},149304949},{{35,504},858796870},{{35,506},305796565},{{35,508},80654592},{{35,510},209088881},{{35,512},365995652},{{35,514},741417209},{{35,516},580938286},{{35,518},849913699},{{35,520},209592153},{{35,522},430983500},{{35,524},292682916},{{35,526},89781822},{{35,528},346251985},{{35,530},899920810},{{35,532},490814818},{{35,534},319818650},{{35,536},865676138},{{35,538},199552930},{{35,540},49606030},{{35,542},396988194},{{35,544},289382805},{{35,546},394082926},{{35,548},680976370},{{35,550},125444750},{{35,552},312554820},{{35,554},11884810},{{35,556},730982055},{{35,558},36906819},{{35,560},144996838},{{35,562},532313029},{{35,564},339360681},{{35,566},509568859},{{35,568},763509787},{{35,570},79118993},{{35,572},930179491},{{35,574},756170211},{{35,576},627420026},{{35,578},161269793},{{35,580},542072728},{{35,582},498021200},{{35,584},392693531},{{35,586},523036960},{{35,588},919765468},{{35,590},367278574},{{35,592},755839168},{{35,594},466305341},{{35,596},613534367},{{35,598},534169086},{{35,600},166110829},{{35,602},107021592},{{35,604},280650539},{{35,606},268761091},{{35,608},590645300},{{35,610},269909358},{{35,612},234042842},{{36,0},1},{{36,2},35},{{36,4},663},{{36,6},8921},{{36,8},94988},{{36,10},847688},{{36,12},6568888},{{36,14},45268120},{{36,16},282195928},{{36,18},611807809},{{36,20},518705216},{{36,22},990050297},{{36,24},271051698},{{36,26},122408000},{{36,28},405189613},{{36,30},94926808},{{36,32},864141322},{{36,34},53735275},{{36,36},24011733},{{36,38},736554738},{{36,40},929218491},{{36,42},904644261},{{36,44},780020466},{{36,46},504939462},{{36,48},734736582},{{36,50},905177688},{{36,52},612557341},{{36,54},964587741},{{36,56},714487014},{{36,58},841745335},{{36,60},939266470},{{36,62},221175663},{{36,64},553510265},{{36,66},427922711},{{36,68},816845808},{{36,70},551876447},{{36,72},104782423},{{36,74},432788437},{{36,76},75343637},{{36,78},98990584},{{36,80},780296494},{{36,82},401590023},{{36,84},184896774},{{36,86},39759619},{{36,88},46187357},{{36,90},134251301},{{36,92},342702573},{{36,94},517720},{{36,96},358976055},{{36,98},583636644},{{36,100},962541900},{{36,102},167548822},{{36,104},161325057},{{36,106},550357824},{{36,108},277594189},{{36,110},165080443},{{36,112},231182951},{{36,114},735855208},{{36,116},908711807},{{36,118},571176463},{{36,120},42569340},{{36,122},237272417},{{36,124},790920442},{{36,126},624258522},{{36,128},720842250},{{36,130},768667158},{{36,132},451444080},{{36,134},122083868},{{36,136},366641147},{{36,138},308868590},{{36,140},806102171},{{36,142},616667978},{{36,144},212552319},{{36,146},508058403},{{36,148},321794596},{{36,150},570313528},{{36,152},460066496},{{36,154},737582233},{{36,156},710064955},{{36,158},691296552},{{36,160},63281621},{{36,162},675218599},{{36,164},955697061},{{36,166},110510427},{{36,168},512018248},{{36,170},153536802},{{36,172},745040214},{{36,174},175960352},{{36,176},594730127},{{36,178},864516601},{{36,180},686994354},{{36,182},671193730},{{36,184},758082482},{{36,186},651219990},{{36,188},268055455},{{36,190},209604272},{{36,192},794711886},{{36,194},922988292},{{36,196},233697499},{{36,198},855180879},{{36,200},757331520},{{36,202},952855529},{{36,204},712373324},{{36,206},501054908},{{36,208},610479660},{{36,210},988305583},{{36,212},359797155},{{36,214},981016202},{{36,216},392046260},{{36,218},222705767},{{36,220},339379031},{{36,222},255395660},{{36,224},760704862},{{36,226},824907580},{{36,228},377018926},{{36,230},100950434},{{36,232},568292199},{{36,234},345612839},{{36,236},702169410},{{36,238},76425882},{{36,240},316244660},{{36,242},633878521},{{36,244},345805531},{{36,246},43908232},{{36,248},498746978},{{36,250},171201976},{{36,252},618174067},{{36,254},828038701},{{36,256},451921110},{{36,258},452033897},{{36,260},911744318},{{36,262},64098066},{{36,264},83924105},{{36,266},595571257},{{36,268},147937863},{{36,270},948006101},{{36,272},514496555},{{36,274},77289879},{{36,276},282007238},{{36,278},421799065},{{36,280},804334778},{{36,282},765393189},{{36,284},193008022},{{36,286},263503242},{{36,288},355816072},{{36,290},278012511},{{36,292},227861525},{{36,294},902054870},{{36,296},618486736},{{36,298},979710805},{{36,300},971590402},{{36,302},61042704},{{36,304},664850817},{{36,306},113175896},{{36,308},488535341},{{36,310},617582794},{{36,312},612947413},{{36,314},45804546},{{36,316},259073867},{{36,318},263038734},{{36,320},265569066},{{36,322},162645795},{{36,324},60875191},{{36,326},359494871},{{36,328},979749311},{{36,330},139358127},{{36,332},29529290},{{36,334},309151363},{{36,336},279422923},{{36,338},345089768},{{36,340},87598058},{{36,342},700337527},{{36,344},479652910},{{36,346},994907927},{{36,348},933976635},{{36,350},324751070},{{36,352},167729179},{{36,354},810904540},{{36,356},230096199},{{36,358},33195878},{{36,360},559883815},{{36,362},674302503},{{36,364},158162721},{{36,366},997344757},{{36,368},974400760},{{36,370},476723636},{{36,372},933671908},{{36,374},372458552},{{36,376},487353300},{{36,378},603836216},{{36,380},903251923},{{36,382},461631785},{{36,384},620155186},{{36,386},664707969},{{36,388},139328434},{{36,390},135802315},{{36,392},547850780},{{36,394},544085832},{{36,396},243757336},{{36,398},714792500},{{36,400},277247444},{{36,402},736724545},{{36,404},7257213},{{36,406},104433298},{{36,408},33077964},{{36,410},133546300},{{36,412},658470668},{{36,414},407613385},{{36,416},15549086},{{36,418},409602732},{{36,420},220607605},{{36,422},154437658},{{36,424},434924060},{{36,426},212726357},{{36,428},432662346},{{36,430},953726155},{{36,432},55947205},{{36,434},221865215},{{36,436},896738564},{{36,438},702917595},{{36,440},219549259},{{36,442},784888336},{{36,444},998968443},{{36,446},737927890},{{36,448},111474776},{{36,450},479544893},{{36,452},204531672},{{36,454},722344756},{{36,456},339644359},{{36,458},296335713},{{36,460},172390948},{{36,462},145219000},{{36,464},740849986},{{36,466},175518952},{{36,468},876047366},{{36,470},775536223},{{36,472},909308844},{{36,474},333180421},{{36,476},96764559},{{36,478},528034987},{{36,480},396799645},{{36,482},413114766},{{36,484},622993858},{{36,486},563074288},{{36,488},710510893},{{36,490},900874806},{{36,492},315196225},{{36,494},993816000},{{36,496},623166550},{{36,498},642968249},{{36,500},328645521},{{36,502},844280596},{{36,504},556521945},{{36,506},272458659},{{36,508},580772239},{{36,510},284457451},{{36,512},186994948},{{36,514},909094031},{{36,516},935768265},{{36,518},319893231},{{36,520},114481887},{{36,522},109302906},{{36,524},586737223},{{36,526},466388545},{{36,528},717893242},{{36,530},342269015},{{36,532},164207650},{{36,534},394855609},{{36,536},330099455},{{36,538},836592042},{{36,540},939058426},{{36,542},541984626},{{36,544},852636994},{{36,546},524042858},{{36,548},358495217},{{36,550},921118657},{{36,552},464191254},{{36,554},284341637},{{36,556},363378706},{{36,558},679058686},{{36,560},917272314},{{36,562},562488937},{{36,564},105215359},{{36,566},614330571},{{36,568},404183151},{{36,570},365378837},{{36,572},280141835},{{36,574},594380252},{{36,576},79371576},{{36,578},739360814},{{36,580},210010442},{{36,582},10232401},{{36,584},449147207},{{36,586},97531383},{{36,588},696215921},{{36,590},900156881},{{36,592},51327507},{{36,594},224992261},{{36,596},946786023},{{36,598},685932368},{{36,600},729503576},{{36,602},741723150},{{36,604},479111191},{{36,606},872812474},{{36,608},454570174},{{36,610},217639787},{{36,612},553029674},{{36,614},745481673},{{36,616},194164134},{{36,618},241094015},{{36,620},672191097},{{36,622},520725696},{{36,624},177728245},{{36,626},485102929},{{36,628},511421076},{{36,630},349030122},{{36,632},157631252},{{36,634},431267952},{{36,636},813510823},{{36,638},604978728},{{36,640},799539100},{{36,642},871169236},{{36,644},265066919},{{36,646},191499414},{{36,648},52282294},{{37,0},1},{{37,2},36},{{37,4},700},{{37,6},9656},{{37,8},105307},{{37,10},961912},{{37,12},7625652},{{37,14},53738944},{{37,16},342470612},{{37,18},999200441},{{37,20},797070294},{{37,22},375863958},{{37,24},9523173},{{37,26},166271514},{{37,28},481765400},{{37,30},879554808},{{37,32},535680694},{{37,34},467340394},{{37,36},413500052},{{37,38},692064693},{{37,40},580959888},{{37,42},369347871},{{37,44},169821810},{{37,46},621921924},{{37,48},137911737},{{37,50},940784828},{{37,52},741570244},{{37,54},905517670},{{37,56},551817302},{{37,58},657369119},{{37,60},721648393},{{37,62},536831850},{{37,64},500879720},{{37,66},726253305},{{37,68},296162041},{{37,70},891225164},{{37,72},880747817},{{37,74},182180719},{{37,76},544050763},{{37,78},654393489},{{37,80},357200480},{{37,82},356889637},{{37,84},635049309},{{37,86},374948412},{{37,88},486169649},{{37,90},407475615},{{37,92},51228607},{{37,94},535369936},{{37,96},325305756},{{37,98},74215114},{{37,100},944988254},{{37,102},919680639},{{37,104},647644667},{{37,106},526651696},{{37,108},763479161},{{37,110},278201627},{{37,112},103508412},{{37,114},387580497},{{37,116},561661113},{{37,118},38190290},{{37,120},310583115},{{37,122},569811056},{{37,124},351262691},{{37,126},985051203},{{37,128},403138813},{{37,130},643132429},{{37,132},289980808},{{37,134},570569544},{{37,136},550559442},{{37,138},934893929},{{37,140},352045239},{{37,142},810200946},{{37,144},61218795},{{37,146},42358563},{{37,148},89293505},{{37,150},506603831},{{37,152},400595820},{{37,154},117891860},{{37,156},469015294},{{37,158},166372283},{{37,160},320554017},{{37,162},155147268},{{37,164},955469333},{{37,166},896730515},{{37,168},826039051},{{37,170},931193995},{{37,172},36098122},{{37,174},893366407},{{37,176},522834450},{{37,178},917130400},{{37,180},759016216},{{37,182},23584371},{{37,184},48884561},{{37,186},844352920},{{37,188},604253909},{{37,190},886656394},{{37,192},548946691},{{37,194},688504947},{{37,196},972899398},{{37,198},721435398},{{37,200},409845929},{{37,202},399680456},{{37,204},284950632},{{37,206},796741351},{{37,208},217452678},{{37,210},611033399},{{37,212},592790059},{{37,214},219084711},{{37,216},504058472},{{37,218},277505825},{{37,220},120276345},{{37,222},694287126},{{37,224},35416589},{{37,226},305976723},{{37,228},447309020},{{37,230},969824889},{{37,232},565684997},{{37,234},62139306},{{37,236},857693940},{{37,238},901163636},{{37,240},262850397},{{37,242},927594387},{{37,244},721909425},{{37,246},958991660},{{37,248},471789360},{{37,250},260033992},{{37,252},544270783},{{37,254},877013007},{{37,256},153311613},{{37,258},85679796},{{37,260},660447085},{{37,262},213261352},{{37,264},954007371},{{37,266},8266647},{{37,268},75417194},{{37,270},28241545},{{37,272},733410215},{{37,274},579803150},{{37,276},41901427},{{37,278},876245480},{{37,280},900022334},{{37,282},813145019},{{37,284},668096269},{{37,286},73987267},{{37,288},175135030},{{37,290},724217744},{{37,292},139403302},{{37,294},77167168},{{37,296},775504145},{{37,298},397863476},{{37,300},816272710},{{37,302},221129133},{{37,304},242347768},{{37,306},885383757},{{37,308},728565085},{{37,310},947647994},{{37,312},605379205},{{37,314},598139075},{{37,316},269419404},{{37,318},178994132},{{37,320},603450690},{{37,322},652850980},{{37,324},19254430},{{37,326},182635911},{{37,328},57268581},{{37,330},239936865},{{37,332},878358438},{{37,334},515315850},{{37,336},141611162},{{37,338},665647032},{{37,340},700517198},{{37,342},807335907},{{37,344},965806030},{{37,346},897617342},{{37,348},773532343},{{37,350},924389029},{{37,352},419741954},{{37,354},420757062},{{37,356},581633294},{{37,358},179995348},{{37,360},34733596},{{37,362},923518220},{{37,364},731757774},{{37,366},573741822},{{37,368},531242380},{{37,370},813544540},{{37,372},336821038},{{37,374},442738016},{{37,376},551572674},{{37,378},470067223},{{37,380},638102335},{{37,382},989538200},{{37,384},956007535},{{37,386},613954394},{{37,388},401563904},{{37,390},103519975},{{37,392},569290006},{{37,394},144046622},{{37,396},689996849},{{37,398},638589501},{{37,400},358099514},{{37,402},725282594},{{37,404},691632053},{{37,406},702244532},{{37,408},284031792},{{37,410},473014945},{{37,412},465414316},{{37,414},116886234},{{37,416},142777936},{{37,418},342518645},{{37,420},138051544},{{37,422},347505254},{{37,424},57716395},{{37,426},939744642},{{37,428},114873890},{{37,430},359397343},{{37,432},671360195},{{37,434},724489266},{{37,436},683013222},{{37,438},345781236},{{37,440},550104449},{{37,442},877003874},{{37,444},63443231},{{37,446},224660360},{{37,448},658626409},{{37,450},133687251},{{37,452},933261032},{{37,454},273131705},{{37,456},48202694},{{37,458},144323990},{{37,460},559827621},{{37,462},779609382},{{37,464},930553156},{{37,466},35267489},{{37,468},493151974},{{37,470},645090534},{{37,472},517431516},{{37,474},368634145},{{37,476},540405134},{{37,478},215255527},{{37,480},144656993},{{37,482},549192120},{{37,484},659960465},{{37,486},217236722},{{37,488},742258783},{{37,490},538378955},{{37,492},211409043},{{37,494},760044403},{{37,496},389330065},{{37,498},692548510},{{37,500},583181570},{{37,502},627949137},{{37,504},829194932},{{37,506},234693932},{{37,508},651493437},{{37,510},707321269},{{37,512},828284674},{{37,514},652751037},{{37,516},873736576},{{37,518},267300299},{{37,520},729754896},{{37,522},429920674},{{37,524},875733754},{{37,526},60888792},{{37,528},225478637},{{37,530},39002446},{{37,532},407176220},{{37,534},761384762},{{37,536},131879783},{{37,538},661443680},{{37,540},51638267},{{37,542},568172852},{{37,544},186052558},{{37,546},637968267},{{37,548},556455031},{{37,550},313451921},{{37,552},238551452},{{37,554},644714578},{{37,556},449541818},{{37,558},640800540},{{37,560},923965193},{{37,562},38909678},{{37,564},41940756},{{37,566},338485997},{{37,568},888949941},{{37,570},526610135},{{37,572},48150535},{{37,574},778944981},{{37,576},480892059},{{37,578},874500608},{{37,580},900322190},{{37,582},973783674},{{37,584},468787609},{{37,586},618167632},{{37,588},913754856},{{37,590},327797543},{{37,592},845404908},{{37,594},752246622},{{37,596},831422464},{{37,598},484541178},{{37,600},501948673},{{37,602},647306990},{{37,604},882577308},{{37,606},771072569},{{37,608},171273117},{{37,610},620085552},{{37,612},385025714},{{37,614},126556571},{{37,616},472404266},{{37,618},664907284},{{37,620},284895728},{{37,622},860747643},{{37,624},285481155},{{37,626},480968189},{{37,628},426457284},{{37,630},579997870},{{37,632},253315436},{{37,634},264967992},{{37,636},325506073},{{37,638},407074927},{{37,640},289125366},{{37,642},710111895},{{37,644},168902913},{{37,646},39893459},{{37,648},264014099},{{37,650},335462311},{{37,652},284068808},{{37,654},624620216},{{37,656},265346008},{{37,658},330183605},{{37,660},301153063},{{37,662},136165951},{{37,664},223572391},{{37,666},416076696},{{37,668},791322793},{{37,670},440956632},{{37,672},812128221},{{37,674},56870528},{{37,676},529001955},{{37,678},157225171},{{37,680},153110824},{{37,682},659760559},{{37,684},934444871},{{38,0},1},{{38,2},37},{{38,4},738},{{38,6},10430},{{38,8},116437},{{38,10},1088001},{{38,12},8818820},{{38,14},63517016},{{38,16},413577336},{{38,18},466132154},{{38,20},602224077},{{38,22},950429493},{{38,24},571044537},{{38,26},948550192},{{38,28},759622519},{{38,30},360792951},{{38,32},40404471},{{38,34},549575252},{{38,36},331339348},{{38,38},353289303},{{38,40},642561133},{{38,42},959520386},{{38,44},811439523},{{38,46},113998222},{{38,48},306747368},{{38,50},686402540},{{38,52},608623079},{{38,54},625536502},{{38,56},102898449},{{38,58},513583096},{{38,60},310389938},{{38,62},861964034},{{38,64},144673299},{{38,66},459932354},{{38,68},368865341},{{38,70},656127608},{{38,72},909171212},{{38,74},807159815},{{38,76},446679967},{{38,78},582385365},{{38,80},827063804},{{38,82},980667706},{{38,84},264330272},{{38,86},600794253},{{38,88},740948802},{{38,90},906942889},{{38,92},945728377},{{38,94},18846332},{{38,96},985664112},{{38,98},7701519},{{38,100},115050801},{{38,102},870345183},{{38,104},606442987},{{38,106},443069595},{{38,108},817056595},{{38,110},621418778},{{38,112},690512206},{{38,114},255049968},{{38,116},161633922},{{38,118},402904753},{{38,120},372549674},{{38,122},317848199},{{38,124},779510849},{{38,126},454579621},{{38,128},366999138},{{38,130},955388684},{{38,132},940196190},{{38,134},710141532},{{38,136},289889641},{{38,138},400266971},{{38,140},473006189},{{38,142},518001144},{{38,144},203532149},{{38,146},277752196},{{38,148},73653399},{{38,150},957077834},{{38,152},580796815},{{38,154},797359407},{{38,156},33679102},{{38,158},974181950},{{38,160},229170666},{{38,162},221016673},{{38,164},753153481},{{38,166},718492334},{{38,168},480056326},{{38,170},134801483},{{38,172},829292600},{{38,174},87160542},{{38,176},624566954},{{38,178},157188714},{{38,180},912350324},{{38,182},248797376},{{38,184},864861712},{{38,186},311625650},{{38,188},564724833},{{38,190},638897879},{{38,192},211767349},{{38,194},670618766},{{38,196},182357348},{{38,198},406247054},{{38,200},335828971},{{38,202},235855014},{{38,204},766599169},{{38,206},873180801},{{38,208},943988159},{{38,210},797515463},{{38,212},949064434},{{38,214},37355164},{{38,216},366387587},{{38,218},992037332},{{38,220},39085136},{{38,222},457008562},{{38,224},710738441},{{38,226},147115812},{{38,228},245127944},{{38,230},221285308},{{38,232},44913339},{{38,234},750687382},{{38,236},166494925},{{38,238},487773254},{{38,240},2533400},{{38,242},294773545},{{38,244},964749926},{{38,246},838352064},{{38,248},354747747},{{38,250},983055334},{{38,252},906311260},{{38,254},773970452},{{38,256},136280712},{{38,258},732037766},{{38,260},304757958},{{38,262},868694356},{{38,264},9717274},{{38,266},686595153},{{38,268},845171773},{{38,270},715645486},{{38,272},457517675},{{38,274},868876321},{{38,276},257821804},{{38,278},398717354},{{38,280},952878758},{{38,282},459394839},{{38,284},735151005},{{38,286},982831573},{{38,288},597714383},{{38,290},483469574},{{38,292},396276440},{{38,294},147004054},{{38,296},275175512},{{38,298},449695021},{{38,300},280047682},{{38,302},322443740},{{38,304},657859781},{{38,306},236891682},{{38,308},338855034},{{38,310},771308208},{{38,312},208042945},{{38,314},611383416},{{38,316},470020781},{{38,318},959351211},{{38,320},871193372},{{38,322},314812327},{{38,324},417008584},{{38,326},157794928},{{38,328},30304137},{{38,330},772193806},{{38,332},92880268},{{38,334},735754383},{{38,336},725090032},{{38,338},678769251},{{38,340},695572650},{{38,342},713627047},{{38,344},220917673},{{38,346},996272940},{{38,348},711499227},{{38,350},615337951},{{38,352},732510553},{{38,354},265860373},{{38,356},10346269},{{38,358},946167168},{{38,360},327969286},{{38,362},691646116},{{38,364},588894836},{{38,366},556718107},{{38,368},891256057},{{38,370},29035235},{{38,372},193826291},{{38,374},413628097},{{38,376},951441661},{{38,378},812044940},{{38,380},432676044},{{38,382},866499015},{{38,384},139084375},{{38,386},351784477},{{38,388},900166473},{{38,390},781089061},{{38,392},914118385},{{38,394},818686834},{{38,396},857340116},{{38,398},329139077},{{38,400},237478891},{{38,402},284468211},{{38,404},215304591},{{38,406},458481845},{{38,408},227432873},{{38,410},865995208},{{38,412},554027168},{{38,414},463893384},{{38,416},221077016},{{38,418},374577314},{{38,420},119759917},{{38,422},360383422},{{38,424},704486222},{{38,426},404678036},{{38,428},137104816},{{38,430},809074680},{{38,432},755219457},{{38,434},826569646},{{38,436},867839827},{{38,438},768754773},{{38,440},89100960},{{38,442},257194726},{{38,444},724398193},{{38,446},973188469},{{38,448},858913715},{{38,450},18463743},{{38,452},680309520},{{38,454},450458743},{{38,456},140048366},{{38,458},764912130},{{38,460},371007014},{{38,462},456635116},{{38,464},735728421},{{38,466},778688084},{{38,468},152973997},{{38,470},434969799},{{38,472},574794869},{{38,474},212648988},{{38,476},728361716},{{38,478},542931287},{{38,480},302379989},{{38,482},751579729},{{38,484},92390154},{{38,486},220181191},{{38,488},407743441},{{38,490},315151252},{{38,492},520426045},{{38,494},407908622},{{38,496},679231575},{{38,498},395003916},{{38,500},794034847},{{38,502},347654216},{{38,504},68808817},{{38,506},829211530},{{38,508},81601558},{{38,510},162714123},{{38,512},30761100},{{38,514},394951130},{{38,516},268715057},{{38,518},283612447},{{38,520},241955302},{{38,522},623210420},{{38,524},275963878},{{38,526},159211117},{{38,528},252162685},{{38,530},595441437},{{38,532},529655660},{{38,534},437222092},{{38,536},841111836},{{38,538},179960886},{{38,540},135660761},{{38,542},917237477},{{38,544},768051317},{{38,546},444580903},{{38,548},506791801},{{38,550},487181239},{{38,552},875489229},{{38,554},680194597},{{38,556},205928376},{{38,558},680445786},{{38,560},683783933},{{38,562},969592088},{{38,564},132367844},{{38,566},396994570},{{38,568},832926454},{{38,570},630581401},{{38,572},505495558},{{38,574},385734337},{{38,576},641541057},{{38,578},95095471},{{38,580},989574773},{{38,582},911275608},{{38,584},518514268},{{38,586},282262989},{{38,588},419271827},{{38,590},469001628},{{38,592},420271862},{{38,594},947083037},{{38,596},407529572},{{38,598},59976989},{{38,600},434008630},{{38,602},863717239},{{38,604},945875935},{{38,606},75676474},{{38,608},215313835},{{38,610},250745830},{{38,612},87811894},{{38,614},264747800},{{38,616},37018493},{{38,618},98597371},{{38,620},710706515},{{38,622},142785594},{{38,624},391940962},{{38,626},336466122},{{38,628},341268838},{{38,630},21508490},{{38,632},413865364},{{38,634},232101532},{{38,636},92701632},{{38,638},8053527},{{38,640},412757119},{{38,642},757312194},{{38,644},403681966},{{38,646},949009531},{{38,648},880975038},{{38,650},37050684},{{38,652},272465075},{{38,654},678404684},{{38,656},193438246},{{38,658},672480427},{{38,660},700064004},{{38,662},142628578},{{38,664},802581416},{{38,666},279140871},{{38,668},973655892},{{38,670},800905741},{{38,672},598005728},{{38,674},935768930},{{38,676},668573394},{{38,678},207197197},{{38,680},649003003},{{38,682},270174246},{{38,684},76144766},{{38,686},315632510},{{38,688},875459369},{{38,690},359185050},{{38,692},528086919},{{38,694},473525359},{{38,696},758981160},{{38,698},249109513},{{38,700},189948776},{{38,702},344668617},{{38,704},795917722},{{38,706},549344159},{{38,708},348920520},{{38,710},486734532},{{38,712},302843834},{{38,714},285724416},{{38,716},810790165},{{38,718},350603652},{{38,720},574459989},{{38,722},873908008},{{39,0},1},{{39,2},38},{{39,4},777},{{39,6},11244},{{39,8},128419},{{39,10},1226846},{{39,12},10161959},{{39,14},74764168},{{39,16},497121432},{{39,18},26344483},{{39,20},38234873},{{39,22},423642505},{{39,24},376339808},{{39,26},863392989},{{39,28},917340710},{{39,30},353019266},{{39,32},355701734},{{39,34},828153534},{{39,36},204362640},{{39,38},374924405},{{39,40},607928554},{{39,42},963790885},{{39,44},940721850},{{39,46},687219775},{{39,48},764705852},{{39,50},876861874},{{39,52},763291630},{{39,54},981930457},{{39,56},551085656},{{39,58},980270580},{{39,60},505906881},{{39,62},983294521},{{39,64},135354674},{{39,66},135665519},{{39,68},630173290},{{39,70},212355830},{{39,72},143623144},{{39,74},227056594},{{39,76},817242891},{{39,78},163435465},{{39,80},418550307},{{39,82},731605596},{{39,84},289566443},{{39,86},285968813},{{39,88},433396374},{{39,90},290335437},{{39,92},260134359},{{39,94},257166798},{{39,96},296375223},{{39,98},99595679},{{39,100},459082068},{{39,102},507135523},{{39,104},972388714},{{39,106},133158519},{{39,108},975205558},{{39,110},982374421},{{39,112},644050428},{{39,114},996778111},{{39,116},162109063},{{39,118},746906113},{{39,120},514292299},{{39,122},926426755},{{39,124},356009260},{{39,126},196659267},{{39,128},409916170},{{39,130},325494529},{{39,132},655002543},{{39,134},558511285},{{39,136},36446396},{{39,138},471095084},{{39,140},174722764},{{39,142},671116976},{{39,144},160891233},{{39,146},868903396},{{39,148},304037581},{{39,150},23612943},{{39,152},337881011},{{39,154},234387037},{{39,156},370561646},{{39,158},356075504},{{39,160},698718914},{{39,162},535181667},{{39,164},514726084},{{39,166},815242029},{{39,168},608023573},{{39,170},448544035},{{39,172},835833664},{{39,174},991058290},{{39,176},399256230},{{39,178},20531824},{{39,180},669361826},{{39,182},539724566},{{39,184},760387110},{{39,186},830813942},{{39,188},547045707},{{39,190},178050500},{{39,192},929198630},{{39,194},6813905},{{39,196},110412371},{{39,198},858816899},{{39,200},809729618},{{39,202},833864785},{{39,204},232951975},{{39,206},485491061},{{39,208},613385270},{{39,210},553071180},{{39,212},627954610},{{39,214},952757220},{{39,216},692906182},{{39,218},748961577},{{39,220},662247263},{{39,222},52513186},{{39,224},149763764},{{39,226},145530822},{{39,228},33882391},{{39,230},453364543},{{39,232},997405166},{{39,234},992558694},{{39,236},759602854},{{39,238},84367345},{{39,240},100239977},{{39,242},854081961},{{39,244},858205595},{{39,246},486024240},{{39,248},91555639},{{39,250},177882871},{{39,252},949083392},{{39,254},519037398},{{39,256},556513157},{{39,258},228484413},{{39,260},492836072},{{39,262},589348909},{{39,264},196163508},{{39,266},266626335},{{39,268},11245627},{{39,270},157404436},{{39,272},270481031},{{39,274},638406640},{{39,276},490889097},{{39,278},527976504},{{39,280},370488458},{{39,282},823400678},{{39,284},322868722},{{39,286},206357234},{{39,288},647142926},{{39,290},768625346},{{39,292},265191551},{{39,294},148038615},{{39,296},363341916},{{39,298},267722164},{{39,300},893118504},{{39,302},738977503},{{39,304},565582757},{{39,306},762106365},{{39,308},849369394},{{39,310},766495732},{{39,312},13155357},{{39,314},515888816},{{39,316},523640060},{{39,318},647203814},{{39,320},437352666},{{39,322},546684558},{{39,324},961386555},{{39,326},7614498},{{39,328},893885274},{{39,330},936701598},{{39,332},428062192},{{39,334},113231261},{{39,336},402917050},{{39,338},409965843},{{39,340},165984892},{{39,342},799921270},{{39,344},659405770},{{39,346},509144023},{{39,348},774701607},{{39,350},842603658},{{39,352},487390464},{{39,354},251731862},{{39,356},581859608},{{39,358},922860080},{{39,360},258383681},{{39,362},201597752},{{39,364},292594441},{{39,366},460903867},{{39,368},638298912},{{39,370},848020590},{{39,372},765105850},{{39,374},965506327},{{39,376},844776867},{{39,378},575276415},{{39,380},85481014},{{39,382},653985938},{{39,384},197424999},{{39,386},197600210},{{39,388},989591463},{{39,390},112466859},{{39,392},918937916},{{39,394},878289962},{{39,396},30252094},{{39,398},561367106},{{39,400},701604983},{{39,402},794157139},{{39,404},205106586},{{39,406},358551581},{{39,408},218730442},{{39,410},820317821},{{39,412},718077344},{{39,414},742273426},{{39,416},343977802},{{39,418},723940137},{{39,420},91227055},{{39,422},889419899},{{39,424},835334285},{{39,426},445942872},{{39,428},874169472},{{39,430},806494972},{{39,432},841559090},{{39,434},34902341},{{39,436},936247116},{{39,438},742348345},{{39,440},932764662},{{39,442},776531786},{{39,444},136341990},{{39,446},609226011},{{39,448},962126351},{{39,450},692609037},{{39,452},492230872},{{39,454},512261831},{{39,456},61424189},{{39,458},202712100},{{39,460},557188069},{{39,462},23267751},{{39,464},10862209},{{39,466},780311892},{{39,468},698216821},{{39,470},610626474},{{39,472},445698906},{{39,474},548927052},{{39,476},791636623},{{39,478},278469086},{{39,480},802570473},{{39,482},843652647},{{39,484},214889050},{{39,486},950325814},{{39,488},545811188},{{39,490},732525066},{{39,492},799299048},{{39,494},547938769},{{39,496},119233118},{{39,498},836166054},{{39,500},515368215},{{39,502},821018309},{{39,504},703809789},{{39,506},385697728},{{39,508},474302192},{{39,510},326687407},{{39,512},701322950},{{39,514},753939342},{{39,516},860741461},{{39,518},608860184},{{39,520},481069405},{{39,522},497217661},{{39,524},107822505},{{39,526},538149776},{{39,528},65872865},{{39,530},267685484},{{39,532},630211463},{{39,534},833714775},{{39,536},127007356},{{39,538},988488267},{{39,540},704390393},{{39,542},326686679},{{39,544},330510067},{{39,546},968474337},{{39,548},860095258},{{39,550},865223840},{{39,552},3530159},{{39,554},602833824},{{39,556},943838253},{{39,558},510792598},{{39,560},862215682},{{39,562},804647558},{{39,564},57277705},{{39,566},379631476},{{39,568},611335785},{{39,570},827032941},{{39,572},500396827},{{39,574},166974973},{{39,576},950996383},{{39,578},97277257},{{39,580},336237474},{{39,582},527425945},{{39,584},836169765},{{39,586},13569792},{{39,588},45600126},{{39,590},103702022},{{39,592},589110361},{{39,594},158793934},{{39,596},917834123},{{39,598},750227633},{{39,600},450511448},{{39,602},228174293},{{39,604},380815071},{{39,606},984828008},{{39,608},35225572},{{39,610},19924799},{{39,612},316530723},{{39,614},169463852},{{39,616},11894443},{{39,618},83625994},{{39,620},27918722},{{39,622},725825514},{{39,624},510537357},{{39,626},901592447},{{39,628},560692763},{{39,630},386943274},{{39,632},409576331},{{39,634},409681305},{{39,636},19743037},{{39,638},901841314},{{39,640},504205848},{{39,642},287987501},{{39,644},95070522},{{39,646},999713439},{{39,648},52172335},{{39,650},458657276},{{39,652},716446234},{{39,654},960325619},{{39,656},967217606},{{39,658},29400294},{{39,660},323715881},{{39,662},571473809},{{39,664},542099425},{{39,666},838958945},{{39,668},826022366},{{39,670},215456133},{{39,672},111542899},{{39,674},27057122},{{39,676},264098733},{{39,678},414451664},{{39,680},367598279},{{39,682},660361161},{{39,684},317432327},{{39,686},788309656},{{39,688},482969647},{{39,690},453723335},{{39,692},307123116},{{39,694},46250346},{{39,696},156036134},{{39,698},550671015},{{39,700},501877998},{{39,702},918162544},{{39,704},672414507},{{39,706},744250791},{{39,708},519150731},{{39,710},449335541},{{39,712},717241257},{{39,714},798831268},{{39,716},772517138},{{39,718},286300330},{{39,720},910111510},{{39,722},66350225},{{39,724},850058429},{{39,726},996528049},{{39,728},454249733},{{39,730},463645138},{{39,732},33673728},{{39,734},195487971},{{39,736},700828817},{{39,738},25012182},{{39,740},447505308},{{39,742},968790402},{{39,744},312778627},{{39,746},684898658},{{39,748},698549052},{{39,750},965513947},{{39,752},825161447},{{39,754},410399245},{{39,756},428579579},{{39,758},669192144},{{39,760},82412074},{{40,0},1},{{40,2},39},{{40,4},817},{{40,6},12099},{{40,8},141295},{{40,10},1379381},{{40,12},11669611},{{40,14},87657665},{{40,16},594899060},{{40,18},695536795},{{40,20},226472285},{{40,22},640458905},{{40,24},794561570},{{40,26},378189352},{{40,28},472728269},{{40,30},218438573},{{40,32},56516519},{{40,34},255055733},{{40,36},845027144},{{40,38},588332091},{{40,40},652544873},{{40,42},575593478},{{40,44},251899261},{{40,46},421780632},{{40,48},446749115},{{40,50},397384403},{{40,52},967249876},{{40,54},562965804},{{40,56},307548860},{{40,58},910064219},{{40,60},267557957},{{40,62},532097834},{{40,64},694036707},{{40,66},378870548},{{40,68},124206593},{{40,70},109699395},{{40,72},5415029},{{40,74},722948552},{{40,76},875697847},{{40,78},694452268},{{40,80},7553293},{{40,82},132421363},{{40,84},106964105},{{40,86},391245927},{{40,88},870340375},{{40,90},243365738},{{40,92},69805673},{{40,94},199865008},{{40,96},75486973},{{40,98},171179760},{{40,100},109991897},{{40,102},220793643},{{40,104},513746719},{{40,106},106419838},{{40,108},540171765},{{40,110},580499245},{{40,112},759007158},{{40,114},982900537},{{40,116},645687882},{{40,118},590392656},{{40,120},601803737},{{40,122},221575615},{{40,124},697448067},{{40,126},153409333},{{40,128},368742411},{{40,130},593478736},{{40,132},779784392},{{40,134},983542304},{{40,136},533669091},{{40,138},167997680},{{40,140},729893362},{{40,142},841704349},{{40,144},760614624},{{40,146},47743042},{{40,148},998724205},{{40,150},972938209},{{40,152},77600320},{{40,154},536850090},{{40,156},695359058},{{40,158},769331095},{{40,160},966134679},{{40,162},528777379},{{40,164},695035445},{{40,166},387545073},{{40,168},911151592},{{40,170},242062595},{{40,172},521446824},{{40,174},889535341},{{40,176},920252167},{{40,178},112865832},{{40,180},806555197},{{40,182},118151259},{{40,184},625842139},{{40,186},701618487},{{40,188},790273468},{{40,190},694977537},{{40,192},572862214},{{40,194},473466414},{{40,196},246109368},{{40,198},48621359},{{40,200},353657541},{{40,202},554932622},{{40,204},499105369},{{40,206},867797665},{{40,208},487345603},{{40,210},842033962},{{40,212},519557065},{{40,214},245850790},{{40,216},335288378},{{40,218},782811146},{{40,220},892240358},{{40,222},338051309},{{40,224},826545456},{{40,226},41171254},{{40,228},334148733},{{40,230},152569170},{{40,232},144665017},{{40,234},941279118},{{40,236},897754414},{{40,238},89241104},{{40,240},416864510},{{40,242},41530804},{{40,244},299074740},{{40,246},73588196},{{40,248},959211062},{{40,250},109470038},{{40,252},500259918},{{40,254},366443802},{{40,256},403320596},{{40,258},183957534},{{40,260},992196343},{{40,262},652194487},{{40,264},652679636},{{40,266},980112362},{{40,268},896443763},{{40,270},694053263},{{40,272},85474084},{{40,274},793481845},{{40,276},36502549},{{40,278},113761902},{{40,280},13660255},{{40,282},295744749},{{40,284},768030597},{{40,286},559676644},{{40,288},267907464},{{40,290},329732897},{{40,292},34721556},{{40,294},481917917},{{40,296},470669881},{{40,298},496023609},{{40,300},35319413},{{40,302},426881953},{{40,304},436183525},{{40,306},539581676},{{40,308},797395436},{{40,310},949513087},{{40,312},636400441},{{40,314},684066319},{{40,316},283217124},{{40,318},456809507},{{40,320},742722246},{{40,322},708837224},{{40,324},1825110},{{40,326},845476655},{{40,328},721485134},{{40,330},509524702},{{40,332},571748192},{{40,334},313097600},{{40,336},164720049},{{40,338},83489702},{{40,340},463694600},{{40,342},122519767},{{40,344},438333196},{{40,346},350973050},{{40,348},742760174},{{40,350},292313656},{{40,352},699166885},{{40,354},733491013},{{40,356},480543050},{{40,358},245749577},{{40,360},741817620},{{40,362},207993307},{{40,364},244579067},{{40,366},622422144},{{40,368},604751887},{{40,370},899189402},{{40,372},151409381},{{40,374},217727618},{{40,376},880477312},{{40,378},214663719},{{40,380},394263729},{{40,382},196688383},{{40,384},548030201},{{40,386},726215545},{{40,388},464673145},{{40,390},261250632},{{40,392},625458514},{{40,394},838784252},{{40,396},982491280},{{40,398},700533618},{{40,400},585918514},{{40,402},160625577},{{40,404},639912412},{{40,406},329107337},{{40,408},639996475},{{40,410},820595096},{{40,412},822718095},{{40,414},278815123},{{40,416},496262265},{{40,418},918547360},{{40,420},8027724},{{40,422},726754416},{{40,424},823448457},{{40,426},260321413},{{40,428},863184482},{{40,430},650858805},{{40,432},276099402},{{40,434},685460415},{{40,436},954079520},{{40,438},733965175},{{40,440},676833996},{{40,442},368637623},{{40,444},143549481},{{40,446},304621819},{{40,448},472579474},{{40,450},749596748},{{40,452},116386311},{{40,454},410243381},{{40,456},633945382},{{40,458},411647917},{{40,460},177570608},{{40,462},616578162},{{40,464},767744928},{{40,466},61290651},{{40,468},523112125},{{40,470},276619822},{{40,472},15151789},{{40,474},253528389},{{40,476},167816966},{{40,478},891846580},{{40,480},541892511},{{40,482},341041750},{{40,484},391023167},{{40,486},293092921},{{40,488},243156326},{{40,490},622723871},{{40,492},473135257},{{40,494},726189187},{{40,496},379573236},{{40,498},555335821},{{40,500},257038714},{{40,502},482079083},{{40,504},723871307},{{40,506},606515981},{{40,508},65251208},{{40,510},632383753},{{40,512},147352575},{{40,514},594192641},{{40,516},924833549},{{40,518},483314326},{{40,520},808069004},{{40,522},770319259},{{40,524},427864560},{{40,526},25642674},{{40,528},464671587},{{40,530},569308215},{{40,532},637300329},{{40,534},923466624},{{40,536},23057035},{{40,538},86870702},{{40,540},983746124},{{40,542},846059215},{{40,544},574808201},{{40,546},554549209},{{40,548},446310553},{{40,550},959681948},{{40,552},778636627},{{40,554},211592095},{{40,556},516682914},{{40,558},291911580},{{40,560},587928798},{{40,562},427680003},{{40,564},894209596},{{40,566},866648165},{{40,568},679666232},{{40,570},460484096},{{40,572},854394115},{{40,574},982195268},{{40,576},822495481},{{40,578},835383529},{{40,580},431162040},{{40,582},830468499},{{40,584},195346596},{{40,586},57036658},{{40,588},866149457},{{40,590},860543178},{{40,592},818146210},{{40,594},279107618},{{40,596},892401239},{{40,598},225036974},{{40,600},868558986},{{40,602},685134666},{{40,604},744469605},{{40,606},156127522},{{40,608},187537334},{{40,610},788919638},{{40,612},909025900},{{40,614},672187019},{{40,616},217419201},{{40,618},384265406},{{40,620},616374282},{{40,622},378322214},{{40,624},141913342},{{40,626},501653295},{{40,628},461070473},{{40,630},25985020},{{40,632},589549638},{{40,634},109433868},{{40,636},888240019},{{40,638},931367280},{{40,640},762349235},{{40,642},234613827},{{40,644},765084315},{{40,646},611038359},{{40,648},758764450},{{40,650},286873014},{{40,652},382512476},{{40,654},382119459},{{40,656},20294058},{{40,658},943700532},{{40,660},211933192},{{40,662},58390954},{{40,664},180966724},{{40,666},929698288},{{40,668},805610393},{{40,670},509211182},{{40,672},866583662},{{40,674},775212548},{{40,676},88368846},{{40,678},726939816},{{40,680},185342247},{{40,682},229877142},{{40,684},705155204},{{40,686},200856219},{{40,688},36832958},{{40,690},610458570},{{40,692},660966337},{{40,694},749737121},{{40,696},592806565},{{40,698},894272325},{{40,700},480779946},{{40,702},649154472},{{40,704},88597955},{{40,706},74084666},{{40,708},744113332},{{40,710},528684751},{{40,712},282107891},{{40,714},100372245},{{40,716},756922141},{{40,718},58776739},{{40,720},981772435},{{40,722},924634098},{{40,724},951039927},{{40,726},397719622},{{40,728},577729727},{{40,730},762973087},{{40,732},736969640},{{40,734},674672356},{{40,736},297937804},{{40,738},986319572},{{40,740},149411109},{{40,742},496025335},{{40,744},118765897},{{40,746},173573997},{{40,748},13186371},{{40,750},696131467},{{40,752},139811703},{{40,754},497652080},{{40,756},238358226},{{40,758},252091863},{{40,760},126575962},{{40,762},416549513},{{40,764},112043953},{{40,766},769546766},{{40,768},210139961},{{40,770},218718185},{{40,772},975953506},{{40,774},930028805},{{40,776},845629302},{{40,778},57030776},{{40,780},852433935},{{40,782},836915594},{{40,784},400219298},{{40,786},622051773},{{40,788},829969111},{{40,790},114603161},{{40,792},10751254},{{40,794},909008878},{{40,796},579282117},{{40,798},214070865},{{40,800},563200757},{{41,0},1},{{41,2},40},{{41,4},858},{{41,6},12996},{{41,8},155108},{{41,10},1546584},{{41,12},13357338},{{41,14},102391268},{{41,16},708914679},{{41,18},491589996},{{41,20},307979410},{{41,22},602522471},{{41,24},317222127},{{41,26},290284759},{{41,28},54099411},{{41,30},989042041},{{41,32},349750818},{{41,34},106531062},{{41,36},706143382},{{41,38},63807262},{{41,40},819412921},{{41,42},144007031},{{41,44},937903432},{{41,46},671633208},{{41,48},144280187},{{41,50},535961584},{{41,52},391683158},{{41,54},665684992},{{41,56},173615217},{{41,58},173957993},{{41,60},353557533},{{41,62},689224661},{{41,64},70346145},{{41,66},249590014},{{41,68},418977958},{{41,70},826283746},{{41,72},394602103},{{41,74},916349862},{{41,76},513826761},{{41,78},491750575},{{41,80},183159109},{{41,82},757685121},{{41,84},418341803},{{41,86},274891227},{{41,88},642914114},{{41,90},790796259},{{41,92},588464975},{{41,94},740365449},{{41,96},551222753},{{41,98},10565934},{{41,100},35820801},{{41,102},515689568},{{41,104},211177017},{{41,106},828019707},{{41,108},68961130},{{41,110},155306993},{{41,112},295844962},{{41,114},698696703},{{41,116},264483577},{{41,118},967049520},{{41,120},615265667},{{41,122},559761896},{{41,124},719262960},{{41,126},509462378},{{41,128},575657367},{{41,130},591920899},{{41,132},676732702},{{41,134},723371825},{{41,136},327050158},{{41,138},311506131},{{41,140},94078284},{{41,142},608080285},{{41,144},992236405},{{41,146},137506625},{{41,148},399044419},{{41,150},458634324},{{41,152},553334522},{{41,154},801149022},{{41,156},685520978},{{41,158},446537546},{{41,160},993927587},{{41,162},293142441},{{41,164},349812890},{{41,166},364132070},{{41,168},129851348},{{41,170},857298051},{{41,172},877404263},{{41,174},877505804},{{41,176},63808796},{{41,178},43779853},{{41,180},597054006},{{41,182},757518688},{{41,184},847719064},{{41,186},814336009},{{41,188},295491019},{{41,190},566317327},{{41,192},427355879},{{41,194},99632937},{{41,196},271930495},{{41,198},211594531},{{41,200},907085661},{{41,202},370381473},{{41,204},40651392},{{41,206},893659649},{{41,208},363630034},{{41,210},486697292},{{41,212},957988008},{{41,214},762036357},{{41,216},927839193},{{41,218},855832860},{{41,220},336383816},{{41,222},307639758},{{41,224},266751066},{{41,226},682795763},{{41,228},757933830},{{41,230},702637096},{{41,232},416587519},{{41,234},241670221},{{41,236},803239702},{{41,238},991067388},{{41,240},753770489},{{41,242},69318095},{{41,244},379601638},{{41,246},829408102},{{41,248},918333643},{{41,250},833524181},{{41,252},647446668},{{41,254},999853061},{{41,256},600717076},{{41,258},736359930},{{41,260},166694847},{{41,262},912637361},{{41,264},883248816},{{41,266},334184966},{{41,268},360770954},{{41,270},907814459},{{41,272},571070899},{{41,274},760625736},{{41,276},543003305},{{41,278},12232839},{{41,280},27415041},{{41,282},235755079},{{41,284},155935992},{{41,286},895456358},{{41,288},299525687},{{41,290},387663753},{{41,292},430722193},{{41,294},845849975},{{41,296},389897647},{{41,298},157165043},{{41,300},232374231},{{41,302},709459451},{{41,304},819494807},{{41,306},873294798},{{41,308},982307907},{{41,310},723241456},{{41,312},529916420},{{41,314},190269000},{{41,316},832006535},{{41,318},157577121},{{41,320},119818595},{{41,322},751958343},{{41,324},818604698},{{41,326},923214476},{{41,328},455357809},{{41,330},664208514},{{41,332},204222119},{{41,334},358021985},{{41,336},507909159},{{41,338},532713722},{{41,340},447934290},{{41,342},550255949},{{41,344},9030523},{{41,346},204809569},{{41,348},704696131},{{41,350},798537153},{{41,352},779574805},{{41,354},146334295},{{41,356},422444856},{{41,358},763243391},{{41,360},968318292},{{41,362},409596303},{{41,364},730176788},{{41,366},661449533},{{41,368},145680243},{{41,370},291092743},{{41,372},406566554},{{41,374},840725280},{{41,376},859336604},{{41,378},385485264},{{41,380},540592314},{{41,382},491573347},{{41,384},430591599},{{41,386},799102625},{{41,388},349645352},{{41,390},953856191},{{41,392},685505744},{{41,394},968883032},{{41,396},548153198},{{41,398},991972402},{{41,400},298640488},{{41,402},335784052},{{41,404},560792641},{{41,406},200482497},{{41,408},534424478},{{41,410},835919822},{{41,412},256133832},{{41,414},789502694},{{41,416},815463653},{{41,418},367192054},{{41,420},711296060},{{41,422},505894941},{{41,424},749371649},{{41,426},586599852},{{41,428},478956964},{{41,430},771301542},{{41,432},936596369},{{41,434},641013477},{{41,436},895880622},{{41,438},275251735},{{41,440},709512313},{{41,442},675062513},{{41,444},900057226},{{41,446},864601515},{{41,448},604121575},{{41,450},213439255},{{41,452},718556713},{{41,454},352300658},{{41,456},293209273},{{41,458},62461535},{{41,460},212741657},{{41,462},925233457},{{41,464},601757735},{{41,466},357273411},{{41,468},900952265},{{41,470},337965737},{{41,472},654516053},{{41,474},138964736},{{41,476},683012438},{{41,478},388413281},{{41,480},151113816},{{41,482},328964247},{{41,484},191920444},{{41,486},84786019},{{41,488},179152386},{{41,490},346561188},{{41,492},643354711},{{41,494},718267295},{{41,496},169193229},{{41,498},252223726},{{41,500},887596939},{{41,502},657097686},{{41,504},142103925},{{41,506},40078284},{{41,508},150004901},{{41,510},459569297},{{41,512},459199105},{{41,514},789641065},{{41,516},6481222},{{41,518},858687076},{{41,520},375816137},{{41,522},147145108},{{41,524},520309635},{{41,526},748217920},{{41,528},667457550},{{41,530},716254093},{{41,532},186260954},{{41,534},725808394},{{41,536},626037945},{{41,538},743543562},{{41,540},764478177},{{41,542},601933842},{{41,544},797462265},{{41,546},777370200},{{41,548},654651513},{{41,550},156072819},{{41,552},707272486},{{41,554},178868661},{{41,556},27986290},{{41,558},925976600},{{41,560},457000898},{{41,562},540704905},{{41,564},843382395},{{41,566},769084631},{{41,568},760118502},{{41,570},476552208},{{41,572},749317409},{{41,574},710185045},{{41,576},964800796},{{41,578},516878606},{{41,580},266237510},{{41,582},913933501},{{41,584},813693982},{{41,586},336046538},{{41,588},762072594},{{41,590},997287607},{{41,592},756174558},{{41,594},615699332},{{41,596},325935068},{{41,598},478725181},{{41,600},294206110},{{41,602},71125626},{{41,604},862744505},{{41,606},369229533},{{41,608},687983312},{{41,610},908265361},{{41,612},496504119},{{41,614},960935105},{{41,616},69879109},{{41,618},315010091},{{41,620},778995602},{{41,622},757128123},{{41,624},249975621},{{41,626},699329744},{{41,628},984761141},{{41,630},255696873},{{41,632},966070938},{{41,634},214893935},{{41,636},551564463},{{41,638},316442626},{{41,640},532269369},{{41,642},314110968},{{41,644},128028415},{{41,646},969165598},{{41,648},561496103},{{41,650},817486578},{{41,652},282697706},{{41,654},480617072},{{41,656},509205119},{{41,658},834540584},{{41,660},277705122},{{41,662},660874354},{{41,664},778117470},{{41,666},366056531},{{41,668},831243822},{{41,670},903068403},{{41,672},672944646},{{41,674},441340373},{{41,676},340680954},{{41,678},617276976},{{41,680},849516577},{{41,682},560088434},{{41,684},230800586},{{41,686},10428026},{{41,688},372559113},{{41,690},922230949},{{41,692},889642650},{{41,694},244184042},{{41,696},533938488},{{41,698},841639506},{{41,700},817920213},{{41,702},336934324},{{41,704},44823033},{{41,706},565545678},{{41,708},701086145},{{41,710},241957483},{{41,712},114182239},{{41,714},850726147},{{41,716},526783422},{{41,718},115816117},{{41,720},835376982},{{41,722},659266467},{{41,724},815849396},{{41,726},168028335},{{41,728},255187925},{{41,730},748491938},{{41,732},622185783},{{41,734},663040863},{{41,736},743392515},{{41,738},163408177},{{41,740},383060357},{{41,742},31556416},{{41,744},794030948},{{41,746},934245344},{{41,748},258437764},{{41,750},379321408},{{41,752},40236316},{{41,754},660469577},{{41,756},655665845},{{41,758},690942361},{{41,760},375378322},{{41,762},568352979},{{41,764},602028119},{{41,766},317437606},{{41,768},657543398},{{41,770},100015852},{{41,772},252684947},{{41,774},481051042},{{41,776},964341166},{{41,778},522946308},{{41,780},280791483},{{41,782},467949044},{{41,784},475945690},{{41,786},972019230},{{41,788},462068105},{{41,790},580258224},{{41,792},819125286},{{41,794},65219413},{{41,796},675919204},{{41,798},938373431},{{41,800},246074242},{{41,802},416112669},{{41,804},990084376},{{41,806},992206586},{{41,808},174382581},{{41,810},694468435},{{41,812},670357482},{{41,814},52707698},{{41,816},430228891},{{41,818},194064984},{{41,820},374269653},{{41,822},873105421},{{41,824},89789806},{{41,826},360326019},{{41,828},422866288},{{41,830},247972613},{{41,832},990139142},{{41,834},766813630},{{41,836},25619403},{{41,838},929658745},{{41,840},91230876},{{42,0},1},{{42,2},41},{{42,4},900},{{42,6},13936},{{42,8},169902},{{42,10},1729478},{{42,12},15241768},{{42,14},119176344},{{42,16},841399673},{{42,18},434809990},{{42,20},446105964},{{42,22},492649140},{{42,24},758977149},{{42,26},206041682},{{42,28},323715565},{{42,30},660084286},{{42,32},595902939},{{42,34},912996958},{{42,36},734408694},{{42,38},639760787},{{42,40},253066665},{{42,42},208103163},{{42,44},518638879},{{42,46},141246298},{{42,48},316067064},{{42,50},932295902},{{42,52},638352197},{{42,54},835906694},{{42,56},518593201},{{42,58},772224592},{{42,60},710767801},{{42,62},155069328},{{42,64},87760296},{{42,66},888628863},{{42,68},85616127},{{42,70},159719113},{{42,72},852745152},{{42,74},116208329},{{42,76},603162784},{{42,78},598162586},{{42,80},214665773},{{42,82},928212607},{{42,84},364268988},{{42,86},422947444},{{42,88},91651894},{{42,90},294508512},{{42,92},306449339},{{42,94},29129368},{{42,96},721764444},{{42,98},23720919},{{42,100},155935808},{{42,102},134434641},{{42,104},906918132},{{42,106},581645037},{{42,108},673925534},{{42,110},656820458},{{42,112},712140580},{{42,114},940311261},{{42,116},639783029},{{42,118},193680127},{{42,120},625191701},{{42,122},485391283},{{42,124},454129733},{{42,126},912047676},{{42,128},531795443},{{42,130},151893083},{{42,132},16212124},{{42,134},506754047},{{42,136},491882623},{{42,138},143293012},{{42,140},25311790},{{42,142},265858487},{{42,144},730580376},{{42,146},281408346},{{42,148},313354998},{{42,150},904477185},{{42,152},246774679},{{42,154},76212745},{{42,156},790588368},{{42,158},952519623},{{42,160},156839403},{{42,162},194467618},{{42,164},872887052},{{42,166},91963369},{{42,168},534129628},{{42,170},238356180},{{42,172},632320800},{{42,174},58443419},{{42,176},722943306},{{42,178},618550091},{{42,180},33518175},{{42,182},519583410},{{42,184},960079192},{{42,186},538023159},{{42,188},305123951},{{42,190},486152058},{{42,192},294482726},{{42,194},518323725},{{42,196},455607677},{{42,198},182021187},{{42,200},748135143},{{42,202},512410493},{{42,204},35362801},{{42,206},719659644},{{42,208},317014598},{{42,210},528329960},{{42,212},583008290},{{42,214},443175574},{{42,216},659178079},{{42,218},174647583},{{42,220},349497845},{{42,222},577399146},{{42,224},818913619},{{42,226},271472027},{{42,228},656817275},{{42,230},494680790},{{42,232},969710982},{{42,234},229444476},{{42,236},267631925},{{42,238},175671131},{{42,240},35511369},{{42,242},58752774},{{42,244},135202754},{{42,246},944159958},{{42,248},464206230},{{42,250},475819996},{{42,252},314325811},{{42,254},754861491},{{42,256},276808552},{{42,258},810159244},{{42,260},91192489},{{42,262},626570800},{{42,264},590621471},{{42,266},514780234},{{42,268},305537247},{{42,270},801654104},{{42,272},149383516},{{42,274},787215362},{{42,276},114530579},{{42,278},859617326},{{42,280},613074050},{{42,282},468568467},{{42,284},919259772},{{42,286},617744284},{{42,288},340905322},{{42,290},985953212},{{42,292},372028816},{{42,294},217079653},{{42,296},938494776},{{42,298},284906842},{{42,300},769978385},{{42,302},515786223},{{42,304},285120775},{{42,306},375534381},{{42,308},675385916},{{42,310},665832700},{{42,312},133450834},{{42,314},3874364},{{42,316},408375526},{{42,318},770616302},{{42,320},276273159},{{42,322},413928636},{{42,324},723794836},{{42,326},198571707},{{42,328},678091222},{{42,330},296508406},{{42,332},529916658},{{42,334},588863591},{{42,336},413257244},{{42,338},498474249},{{42,340},915935032},{{42,342},120501359},{{42,344},836927142},{{42,346},230121084},{{42,348},774509032},{{42,350},870826787},{{42,352},489996192},{{42,354},917057075},{{42,356},196187219},{{42,358},383821852},{{42,360},922336284},{{42,362},22274995},{{42,364},748507616},{{42,366},607632780},{{42,368},183109949},{{42,370},339998525},{{42,372},507933598},{{42,374},698781318},{{42,376},498085612},{{42,378},803731847},{{42,380},473820207},{{42,382},901546035},{{42,384},302928184},{{42,386},865394080},{{42,388},114078163},{{42,390},2199878},{{42,392},779942965},{{42,394},594445523},{{42,396},91527221},{{42,398},272107811},{{42,400},718335802},{{42,402},365412741},{{42,404},52329171},{{42,406},414520032},{{42,408},494974650},{{42,410},300177708},{{42,412},811610962},{{42,414},146810674},{{42,416},337728819},{{42,418},506402762},{{42,420},403329973},{{42,422},694340600},{{42,424},766854981},{{42,426},757139989},{{42,428},188368338},{{42,430},788752320},{{42,432},918847437},{{42,434},928046733},{{42,436},527551285},{{42,438},479184799},{{42,440},517252899},{{42,442},712149490},{{42,444},791491255},{{42,446},238449676},{{42,448},667119615},{{42,450},757940899},{{42,452},445679476},{{42,454},734062646},{{42,456},326185889},{{42,458},40504124},{{42,460},623294475},{{42,462},807102585},{{42,464},697275776},{{42,466},960233124},{{42,468},90479243},{{42,470},277423126},{{42,472},459856976},{{42,474},523164613},{{42,476},283246190},{{42,478},353589088},{{42,480},214300387},{{42,482},783487356},{{42,484},692462518},{{42,486},267488040},{{42,488},851918218},{{42,490},799153667},{{42,492},810257248},{{42,494},109085516},{{42,496},633189413},{{42,498},670646041},{{42,500},913414538},{{42,502},526057886},{{42,504},701571781},{{42,506},823895555},{{42,508},366072317},{{42,510},141394361},{{42,512},832809290},{{42,514},464577360},{{42,516},305577012},{{42,518},512815120},{{42,520},121404516},{{42,522},195457318},{{42,524},321946163},{{42,526},309097012},{{42,528},239601477},{{42,530},94799504},{{42,532},314416433},{{42,534},43085740},{{42,536},639634392},{{42,538},892727867},{{42,540},559091131},{{42,542},668748148},{{42,544},422889784},{{42,546},711508368},{{42,548},676630033},{{42,550},634668710},{{42,552},364293294},{{42,554},844937242},{{42,556},751071408},{{42,558},322260215},{{42,560},891789141},{{42,562},187899827},{{42,564},511558264},{{42,566},521391391},{{42,568},670781806},{{42,570},509672700},{{42,572},51147255},{{42,574},62331255},{{42,576},681097643},{{42,578},668432081},{{42,580},698715101},{{42,582},46454740},{{42,584},726474418},{{42,586},934462337},{{42,588},72103891},{{42,590},408373632},{{42,592},957100449},{{42,594},670661469},{{42,596},786800623},{{42,598},834620545},{{42,600},287400489},{{42,602},490496888},{{42,604},497846381},{{42,606},189806313},{{42,608},912940390},{{42,610},809020495},{{42,612},703284720},{{42,614},835793884},{{42,616},605744360},{{42,618},923348658},{{42,620},214377202},{{42,622},697918809},{{42,624},343995053},{{42,626},445012242},{{42,628},544883273},{{42,630},475774494},{{42,632},73159748},{{42,634},664916820},{{42,636},945806189},{{42,638},388033609},{{42,640},184443581},{{42,642},891139166},{{42,644},132967061},{{42,646},662232592},{{42,648},630310273},{{42,650},296941879},{{42,652},926467100},{{42,654},732662520},{{42,656},755030683},{{42,658},373067237},{{42,660},200501225},{{42,662},132039597},{{42,664},621016442},{{42,666},864116597},{{42,668},199168443},{{42,670},229224627},{{42,672},19895297},{{42,674},392227721},{{42,676},512572983},{{42,678},888183257},{{42,680},954225811},{{42,682},362992884},{{42,684},408318299},{{42,686},664465052},{{42,688},828120392},{{42,690},703374891},{{42,692},61248349},{{42,694},16358204},{{42,696},241119413},{{42,698},30565637},{{42,700},838212406},{{42,702},921697699},{{42,704},543334430},{{42,706},89858526},{{42,708},273185879},{{42,710},355471309},{{42,712},304528048},{{42,714},507574008},{{42,716},476038937},{{42,718},789196651},{{42,720},57644735},{{42,722},932966132},{{42,724},292240565},{{42,726},284284800},{{42,728},198355642},{{42,730},844613937},{{42,732},375170024},{{42,734},881957600},{{42,736},108981244},{{42,738},644631978},{{42,740},730251746},{{42,742},563646094},{{42,744},15703371},{{42,746},891969119},{{42,748},462467018},{{42,750},842418885},{{42,752},184776107},{{42,754},20489508},{{42,756},525173823},{{42,758},93913531},{{42,760},199936707},{{42,762},49296883},{{42,764},500271791},{{42,766},9386940},{{42,768},42793104},{{42,770},102301079},{{42,772},299925062},{{42,774},242848544},{{42,776},157270543},{{42,778},567750735},{{42,780},512260765},{{42,782},540910896},{{42,784},473863432},{{42,786},123756576},{{42,788},867793612},{{42,790},940752336},{{42,792},189701376},{{42,794},338838501},{{42,796},163690216},{{42,798},120916067},{{42,800},790468763},{{42,802},680974009},{{42,804},939542025},{{42,806},299064055},{{42,808},752326705},{{42,810},668302564},{{42,812},775312490},{{42,814},929999123},{{42,816},713601128},{{42,818},593704708},{{42,820},595301628},{{42,822},539445680},{{42,824},220384571},{{42,826},492539730},{{42,828},572951883},{{42,830},264745653},{{42,832},946510661},{{42,834},751486844},{{42,836},372815432},{{42,838},445849920},{{42,840},481560920},{{42,842},887629330},{{42,844},46438187},{{42,846},433046906},{{42,848},550746520},{{42,850},68280122},{{42,852},549536967},{{42,854},98170304},{{42,856},942092421},{{42,858},657076175},{{42,860},85959544},{{42,862},736296914},{{42,864},244774210},{{42,866},196059783},{{42,868},968298850},{{42,870},183375217},{{42,872},810099519},{{42,874},413635020},{{42,876},636120983},{{42,878},396309504},{{42,880},740465895},{{42,882},371532101},{{43,0},1},{{43,2},42},{{43,4},943},{{43,6},14920},{{43,8},185722},{{43,10},1929132},{{43,12},17340642},{{43,14},138243024},{{43,16},994832181},{{43,18},548192008},{{43,20},829424358},{{43,22},702470585},{{43,24},488681655},{{43,26},275370643},{{43,28},835638795},{{43,30},810867407},{{43,32},286977068},{{43,34},950047225},{{43,36},83539435},{{43,38},44629372},{{43,40},288790619},{{43,42},507410843},{{43,44},264046736},{{43,46},483012816},{{43,48},672138691},{{43,50},875194556},{{43,52},651203850},{{43,54},66911617},{{43,56},918075656},{{43,58},674825734},{{43,60},94581776},{{43,62},415282344},{{43,64},303997379},{{43,66},819537616},{{43,68},622429217},{{43,70},698967413},{{43,72},751254549},{{43,74},420414807},{{43,76},687830513},{{43,78},601402264},{{43,80},434289505},{{43,82},724948167},{{43,84},754889253},{{43,86},808542135},{{43,88},995391960},{{43,90},178813332},{{43,92},724416372},{{43,94},177739106},{{43,96},814105099},{{43,98},753597104},{{43,100},45856871},{{43,102},272275296},{{43,104},786414287},{{43,106},511285559},{{43,108},160720229},{{43,110},317562390},{{43,112},790336119},{{43,114},868224061},{{43,116},359611251},{{43,118},78736463},{{43,120},773457035},{{43,122},927802445},{{43,124},421722380},{{43,126},116775238},{{43,128},364696053},{{43,130},502866895},{{43,132},626441652},{{43,134},490807991},{{43,136},713262576},{{43,138},797949369},{{43,140},598695934},{{43,142},260170588},{{43,144},82830001},{{43,146},494545919},{{43,148},272206045},{{43,150},443643728},{{43,152},598266021},{{43,154},33015507},{{43,156},884148700},{{43,158},307476402},{{43,160},959867411},{{43,162},216334812},{{43,164},800291904},{{43,166},985570368},{{43,168},488188448},{{43,170},107147695},{{43,172},538136243},{{43,174},662412600},{{43,176},979298525},{{43,178},134498654},{{43,180},226734918},{{43,182},727004323},{{43,184},749341953},{{43,186},119616289},{{43,188},344235011},{{43,190},179701806},{{43,192},771727176},{{43,194},867138213},{{43,196},462181714},{{43,198},886155872},{{43,200},120844409},{{43,202},637609736},{{43,204},732957723},{{43,206},950929297},{{43,208},917858187},{{43,210},787591285},{{43,212},658307576},{{43,214},752393246},{{43,216},363474545},{{43,218},410621001},{{43,220},994736846},{{43,222},177814531},{{43,224},780475306},{{43,226},862888709},{{43,228},592093607},{{43,230},579502147},{{43,232},557845688},{{43,234},288775481},{{43,236},603183203},{{43,238},577960148},{{43,240},788283409},{{43,242},673824051},{{43,244},683888139},{{43,246},877184660},{{43,248},633236685},{{43,250},114600324},{{43,252},443874806},{{43,254},243845462},{{43,256},737247494},{{43,258},816215602},{{43,260},301818289},{{43,262},678209727},{{43,264},613605938},{{43,266},858234475},{{43,268},818583083},{{43,270},638002191},{{43,272},955539556},{{43,274},166659792},{{43,276},402119583},{{43,278},136117938},{{43,280},121601666},{{43,282},755992562},{{43,284},47984728},{{43,286},295575049},{{43,288},499852111},{{43,290},307179145},{{43,292},332974068},{{43,294},315732357},{{43,296},716712867},{{43,298},640162541},{{43,300},867854182},{{43,302},934376752},{{43,304},313718034},{{43,306},59903781},{{43,308},946384843},{{43,310},119557570},{{43,312},525136020},{{43,314},151571916},{{43,316},798992199},{{43,318},641098837},{{43,320},260839275},{{43,322},993458171},{{43,324},824535499},{{43,326},355644177},{{43,328},761912070},{{43,330},816737774},{{43,332},16159145},{{43,334},269418274},{{43,336},606453921},{{43,338},360745230},{{43,340},8968332},{{43,342},697762673},{{43,344},987763777},{{43,346},660889863},{{43,348},735951723},{{43,350},644168107},{{43,352},694447061},{{43,354},112348183},{{43,356},530007620},{{43,358},3042837},{{43,360},764274326},{{43,362},848173528},{{43,364},194620935},{{43,366},635775962},{{43,368},259196720},{{43,370},713828904},{{43,372},940082694},{{43,374},457694335},{{43,376},838811079},{{43,378},742877821},{{43,380},825043434},{{43,382},999682813},{{43,384},323541591},{{43,386},50872352},{{43,388},337477908},{{43,390},513975090},{{43,392},485543671},{{43,394},991738379},{{43,396},437900643},{{43,398},771900426},{{43,400},686428428},{{43,402},563411325},{{43,404},914169111},{{43,406},935692665},{{43,408},43568184},{{43,410},490175371},{{43,412},749564693},{{43,414},101137943},{{43,416},245839802},{{43,418},603981104},{{43,420},626386341},{{43,422},386920859},{{43,424},413292672},{{43,426},913439917},{{43,428},70347116},{{43,430},434898910},{{43,432},144090153},{{43,434},824132212},{{43,436},891175519},{{43,438},132402569},{{43,440},347193520},{{43,442},969072546},{{43,444},16729602},{{43,446},608672301},{{43,448},618817500},{{43,450},911982521},{{43,452},688615529},{{43,454},732174336},{{43,456},500282116},{{43,458},497352932},{{43,460},456415575},{{43,462},878875953},{{43,464},316115544},{{43,466},915703538},{{43,468},598465482},{{43,470},596140294},{{43,472},730305232},{{43,474},164832432},{{43,476},897815573},{{43,478},166896959},{{43,480},324516472},{{43,482},764718824},{{43,484},566396641},{{43,486},914517008},{{43,488},874306816},{{43,490},779763109},{{43,492},852306547},{{43,494},611269114},{{43,496},292511571},{{43,498},915381300},{{43,500},758955270},{{43,502},257373679},{{43,504},74625589},{{43,506},121789415},{{43,508},230596845},{{43,510},205840454},{{43,512},916544901},{{43,514},23902587},{{43,516},416402779},{{43,518},293269031},{{43,520},510816400},{{43,522},975368660},{{43,524},955188220},{{43,526},72244504},{{43,528},561311434},{{43,530},137072009},{{43,532},127537010},{{43,534},860723336},{{43,536},883260674},{{43,538},394382836},{{43,540},913512596},{{43,542},497775666},{{43,544},206616201},{{43,546},483790701},{{43,548},11643758},{{43,550},543373789},{{43,552},107216374},{{43,554},536706614},{{43,556},345207484},{{43,558},197739695},{{43,560},416959310},{{43,562},802020491},{{43,564},883579389},{{43,566},155472766},{{43,568},707726533},{{43,570},878636875},{{43,572},137339984},{{43,574},387604391},{{43,576},170286771},{{43,578},862464509},{{43,580},93116703},{{43,582},698306089},{{43,584},277231574},{{43,586},157624181},{{43,588},518482505},{{43,590},545923209},{{43,592},301838767},{{43,594},429107456},{{43,596},65466197},{{43,598},400869145},{{43,600},603396151},{{43,602},201146053},{{43,604},29560436},{{43,606},908247428},{{43,608},740900666},{{43,610},645622178},{{43,612},468181946},{{43,614},182006817},{{43,616},585006092},{{43,618},39427009},{{43,620},901513909},{{43,622},575103140},{{43,624},643739693},{{43,626},969005418},{{43,628},413112711},{{43,630},121940507},{{43,632},949419798},{{43,634},274176335},{{43,636},533655948},{{43,638},73448571},{{43,640},447893873},{{43,642},303200166},{{43,644},406062958},{{43,646},327948494},{{43,648},399154885},{{43,650},680966803},{{43,652},676784794},{{43,654},346165530},{{43,656},118434942},{{43,658},634041854},{{43,660},219847494},{{43,662},927409557},{{43,664},731595298},{{43,666},204066166},{{43,668},484721091},{{43,670},397391612},{{43,672},62697528},{{43,674},613046235},{{43,676},363210072},{{43,678},588627148},{{43,680},359818291},{{43,682},176675393},{{43,684},710790103},{{43,686},31891420},{{43,688},193284227},{{43,690},13322649},{{43,692},80677012},{{43,694},364175866},{{43,696},156203486},{{43,698},303397217},{{43,700},540753075},{{43,702},969185318},{{43,704},762928705},{{43,706},479974322},{{43,708},873609278},{{43,710},714679223},{{43,712},243389411},{{43,714},893917661},{{43,716},730412727},{{43,718},540295939},{{43,720},380888528},{{43,722},199480073},{{43,724},111615382},{{43,726},501213077},{{43,728},699982545},{{43,730},83674978},{{43,732},340471893},{{43,734},589623231},{{43,736},135448371},{{43,738},354059110},{{43,740},416125008},{{43,742},490338358},{{43,744},869847423},{{43,746},644581498},{{43,748},153365962},{{43,750},261322947},{{43,752},680966984},{{43,754},400282844},{{43,756},542955010},{{43,758},604680600},{{43,760},412088220},{{43,762},680278649},{{43,764},139286485},{{43,766},860834305},{{43,768},469429775},{{43,770},280658323},{{43,772},253030904},{{43,774},2560916},{{43,776},10309871},{{43,778},297479762},{{43,780},823144855},{{43,782},871982081},{{43,784},47058346},{{43,786},963847165},{{43,788},382927224},{{43,790},356584190},{{43,792},324565827},{{43,794},306141977},{{43,796},910279795},{{43,798},453817674},{{43,800},601981427},{{43,802},979339306},{{43,804},222338413},{{43,806},904561649},{{43,808},382529080},{{43,810},408856660},{{43,812},854658577},{{43,814},411827225},{{43,816},670817056},{{43,818},827144476},{{43,820},223389693},{{43,822},471934610},{{43,824},930635535},{{43,826},587441381},{{43,828},722797748},{{43,830},95690794},{{43,832},663628478},{{43,834},287716698},{{43,836},646651719},{{43,838},701670514},{{43,840},288321331},{{43,842},90367689},{{43,844},303151955},{{43,846},540716833},{{43,848},449495113},{{43,850},614473847},{{43,852},768187147},{{43,854},779428778},{{43,856},859329178},{{43,858},317839203},{{43,860},24311574},{{43,862},208713726},{{43,864},534909824},{{43,866},569617669},{{43,868},779723332},{{43,870},951823587},{{43,872},262620278},{{43,874},508684571},{{43,876},644816282},{{43,878},124674019},{{43,880},369884532},{{43,882},146396384},{{43,884},993989514},{{43,886},828097325},{{43,888},353947367},{{43,890},356630001},{{43,892},483119775},{{43,894},36683277},{{43,896},829372562},{{43,898},480348153},{{43,900},416969202},{{43,902},237164413},{{43,904},917166508},{{43,906},673670902},{{43,908},955993972},{{43,910},550159722},{{43,912},115253791},{{43,914},571208381},{{43,916},883450110},{{43,918},234414978},{{43,920},338605160},{{43,922},465632072},{{43,924},975880238},{{44,0},1},{{44,2},43},{{44,4},987},{{44,6},15949},{{44,8},202614},{{44,10},2146662},{{44,12},19672862},{{44,14},159841410},{{44,16},171958174},{{44,18},857707214},{{44,20},674952199},{{44,22},863564473},{{44,24},694487987},{{44,26},218927913},{{44,28},150857334},{{44,30},64522123},{{44,32},242512102},{{44,34},726888439},{{44,36},233627107},{{44,38},811786714},{{44,40},114239005},{{44,42},343074532},{{44,44},372330107},{{44,46},720689358},{{44,48},467711835},{{44,50},904517093},{{44,52},48140523},{{44,54},445520536},{{44,56},151023837},{{44,58},477389409},{{44,60},167654505},{{44,62},524330326},{{44,64},826025786},{{44,66},750662832},{{44,68},873751815},{{44,70},63739722},{{44,72},191556854},{{44,74},667326112},{{44,76},50500515},{{44,78},441625511},{{44,80},782830742},{{44,82},400734038},{{44,84},564497630},{{44,86},921910383},{{44,88},845548941},{{44,90},368028935},{{44,92},749018447},{{44,94},103585045},{{44,96},796556849},{{44,98},628596101},{{44,100},868979841},{{44,102},539520158},{{44,104},627354569},{{44,106},90231323},{{44,108},417433082},{{44,110},56768496},{{44,112},355579497},{{44,114},422451590},{{44,116},886349503},{{44,118},72956900},{{44,120},803725461},{{44,122},415871073},{{44,124},683643384},{{44,126},621063238},{{44,128},193330057},{{44,130},325926450},{{44,132},277754812},{{44,134},24871409},{{44,136},448472012},{{44,138},886190243},{{44,140},823962291},{{44,142},441987145},{{44,144},894908057},{{44,146},837390023},{{44,148},862747763},{{44,150},91512877},{{44,152},722912649},{{44,154},93349481},{{44,156},545810047},{{44,158},913016979},{{44,160},515556016},{{44,162},298546360},{{44,164},734212089},{{44,166},844284728},{{44,168},136068973},{{44,170},71028614},{{44,172},122223407},{{44,174},751306630},{{44,176},44843394},{{44,178},423748616},{{44,180},386401231},{{44,182},812571458},{{44,184},811253207},{{44,186},883210298},{{44,188},108253088},{{44,190},777750730},{{44,192},94398075},{{44,194},357510258},{{44,196},341016668},{{44,198},444595182},{{44,200},421469474},{{44,202},846006439},{{44,204},697364303},{{44,206},430219357},{{44,208},145159},{{44,210},329923811},{{44,212},555736286},{{44,214},145037472},{{44,216},50858159},{{44,218},758063180},{{44,220},409311835},{{44,222},199515197},{{44,224},849732459},{{44,226},429458586},{{44,228},110831608},{{44,230},601311986},{{44,232},405029768},{{44,234},899721594},{{44,236},362036575},{{44,238},3616348},{{44,240},447767827},{{44,242},718164293},{{44,244},455022502},{{44,246},154627334},{{44,248},632024645},{{44,250},923207902},{{44,252},841801838},{{44,254},418932384},{{44,256},595460287},{{44,258},460605434},{{44,260},188513457},{{44,262},767682601},{{44,264},51793196},{{44,266},194981425},{{44,268},929803954},{{44,270},504733978},{{44,272},22197692},{{44,274},870666331},{{44,276},333136663},{{44,278},819520200},{{44,280},530915500},{{44,282},599537526},{{44,284},53266589},{{44,286},48676597},{{44,288},387019415},{{44,290},413134249},{{44,292},89916173},{{44,294},988538195},{{44,296},741237674},{{44,298},580557472},{{44,300},340811443},{{44,302},13472882},{{44,304},840030352},{{44,306},781975641},{{44,308},296220934},{{44,310},702357371},{{44,312},942050407},{{44,314},935085214},{{44,316},845987731},{{44,318},799577627},{{44,320},872670633},{{44,322},692587304},{{44,324},440284632},{{44,326},702895036},{{44,328},10589510},{{44,330},109084537},{{44,332},901549736},{{44,334},680965380},{{44,336},523560865},{{44,338},14608855},{{44,340},766098800},{{44,342},955736031},{{44,344},229070295},{{44,346},918139336},{{44,348},762087315},{{44,350},15060087},{{44,352},769624318},{{44,354},210516326},{{44,356},269537431},{{44,358},932448778},{{44,360},651446512},{{44,362},367308406},{{44,364},624037144},{{44,366},927670291},{{44,368},415521073},{{44,370},854675140},{{44,372},947034643},{{44,374},395133007},{{44,376},858104556},{{44,378},792426709},{{44,380},918444166},{{44,382},282314711},{{44,384},96653546},{{44,386},423079321},{{44,388},469451942},{{44,390},792999037},{{44,392},308400615},{{44,394},330587501},{{44,396},691818222},{{44,398},53917678},{{44,400},568461122},{{44,402},362577365},{{44,404},775464857},{{44,406},904714011},{{44,408},845440210},{{44,410},795470521},{{44,412},568880508},{{44,414},666239878},{{44,416},183860147},{{44,418},125507811},{{44,420},545400921},{{44,422},401495311},{{44,424},3467092},{{44,426},430876347},{{44,428},332849310},{{44,430},96436924},{{44,432},957680475},{{44,434},836934713},{{44,436},150232592},{{44,438},891109199},{{44,440},995835861},{{44,442},145792868},{{44,444},255284669},{{44,446},853681633},{{44,448},801676454},{{44,450},45857933},{{44,452},127560794},{{44,454},137690320},{{44,456},534209092},{{44,458},436059291},{{44,460},890838261},{{44,462},134212816},{{44,464},302504982},{{44,466},936257832},{{44,468},761720727},{{44,470},269396963},{{44,472},28197218},{{44,474},59083210},{{44,476},947207164},{{44,478},442972791},{{44,480},384169121},{{44,482},488722025},{{44,484},351406087},{{44,486},443097712},{{44,488},82956552},{{44,490},698141640},{{44,492},145942108},{{44,494},188889308},{{44,496},734290094},{{44,498},387705377},{{44,500},912805029},{{44,502},973822420},{{44,504},47485510},{{44,506},507370861},{{44,508},221674431},{{44,510},786661915},{{44,512},91335607},{{44,514},856760661},{{44,516},173031704},{{44,518},864904090},{{44,520},599152735},{{44,522},495185408},{{44,524},938099393},{{44,526},556362344},{{44,528},990758140},{{44,530},995900803},{{44,532},254599934},{{44,534},462199704},{{44,536},5008078},{{44,538},665636661},{{44,540},527028350},{{44,542},642386127},{{44,544},1829553},{{44,546},551952980},{{44,548},424017355},{{44,550},108488740},{{44,552},701380336},{{44,554},806666866},{{44,556},700141562},{{44,558},59441909},{{44,560},362171728},{{44,562},894757457},{{44,564},445400929},{{44,566},773238426},{{44,568},127546419},{{44,570},723395394},{{44,572},338826564},{{44,574},332919619},{{44,576},340737249},{{44,578},850054615},{{44,580},184058121},{{44,582},13063831},{{44,584},278558952},{{44,586},698063140},{{44,588},498777528},{{44,590},72607237},{{44,592},345269132},{{44,594},902279995},{{44,596},183690503},{{44,598},772520236},{{44,600},708689187},{{44,602},233896476},{{44,604},458831695},{{44,606},230994551},{{44,608},41124197},{{44,610},206351350},{{44,612},689101399},{{44,614},262700029},{{44,616},620939252},{{44,618},892377787},{{44,620},428085255},{{44,622},694339277},{{44,624},213848040},{{44,626},916329377},{{44,628},192795757},{{44,630},474268014},{{44,632},561285670},{{44,634},220016093},{{44,636},638297144},{{44,638},193877561},{{44,640},647642810},{{44,642},64716523},{{44,644},5417153},{{44,646},709160560},{{44,648},438820650},{{44,650},471896153},{{44,652},456049785},{{44,654},424945489},{{44,656},102312939},{{44,658},179871925},{{44,660},155527933},{{44,662},66018018},{{44,664},519349428},{{44,666},575834851},{{44,668},366155295},{{44,670},196027859},{{44,672},709388961},{{44,674},444696414},{{44,676},108229719},{{44,678},111474967},{{44,680},169464130},{{44,682},765045351},{{44,684},916818004},{{44,686},674916990},{{44,688},958919968},{{44,690},932259128},{{44,692},849009441},{{44,694},829390390},{{44,696},846317162},{{44,698},253991616},{{44,700},482990034},{{44,702},163822353},{{44,704},775754269},{{44,706},532037321},{{44,708},49173712},{{44,710},212326050},{{44,712},301906174},{{44,714},678424573},{{44,716},534302771},{{44,718},375782334},{{44,720},160287870},{{44,722},855370313},{{44,724},341617592},{{44,726},25457804},{{44,728},708941176},{{44,730},246832732},{{44,732},903916100},{{44,734},546588049},{{44,736},96029971},{{44,738},706821232},{{44,740},940560978},{{44,742},101534792},{{44,744},337492719},{{44,746},856837601},{{44,748},613769045},{{44,750},707646199},{{44,752},812028723},{{44,754},616833643},{{44,756},679800396},{{44,758},535428679},{{44,760},224426630},{{44,762},413895724},{{44,764},784683428},{{44,766},431644219},{{44,768},111092914},{{44,770},661756720},{{44,772},639659700},{{44,774},41894591},{{44,776},68359952},{{44,778},43802473},{{44,780},952730000},{{44,782},823133424},{{44,784},376059765},{{44,786},707785553},{{44,788},822330735},{{44,790},771301262},{{44,792},948220958},{{44,794},908479296},{{44,796},864547297},{{44,798},515908783},{{44,800},27167717},{{44,802},175015260},{{44,804},401476125},{{44,806},721945851},{{44,808},298498970},{{44,810},707819205},{{44,812},838011772},{{44,814},889483594},{{44,816},356594984},{{44,818},693435347},{{44,820},967781679},{{44,822},401435494},{{44,824},355846180},{{44,826},333596320},{{44,828},628919505},{{44,830},303558980},{{44,832},984974994},{{44,834},113643042},{{44,836},89409518},{{44,838},612893129},{{44,840},122412730},{{44,842},114900098},{{44,844},810658251},{{44,846},247580260},{{44,848},945287301},{{44,850},609126629},{{44,852},492005778},{{44,854},772356444},{{44,856},361927818},{{44,858},440145503},{{44,860},858752994},{{44,862},174471327},{{44,864},210890472},{{44,866},769016792},{{44,868},638211867},{{44,870},546015263},{{44,872},377533141},{{44,874},892710683},{{44,876},705066724},{{44,878},412035898},{{44,880},913706912},{{44,882},989583745},{{44,884},102815427},{{44,886},296051463},{{44,888},435828877},{{44,890},627348761},{{44,892},994079761},{{44,894},369313875},{{44,896},909339708},{{44,898},172995194},{{44,900},816793393},{{44,902},474860389},{{44,904},821690532},{{44,906},962160124},{{44,908},246051373},{{44,910},970475428},{{44,912},561698902},{{44,914},165844443},{{44,916},708639335},{{44,918},918973613},{{44,920},861542417},{{44,922},207950600},{{44,924},197794802},{{44,926},563223285},{{44,928},448456804},{{44,930},787570186},{{44,932},926930606},{{44,934},566070711},{{44,936},279041721},{{44,938},162328562},{{44,940},287318056},{{44,942},191225488},{{44,944},14318341},{{44,946},585550504},{{44,948},409974535},{{44,950},697728497},{{44,952},891226405},{{44,954},200433586},{{44,956},381575055},{{44,958},638337683},{{44,960},483277973},{{44,962},755030264},{{44,964},867834356},{{44,966},962849947},{{44,968},821535631},{{45,0},1},{{45,2},44},{{45,4},1032},{{45,6},17024},{{45,8},220625},{{45,10},2383232},{{45,12},22258540},{{45,14},184242832},{{45,16},375813872},{{45,18},392612893},{{45,20},231706087},{{45,22},882424931},{{45,24},687132034},{{45,26},689650073},{{45,28},577977876},{{45,30},303878988},{{45,32},24310937},{{45,34},406963663},{{45,36},625468735},{{45,38},582435950},{{45,40},41660062},{{45,42},421950986},{{45,44},98962940},{{45,46},938709884},{{45,48},758565048},{{45,50},969234571},{{45,52},703952131},{{45,54},900436492},{{45,56},658647225},{{45,58},285611947},{{45,60},399326780},{{45,62},419454732},{{45,64},205387170},{{45,66},983950227},{{45,68},49990302},{{45,70},189001672},{{45,72},62673927},{{45,74},586296391},{{45,76},184361166},{{45,78},506353667},{{45,80},438069708},{{45,82},256171907},{{45,84},825943859},{{45,86},951340167},{{45,88},368115756},{{45,90},522855639},{{45,92},198647246},{{45,94},263328246},{{45,96},450011807},{{45,98},434855284},{{45,100},725807775},{{45,102},648411666},{{45,104},18383140},{{45,106},128787399},{{45,108},387148373},{{45,110},905324825},{{45,112},158891954},{{45,114},656234845},{{45,116},213026076},{{45,118},490012707},{{45,120},365468167},{{45,122},200221292},{{45,124},298615515},{{45,126},290107567},{{45,128},35072337},{{45,130},317672326},{{45,132},60118064},{{45,134},676291945},{{45,136},898619095},{{45,138},494511021},{{45,140},35193707},{{45,142},681989460},{{45,144},255539191},{{45,146},6318676},{{45,148},181981289},{{45,150},309123618},{{45,152},769843578},{{45,154},942743189},{{45,156},29734288},{{45,158},954472400},{{45,160},463236670},{{45,162},747980714},{{45,164},175643037},{{45,166},260101113},{{45,168},77874147},{{45,170},589524374},{{45,172},710018290},{{45,174},567729062},{{45,176},854908844},{{45,178},767838566},{{45,180},521233813},{{45,182},535397022},{{45,184},395450772},{{45,186},519565978},{{45,188},430844324},{{45,190},691804767},{{45,192},750969410},{{45,194},915664434},{{45,196},335442962},{{45,198},327801393},{{45,200},599337662},{{45,202},151524696},{{45,204},372580414},{{45,206},756807473},{{45,208},202845724},{{45,210},578628778},{{45,212},324772867},{{45,214},495203100},{{45,216},594805038},{{45,218},176866440},{{45,220},134364432},{{45,222},797477913},{{45,224},981614510},{{45,226},128692174},{{45,228},938852792},{{45,230},42148884},{{45,232},122641852},{{45,234},370944239},{{45,236},473851910},{{45,238},935488807},{{45,240},532851475},{{45,242},689984371},{{45,244},438315593},{{45,246},696398812},{{45,248},66001022},{{45,250},428174065},{{45,252},54501471},{{45,254},80878480},{{45,256},666016821},{{45,258},47295976},{{45,260},813797397},{{45,262},317765605},{{45,264},714997505},{{45,266},258919731},{{45,268},82884010},{{45,270},661027522},{{45,272},582655484},{{45,274},361252385},{{45,276},24311003},{{45,278},432884688},{{45,280},368733632},{{45,282},23821090},{{45,284},792526029},{{45,286},846601436},{{45,288},536812192},{{45,290},29313630},{{45,292},382435159},{{45,294},426147993},{{45,296},517181759},{{45,298},645690342},{{45,300},270896281},{{45,302},775661220},{{45,304},283600768},{{45,306},240876557},{{45,308},135665693},{{45,310},104458079},{{45,312},616729602},{{45,314},497103691},{{45,316},828815240},{{45,318},86098789},{{45,320},998656307},{{45,322},754065783},{{45,324},488969594},{{45,326},91503702},{{45,328},52278308},{{45,330},883359011},{{45,332},733253122},{{45,334},448869387},{{45,336},985543203},{{45,338},116773170},{{45,340},582006344},{{45,342},860482711},{{45,344},481797421},{{45,346},498040658},{{45,348},240829616},{{45,350},836032529},{{45,352},195942841},{{45,354},508465042},{{45,356},970760583},{{45,358},262117458},{{45,360},515914406},{{45,362},802808161},{{45,364},784332475},{{45,366},374122343},{{45,368},146224696},{{45,370},841597534},{{45,372},586439935},{{45,374},244148601},{{45,376},788204315},{{45,378},767547799},{{45,380},776362337},{{45,382},510076278},{{45,384},624681830},{{45,386},364806405},{{45,388},36907700},{{45,390},539421266},{{45,392},800828005},{{45,394},512242954},{{45,396},899834647},{{45,398},163376162},{{45,400},50294413},{{45,402},18654970},{{45,404},84289561},{{45,406},55576943},{{45,408},421249957},{{45,410},34930346},{{45,412},752291330},{{45,414},162276973},{{45,416},265235612},{{45,418},648593820},{{45,420},174309283},{{45,422},472188614},{{45,424},715911113},{{45,426},367773012},{{45,428},121970433},{{45,430},269868616},{{45,432},883985007},{{45,434},980070897},{{45,436},514347496},{{45,438},412293057},{{45,440},574601560},{{45,442},116830355},{{45,444},45453500},{{45,446},562859501},{{45,448},189078677},{{45,450},827602581},{{45,452},712444490},{{45,454},316586780},{{45,456},733065979},{{45,458},840949184},{{45,460},60074648},{{45,462},135398686},{{45,464},424428452},{{45,466},321968689},{{45,468},410040315},{{45,470},273128858},{{45,472},471407472},{{45,474},574966766},{{45,476},873880166},{{45,478},875045586},{{45,480},51088331},{{45,482},163730111},{{45,484},878321231},{{45,486},726127318},{{45,488},966070068},{{45,490},992549896},{{45,492},363335253},{{45,494},89848987},{{45,496},723352311},{{45,498},66759579},{{45,500},406269326},{{45,502},227087300},{{45,504},150259572},{{45,506},36586234},{{45,508},121181736},{{45,510},671327424},{{45,512},433664784},{{45,514},948164313},{{45,516},657988535},{{45,518},451431758},{{45,520},352880293},{{45,522},341991927},{{45,524},179834471},{{45,526},17796695},{{45,528},709446365},{{45,530},576526708},{{45,532},534876965},{{45,534},620591563},{{45,536},749402589},{{45,538},628280366},{{45,540},213414310},{{45,542},982746106},{{45,544},780180633},{{45,546},458647121},{{45,548},527146575},{{45,550},210950823},{{45,552},363805011},{{45,554},571210392},{{45,556},912463620},{{45,558},153315485},{{45,560},532024632},{{45,562},427468951},{{45,564},230879114},{{45,566},869803861},{{45,568},964025520},{{45,570},480715223},{{45,572},895116735},{{45,574},766188327},{{45,576},419338263},{{45,578},475074013},{{45,580},158183698},{{45,582},899486620},{{45,584},551866464},{{45,586},830407504},{{45,588},385674668},{{45,590},305150124},{{45,592},25769566},{{45,594},438519248},{{45,596},46473036},{{45,598},427624180},{{45,600},723264512},{{45,602},651472006},{{45,604},264633252},{{45,606},457374493},{{45,608},476392005},{{45,610},982968243},{{45,612},594462543},{{45,614},141658727},{{45,616},489344824},{{45,618},433530156},{{45,620},442633667},{{45,622},193279091},{{45,624},506366676},{{45,626},618868695},{{45,628},731227096},{{45,630},902261819},{{45,632},499005142},{{45,634},38842574},{{45,636},647293009},{{45,638},470120821},{{45,640},963932040},{{45,642},826530559},{{45,644},427769181},{{45,646},52186234},{{45,648},243569284},{{45,650},806914289},{{45,652},77294303},{{45,654},605077946},{{45,656},125786816},{{45,658},193185124},{{45,660},669741115},{{45,662},146483601},{{45,664},421911450},{{45,666},244025223},{{45,668},607708016},{{45,670},920909811},{{45,672},503255382},{{45,674},458139691},{{45,676},962827176},{{45,678},614853461},{{45,680},60315827},{{45,682},350564197},{{45,684},429760397},{{45,686},252570002},{{45,688},854719144},{{45,690},336843776},{{45,692},342192419},{{45,694},596659989},{{45,696},924243516},{{45,698},172320579},{{45,700},980212083},{{45,702},387574794},{{45,704},749118912},{{45,706},796421442},{{45,708},338721201},{{45,710},731277700},{{45,712},423355068},{{45,714},842226704},{{45,716},398877706},{{45,718},643899462},{{45,720},276311394},{{45,722},413568057},{{45,724},530987554},{{45,726},558156380},{{45,728},825270018},{{45,730},71652153},{{45,732},764304967},{{45,734},575174245},{{45,736},41877959},{{45,738},189656159},{{45,740},729954858},{{45,742},472722511},{{45,744},759829544},{{45,746},285982254},{{45,748},921037034},{{45,750},543320666},{{45,752},873711613},{{45,754},829723375},{{45,756},146980729},{{45,758},88768980},{{45,760},242470712},{{45,762},9284436},{{45,764},325379730},{{45,766},426922557},{{45,768},253585643},{{45,770},473459335},{{45,772},496125795},{{45,774},212116723},{{45,776},579959160},{{45,778},525505189},{{45,780},681915634},{{45,782},797942363},{{45,784},691505794},{{45,786},454823298},{{45,788},342255990},{{45,790},994255712},{{45,792},284908161},{{45,794},275004161},{{45,796},935102263},{{45,798},472107098},{{45,800},948357256},{{45,802},856671615},{{45,804},528973823},{{45,806},649773881},{{45,808},963952149},{{45,810},308388016},{{45,812},911396221},{{45,814},251193820},{{45,816},721175020},{{45,818},199750213},{{45,820},907595892},{{45,822},491208059},{{45,824},66513541},{{45,826},911357998},{{45,828},28185931},{{45,830},408941602},{{45,832},745821213},{{45,834},601730782},{{45,836},8869191},{{45,838},260152446},{{45,840},11616084},{{45,842},492782894},{{45,844},282010506},{{45,846},115926945},{{45,848},586669273},{{45,850},760307966},{{45,852},135350671},{{45,854},730510115},{{45,856},701832702},{{45,858},230080848},{{45,860},284697593},{{45,862},182609947},{{45,864},968668397},{{45,866},822892958},{{45,868},20031466},{{45,870},582030222},{{45,872},113170973},{{45,874},44631330},{{45,876},117449096},{{45,878},742186715},{{45,880},393019551},{{45,882},475653487},{{45,884},44400405},{{45,886},854169605},{{45,888},417464027},{{45,890},638137059},{{45,892},767027912},{{45,894},156446839},{{45,896},993857936},{{45,898},340495049},{{45,900},620457258},{{45,902},138844665},{{45,904},409760846},{{45,906},178352112},{{45,908},82788960},{{45,910},388732194},{{45,912},649306589},{{45,914},798058368},{{45,916},662337136},{{45,918},564354859},{{45,920},463324080},{{45,922},651997437},{{45,924},151329929},{{45,926},798760314},{{45,928},140393196},{{45,930},82249686},{{45,932},534814725},{{45,934},624568021},{{45,936},130746531},{{45,938},950081340},{{45,940},74895509},{{45,942},582830295},{{45,944},80288213},{{45,946},896322580},{{45,948},930247101},{{45,950},961634195},{{45,952},343840503},{{45,954},151542664},{{45,956},791653321},{{45,958},891526646},{{45,960},512046490},{{45,962},292522561},{{45,964},321986893},{{45,966},483787584},{{45,968},926080170},{{45,970},410378864},{{45,972},504638099},{{45,974},532986681},{{45,976},138953386},{{45,978},701001827},{{45,980},64586773},{{45,982},800287681},{{45,984},592917926},{{45,986},845148767},{{45,988},612516645},{{45,990},103437292},{{45,992},360749745},{{45,994},802262044},{{45,996},905182790},{{45,998},741928176},{{45,1000},827192105},{{45,1002},608668686},{{45,1004},275550867},{{45,1006},759837767},{{45,1008},768468707},{{45,1010},652063776},{{45,1012},969103143},{{46,0},1},{{46,2},45},{{46,4},1078},{{46,6},18146},{{46,8},239803},{{46,10},2640055},{{46,12},25119048},{{46,14},211741156},{{46,16},609749448},{{46,18},185787670},{{46,20},784612981},{{46,22},979654374},{{46,24},245960280},{{46,26},15201333},{{46,28},958496287},{{46,30},21110097},{{46,32},315107827},{{46,34},742613444},{{46,36},350112648},{{46,38},551346765},{{46,40},22689059},{{46,42},646342016},{{46,44},52427180},{{46,46},113726997},{{46,48},20972491},{{46,50},531552248},{{46,52},493279562},{{46,54},92962089},{{46,56},319571072},{{46,58},658193556},{{46,60},921146440},{{46,62},975234478},{{46,64},32484025},{{46,66},175484024},{{46,68},620442122},{{46,70},566033382},{{46,72},228886883},{{46,74},301912152},{{46,76},137109958},{{46,78},37427138},{{46,80},531183271},{{46,82},684452057},{{46,84},239066445},{{46,86},806400806},{{46,88},345167706},{{46,90},766401402},{{46,92},659593100},{{46,94},342864185},{{46,96},793254425},{{46,98},754419464},{{46,100},829307575},{{46,102},253460669},{{46,104},788296808},{{46,106},455700810},{{46,108},203460090},{{46,110},299960617},{{46,112},672027544},{{46,114},662169751},{{46,116},130171479},{{46,118},226661975},{{46,120},16040291},{{46,122},641167104},{{46,124},11608362},{{46,126},92735361},{{46,128},828424038},{{46,130},151425031},{{46,132},757058935},{{46,134},838944903},{{46,136},705030989},{{46,138},271605017},{{46,140},832315720},{{46,142},525711262},{{46,144},695893337},{{46,146},524834613},{{46,148},616761109},{{46,150},89325780},{{46,152},498691877},{{46,154},390082387},{{46,156},413410547},{{46,158},86170624},{{46,160},733987779},{{46,162},857386717},{{46,164},121183471},{{46,166},378540433},{{46,168},791481061},{{46,170},602874536},{{46,172},895775257},{{46,174},706223069},{{46,176},9499},{{46,178},916233199},{{46,180},610175789},{{46,182},305910126},{{46,184},402086898},{{46,186},380865911},{{46,188},987929263},{{46,190},784720236},{{46,192},752249361},{{46,194},533065111},{{46,196},750214951},{{46,198},512527924},{{46,200},120069833},{{46,202},497034065},{{46,204},691332267},{{46,206},542878776},{{46,208},324018841},{{46,210},841280375},{{46,212},368737196},{{46,214},213532423},{{46,216},972352910},{{46,218},856518833},{{46,220},695976280},{{46,222},832491001},{{46,224},482258020},{{46,226},288928023},{{46,228},37469870},{{46,230},669147935},{{46,232},728824530},{{46,234},312167670},{{46,236},98462828},{{46,238},664815478},{{46,240},37466991},{{46,242},488559701},{{46,244},805407681},{{46,246},555656112},{{46,248},449333572},{{46,250},115257333},{{46,252},422614443},{{46,254},217564969},{{46,256},709154128},{{46,258},523463461},{{46,260},73425486},{{46,262},892488653},{{46,264},72758100},{{46,266},139084611},{{46,268},245397266},{{46,270},356349189},{{46,272},258341975},{{46,274},374070936},{{46,276},726599734},{{46,278},907199192},{{46,280},145474167},{{46,282},868900328},{{46,284},80767170},{{46,286},435742131},{{46,288},604761267},{{46,290},550372021},{{46,292},238314098},{{46,294},858506407},{{46,296},406280874},{{46,298},734533546},{{46,300},294613351},{{46,302},569709112},{{46,304},578499728},{{46,306},811514468},{{46,308},971780315},{{46,310},806793934},{{46,312},105431100},{{46,314},109183449},{{46,316},48863833},{{46,318},577768093},{{46,320},679710969},{{46,322},415227663},{{46,324},41263734},{{46,326},575857153},{{46,328},381654592},{{46,330},178237376},{{46,332},962188807},{{46,334},96401085},{{46,336},816699360},{{46,338},379978},{{46,340},698529453},{{46,342},815682387},{{46,344},657011537},{{46,346},324418972},{{46,348},693645417},{{46,350},573047105},{{46,352},308103161},{{46,354},882958960},{{46,356},454854080},{{46,358},319280881},{{46,360},638681315},{{46,362},366562235},{{46,364},558670399},{{46,366},767575020},{{46,368},418970310},{{46,370},599121706},{{46,372},533764150},{{46,374},589341596},{{46,376},935247125},{{46,378},342450103},{{46,380},752510984},{{46,382},17885861},{{46,384},270962366},{{46,386},936052758},{{46,388},754048953},{{46,390},578853463},{{46,392},395299411},{{46,394},975776432},{{46,396},660809842},{{46,398},714104917},{{46,400},664542262},{{46,402},888472526},{{46,404},460099640},{{46,406},981638523},{{46,408},92874960},{{46,410},177231620},{{46,412},389704303},{{46,414},815325394},{{46,416},892076514},{{46,418},810821143},{{46,420},435904186},{{46,422},382196425},{{46,424},459031152},{{46,426},355917826},{{46,428},128881343},{{46,430},657597142},{{46,432},768648132},{{46,434},489510758},{{46,436},615223177},{{46,438},785945817},{{46,440},514595120},{{46,442},566588750},{{46,444},607013232},{{46,446},187911920},{{46,448},428934627},{{46,450},690400146},{{46,452},385480557},{{46,454},274884476},{{46,456},214574226},{{46,458},202705516},{{46,460},78809920},{{46,462},768678876},{{46,464},104566183},{{46,466},54811645},{{46,468},783466377},{{46,470},78714677},{{46,472},225394661},{{46,474},571378521},{{46,476},194681502},{{46,478},425310485},{{46,480},768219090},{{46,482},304793231},{{46,484},206900396},{{46,486},615627160},{{46,488},652872143},{{46,490},605935098},{{46,492},888495311},{{46,494},608958308},{{46,496},684600222},{{46,498},150382009},{{46,500},670451269},{{46,502},632074742},{{46,504},29926906},{{46,506},676412361},{{46,508},727588975},{{46,510},541140282},{{46,512},152873820},{{46,514},396851079},{{46,516},644404346},{{46,518},44361987},{{46,520},675992732},{{46,522},795525664},{{46,524},898044746},{{46,526},408945421},{{46,528},518637916},{{46,530},428148139},{{46,532},754863856},{{46,534},398182352},{{46,536},901207212},{{46,538},713356422},{{46,540},978366083},{{46,542},314876385},{{46,544},700685480},{{46,546},450639991},{{46,548},507197672},{{46,550},750335365},{{46,552},694787156},{{46,554},659670168},{{46,556},536065922},{{46,558},58255852},{{46,560},874808151},{{46,562},601680063},{{46,564},300562698},{{46,566},308983506},{{46,568},144763409},{{46,570},291800793},{{46,572},77526020},{{46,574},485403753},{{46,576},904665596},{{46,578},240987930},{{46,580},592380858},{{46,582},131116194},{{46,584},318805303},{{46,586},40941643},{{46,588},253699630},{{46,590},655235690},{{46,592},431599614},{{46,594},508389196},{{46,596},766960976},{{46,598},64307752},{{46,600},83604788},{{46,602},642165815},{{46,604},298107337},{{46,606},143184667},{{46,608},782909601},{{46,610},97135064},{{46,612},800759539},{{46,614},594114128},{{46,616},462420032},{{46,618},946857620},{{46,620},578998109},{{46,622},847963761},{{46,624},556321528},{{46,626},57391815},{{46,628},681855904},{{46,630},181815656},{{46,632},486333346},{{46,634},837072759},{{46,636},524567487},{{46,638},328595763},{{46,640},549915998},{{46,642},810586503},{{46,644},921107919},{{46,646},625157836},{{46,648},520890292},{{46,650},832156974},{{46,652},502972509},{{46,654},844559735},{{46,656},189855766},{{46,658},821823028},{{46,660},625190873},{{46,662},310510259},{{46,664},495827691},{{46,666},683011136},{{46,668},462720297},{{46,670},218315456},{{46,672},558392392},{{46,674},789434995},{{46,676},973556645},{{46,678},730884239},{{46,680},996176654},{{46,682},617108310},{{46,684},869866261},{{46,686},672230385},{{46,688},823462275},{{46,690},454316955},{{46,692},569646417},{{46,694},836576125},{{46,696},486906178},{{46,698},189726176},{{46,700},941091111},{{46,702},447563926},{{46,704},715506888},{{46,706},259006307},{{46,708},152570437},{{46,710},178255829},{{46,712},705545293},{{46,714},756368978},{{46,716},655390691},{{46,718},445318929},{{46,720},656847742},{{46,722},582354283},{{46,724},964611397},{{46,726},757172000},{{46,728},601301680},{{46,730},424348696},{{46,732},51484783},{{46,734},19240319},{{46,736},282677827},{{46,738},308226295},{{46,740},848392338},{{46,742},155829926},{{46,744},371112122},{{46,746},224524783},{{46,748},972970693},{{46,750},890401898},{{46,752},186586738},{{46,754},229535528},{{46,756},744395297},{{46,758},436751188},{{46,760},287103606},{{46,762},767393594},{{46,764},221149011},{{46,766},725319915},{{46,768},148703291},{{46,770},142739608},{{46,772},565503173},{{46,774},66967587},{{46,776},579759051},{{46,778},568848401},{{46,780},146971072},{{46,782},400042251},{{46,784},42796974},{{46,786},930117091},{{46,788},516575412},{{46,790},958322295},{{46,792},49672443},{{46,794},25502320},{{46,796},669481138},{{46,798},837449618},{{46,800},7837933},{{46,802},569472200},{{46,804},125364493},{{46,806},253977071},{{46,808},938687542},{{46,810},347213905},{{46,812},923213402},{{46,814},374713215},{{46,816},103889249},{{46,818},423021360},{{46,820},42560340},{{46,822},446498368},{{46,824},893011213},{{46,826},263552847},{{46,828},473020638},{{46,830},594960497},{{46,832},638188472},{{46,834},306243047},{{46,836},631678307},{{46,838},460262893},{{46,840},114330448},{{46,842},196301356},{{46,844},120279822},{{46,846},408786998},{{46,848},213927614},{{46,850},687965452},{{46,852},221650209},{{46,854},761159253},{{46,856},159653422},{{46,858},237951119},{{46,860},705996510},{{46,862},183076481},{{46,864},962207888},{{46,866},939920456},{{46,868},729428244},{{46,870},527536009},{{46,872},933629825},{{46,874},48104537},{{46,876},426892607},{{46,878},222940406},{{46,880},156477133},{{46,882},294062878},{{46,884},856995315},{{46,886},562470362},{{46,888},935041969},{{46,890},210948751},{{46,892},968306167},{{46,894},842365144},{{46,896},520781012},{{46,898},542464204},{{46,900},753086923},{{46,902},742421303},{{46,904},62000597},{{46,906},644679235},{{46,908},71406991},{{46,910},633199433},{{46,912},272647461},{{46,914},452692051},{{46,916},412108892},{{46,918},971466694},{{46,920},51102980},{{46,922},982720545},{{46,924},17172841},{{46,926},800141833},{{46,928},835541670},{{46,930},112517201},{{46,932},389287762},{{46,934},451060806},{{46,936},667438631},{{46,938},372888210},{{46,940},71363616},{{46,942},925222882},{{46,944},974951293},{{46,946},516878304},{{46,948},717488009},{{46,950},957226897},{{46,952},42671831},{{46,954},558776576},{{46,956},623171604},{{46,958},305500795},{{46,960},631070922},{{46,962},102790598},{{46,964},482941055},{{46,966},578335399},{{46,968},805101814},{{46,970},173951677},{{46,972},379242816},{{46,974},368922629},{{46,976},730730546},{{46,978},873191134},{{46,980},654555294},{{46,982},282999571},{{46,984},122452789},{{46,986},92227034},{{46,988},843713012},{{46,990},807240125},{{46,992},801145367},{{46,994},399481174},{{46,996},81195926},{{46,998},292593849},{{46,1000},487745170},{{46,1002},77737545},{{46,1004},120468361},{{46,1006},275563695},{{46,1008},294725580},{{46,1010},329691567},{{46,1012},323060707},{{46,1014},128192468},{{46,1016},940264172},{{46,1018},278390124},{{46,1020},237020514},{{46,1022},693096287},{{46,1024},868976326},{{46,1026},357620751},{{46,1028},777387506},{{46,1030},600499325},{{46,1032},283061659},{{46,1034},552760619},{{46,1036},551343042},{{46,1038},374674126},{{46,1040},67456147},{{46,1042},355451755},{{46,1044},309520773},{{46,1046},188033652},{{46,1048},438124708},{{46,1050},963234900},{{46,1052},524570431},{{46,1054},966112342},{{46,1056},609641134},{{46,1058},592345761},{{47,0},1},{{47,2},46},{{47,4},1125},{{47,6},19316},{{47,8},260197},{{47,10},2918394},{{47,12},28277069},{{47,14},242654144},{{47,16},877454212},{{47,18},274093151},{{47,20},658806941},{{47,22},733787098},{{47,24},12686768},{{47,26},373279778},{{47,28},972151771},{{47,30},700803085},{{47,32},323660829},{{47,34},529034010},{{47,36},15342046},{{47,38},14519348},{{47,40},617205005},{{47,42},151932388},{{47,44},986173050},{{47,46},673700068},{{47,48},544467810},{{47,50},964286681},{{47,52},515278420},{{47,54},556139518},{{47,56},340574896},{{47,58},558301369},{{47,60},203169010},{{47,62},995039572},{{47,64},456888812},{{47,66},641435231},{{47,68},165153057},{{47,70},140522292},{{47,72},660622205},{{47,74},195293121},{{47,76},536816710},{{47,78},963078287},{{47,80},7389104},{{47,82},204944482},{{47,84},754195920},{{47,86},468292992},{{47,88},782743724},{{47,90},983001140},{{47,92},866703245},{{47,94},496885028},{{47,96},44229335},{{47,98},385957410},{{47,100},278539952},{{47,102},468949573},{{47,104},420982388},{{47,106},313452346},{{47,108},869856814},{{47,110},98935497},{{47,112},204399132},{{47,114},112520568},{{47,116},660616311},{{47,118},229799510},{{47,120},228233497},{{47,122},492491671},{{47,124},631417681},{{47,126},54933646},{{47,128},149425728},{{47,130},621332861},{{47,132},339088208},{{47,134},164640489},{{47,136},629238436},{{47,138},824895721},{{47,140},154091091},{{47,142},876001533},{{47,144},408513031},{{47,146},998443240},{{47,148},581987593},{{47,150},639413342},{{47,152},564182232},{{47,154},919538600},{{47,156},946772636},{{47,158},882410774},{{47,160},972663920},{{47,162},656083562},{{47,164},92818},{{47,166},266781815},{{47,168},775781699},{{47,170},746031288},{{47,172},222736672},{{47,174},245153398},{{47,176},853395663},{{47,178},612580130},{{47,180},998160370},{{47,182},644539418},{{47,184},268757618},{{47,186},522753001},{{47,188},961290581},{{47,190},775849265},{{47,192},167666621},{{47,194},207332842},{{47,196},699178165},{{47,198},754169098},{{47,200},895892786},{{47,202},110804927},{{47,204},209717022},{{47,206},224332021},{{47,208},783584762},{{47,210},168756823},{{47,212},846734143},{{47,214},820517435},{{47,216},567375827},{{47,218},214226237},{{47,220},514413130},{{47,222},94334242},{{47,224},56417678},{{47,226},452070622},{{47,228},302779049},{{47,230},643793464},{{47,232},45275321},{{47,234},465081583},{{47,236},721848633},{{47,238},905142006},{{47,240},304646178},{{47,242},594655979},{{47,244},909007937},{{47,246},734286949},{{47,248},886228757},{{47,250},175346016},{{47,252},613908391},{{47,254},543890160},{{47,256},182181133},{{47,258},880150750},{{47,260},840065256},{{47,262},833202286},{{47,264},948664835},{{47,266},99995047},{{47,268},986587901},{{47,270},143761895},{{47,272},873393215},{{47,274},472341142},{{47,276},369663112},{{47,278},813013714},{{47,280},860504625},{{47,282},731747262},{{47,284},545041246},{{47,286},583231233},{{47,288},427381591},{{47,290},37913038},{{47,292},537312918},{{47,294},219404202},{{47,296},592801409},{{47,298},727962123},{{47,300},878247573},{{47,302},121527391},{{47,304},62101177},{{47,306},856133295},{{47,308},688561557},{{47,310},4927109},{{47,312},639161755},{{47,314},216890863},{{47,316},944378755},{{47,318},396352437},{{47,320},878653962},{{47,322},905668778},{{47,324},386987830},{{47,326},935008847},{{47,328},899701147},{{47,330},100650401},{{47,332},955831377},{{47,334},336099358},{{47,336},325599961},{{47,338},655390214},{{47,340},368725260},{{47,342},410912881},{{47,344},868037904},{{47,346},255016544},{{47,348},51552711},{{47,350},320078126},{{47,352},868474642},{{47,354},332377928},{{47,356},241406268},{{47,358},35418479},{{47,360},170587950},{{47,362},775390874},{{47,364},598922434},{{47,366},616742075},{{47,368},563583865},{{47,370},362204509},{{47,372},606438997},{{47,374},894815935},{{47,376},49721736},{{47,378},43588534},{{47,380},841088924},{{47,382},703571407},{{47,384},258771291},{{47,386},525460849},{{47,388},233015242},{{47,390},491199815},{{47,392},325653075},{{47,394},858892862},{{47,396},519655123},{{47,398},115437087},{{47,400},727491564},{{47,402},149427446},{{47,404},582972761},{{47,406},204458210},{{47,408},871579136},{{47,410},737982490},{{47,412},129452738},{{47,414},424878982},{{47,416},856725917},{{47,418},336920826},{{47,420},730532856},{{47,422},841738688},{{47,424},738232572},{{47,426},913319995},{{47,428},816486040},{{47,430},235770118},{{47,432},427698004},{{47,434},930569686},{{47,436},569011751},{{47,438},212446463},{{47,440},508105319},{{47,442},803897811},{{47,444},496189040},{{47,446},948372030},{{47,448},432798655},{{47,450},784691260},{{47,452},809769369},{{47,454},691850475},{{47,456},577558004},{{47,458},62715847},{{47,460},947764060},{{47,462},196109904},{{47,464},506172286},{{47,466},447735266},{{47,468},980867772},{{47,470},417186123},{{47,472},46557919},{{47,474},986790130},{{47,476},277584037},{{47,478},822619391},{{47,480},621076591},{{47,482},388367593},{{47,484},68342324},{{47,486},236699370},{{47,488},119970164},{{47,490},657351210},{{47,492},878868802},{{47,494},794459312},{{47,496},436412351},{{47,498},290870119},{{47,500},503296346},{{47,502},564802634},{{47,504},58773734},{{47,506},218770767},{{47,508},842309450},{{47,510},694735121},{{47,512},712067611},{{47,514},605426442},{{47,516},634737321},{{47,518},598847809},{{47,520},189964014},{{47,522},104895974},{{47,524},463967300},{{47,526},12836011},{{47,528},374171101},{{47,530},422839429},{{47,532},769990513},{{47,534},562838372},{{47,536},23465799},{{47,538},935303296},{{47,540},758855803},{{47,542},832260567},{{47,544},373886738},{{47,546},362866660},{{47,548},831747060},{{47,550},745193763},{{47,552},842521525},{{47,554},971131364},{{47,556},323409153},{{47,558},328965945},{{47,560},810807795},{{47,562},987986960},{{47,564},514599613},{{47,566},697337301},{{47,568},518676386},{{47,570},255182547},{{47,572},320862033},{{47,574},438306682},{{47,576},656059329},{{47,578},246817307},{{47,580},296427451},{{47,582},518314128},{{47,584},212813255},{{47,586},401599307},{{47,588},322632262},{{47,590},651271379},{{47,592},102975853},{{47,594},978392574},{{47,596},171788197},{{47,598},425477753},{{47,600},865141598},{{47,602},200230496},{{47,604},352371432},{{47,606},128877128},{{47,608},483645145},{{47,610},487174027},{{47,612},207964600},{{47,614},565016864},{{47,616},366179929},{{47,618},769999162},{{47,620},980709292},{{47,622},279413092},{{47,624},778963675},{{47,626},322935221},{{47,628},775556840},{{47,630},152203885},{{47,632},621120920},{{47,634},754303914},{{47,636},144652778},{{47,638},603456104},{{47,640},397495432},{{47,642},911648885},{{47,644},161631342},{{47,646},183072379},{{47,648},436197254},{{47,650},410415743},{{47,652},654211646},{{47,654},998944149},{{47,656},660332881},{{47,658},659092994},{{47,660},407158213},{{47,662},993390015},{{47,664},62237745},{{47,666},342306369},{{47,668},807083806},{{47,670},460112259},{{47,672},598009122},{{47,674},34231667},{{47,676},354435262},{{47,678},237881432},{{47,680},155417941},{{47,682},495370397},{{47,684},996923439},{{47,686},566380833},{{47,688},854227389},{{47,690},702509945},{{47,692},42544433},{{47,694},284265702},{{47,696},294553519},{{47,698},149363293},{{47,700},27077251},{{47,702},84953964},{{47,704},442875086},{{47,706},52560456},{{47,708},900402134},{{47,710},145229989},{{47,712},73758817},{{47,714},191009440},{{47,716},854994962},{{47,718},638721915},{{47,720},122661714},{{47,722},185868970},{{47,724},77283521},{{47,726},869275152},{{47,728},18655948},{{47,730},313026284},{{47,732},709600476},{{47,734},473812539},{{47,736},310414874},{{47,738},881320952},{{47,740},952459523},{{47,742},248120422},{{47,744},525865505},{{47,746},878780555},{{47,748},987277088},{{47,750},840681160},{{47,752},676792790},{{47,754},412115993},{{47,756},140030918},{{47,758},974129475},{{47,760},721196483},{{47,762},656805079},{{47,764},905290349},{{47,766},47935904},{{47,768},451920705},{{47,770},209356056},{{47,772},551066765},{{47,774},377150442},{{47,776},379611973},{{47,778},957219941},{{47,780},151470005},{{47,782},815021467},{{47,784},645207971},{{47,786},427463516},{{47,788},863082600},{{47,790},325313522},{{47,792},124436219},{{47,794},624577057},{{47,796},614877838},{{47,798},455973640},{{47,800},851822937},{{47,802},25478672},{{47,804},694724523},{{47,806},841056623},{{47,808},311625157},{{47,810},733217559},{{47,812},234679922},{{47,814},488590424},{{47,816},672460808},{{47,818},393534712},{{47,820},496209755},{{47,822},929085969},{{47,824},673429468},{{47,826},675205481},{{47,828},477828672},{{47,830},541309112},{{47,832},421475544},{{47,834},478494486},{{47,836},773959869},{{47,838},620756099},{{47,840},817295158},{{47,842},343366608},{{47,844},474968096},{{47,846},138789669},{{47,848},1261477},{{47,850},581929663},{{47,852},193727536},{{47,854},890932863},{{47,856},10823177},{{47,858},566850894},{{47,860},774883564},{{47,862},16714666},{{47,864},326523886},{{47,866},969386350},{{47,868},297903394},{{47,870},330603328},{{47,872},602435368},{{47,874},640131734},{{47,876},422205271},{{47,878},722651837},{{47,880},536164302},{{47,882},931111157},{{47,884},119137488},{{47,886},728875089},{{47,888},985577117},{{47,890},985476890},{{47,892},17918009},{{47,894},917723365},{{47,896},472997173},{{47,898},89115107},{{47,900},916366434},{{47,902},502538821},{{47,904},230961609},{{47,906},303908854},{{47,908},617061492},{{47,910},736625515},{{47,912},131713887},{{47,914},339453221},{{47,916},738950163},{{47,918},633262610},{{47,920},426758031},{{47,922},238112917},{{47,924},779917917},{{47,926},838020550},{{47,928},66019448},{{47,930},650675847},{{47,932},778117049},{{47,934},610691432},{{47,936},213274580},{{47,938},385410347},{{47,940},146924004},{{47,942},364868172},{{47,944},467790003},{{47,946},719723336},{{47,948},134820272},{{47,950},752419541},{{47,952},477278067},{{47,954},249134595},{{47,956},704095466},{{47,958},475445405},{{47,960},736299900},{{47,962},879265925},{{47,964},152926089},{{47,966},845846141},{{47,968},495967193},{{47,970},279498385},{{47,972},571884448},{{47,974},188818617},{{47,976},160584873},{{47,978},477296264},{{47,980},718325160},{{47,982},376134972},{{47,984},29944771},{{47,986},994040918},{{47,988},900529668},{{47,990},502667072},{{47,992},63109761},{{47,994},493032874},{{47,996},781301515},{{47,998},461834757},{{47,1000},82343644},{{47,1002},481132313},{{47,1004},514447042},{{47,1006},33858163},{{47,1008},779555233},{{47,1010},748165656},{{47,1012},15592733},{{47,1014},72424287},{{47,1016},572256728},{{47,1018},868353288},{{47,1020},210902382},{{47,1022},873738113},{{47,1024},462082508},{{47,1026},116372507},{{47,1028},317994063},{{47,1030},320661573},{{47,1032},43412947},{{47,1034},698165915},{{47,1036},782179405},{{47,1038},544478699},{{47,1040},376533191},{{47,1042},591100852},{{47,1044},669522818},{{47,1046},718785967},{{47,1048},689856669},{{47,1050},868867194},{{47,1052},692259782},{{47,1054},326169003},{{47,1056},372530014},{{47,1058},278822874},{{47,1060},245059471},{{47,1062},536750832},{{47,1064},337386716},{{47,1066},351509954},{{47,1068},600150419},{{47,1070},771930319},{{47,1072},812137400},{{47,1074},268506281},{{47,1076},52663290},{{47,1078},576040882},{{47,1080},250206016},{{47,1082},182636529},{{47,1084},238498760},{{47,1086},83748189},{{47,1088},556944302},{{47,1090},408365242},{{47,1092},877381661},{{47,1094},687598532},{{47,1096},206936328},{{47,1098},93325077},{{47,1100},375585930},{{47,1102},311118119},{{47,1104},840250578},{{48,0},1},{{48,2},47},{{48,4},1173},{{48,6},20535},{{48,8},281857},{{48,10},3219563},{{48,12},31756649},{{48,14},277324867},{{48,16},182983217},{{48,18},698763572},{{48,20},224340727},{{48,22},130185913},{{48,24},938338213},{{48,26},457596872},{{48,28},500667258},{{48,30},726272186},{{48,32},242531386},{{48,34},490324006},{{48,36},697265581},{{48,38},186365736},{{48,40},123707347},{{48,42},149163288},{{48,44},89978475},{{48,46},985283339},{{48,48},584841356},{{48,50},785509005},{{48,52},693590689},{{48,54},256394211},{{48,56},919078587},{{48,58},671307265},{{48,60},271140497},{{48,62},146527772},{{48,64},508423202},{{48,66},678732983},{{48,68},767147115},{{48,70},418422439},{{48,72},470469749},{{48,74},411147184},{{48,76},246424306},{{48,78},580998273},{{48,80},228726677},{{48,82},964726100},{{48,84},955513349},{{48,86},444565758},{{48,88},668191949},{{48,90},622619432},{{48,92},792082487},{{48,94},929348032},{{48,96},601983375},{{48,98},875985614},{{48,100},424117930},{{48,102},730694027},{{48,104},740975250},{{48,106},920167707},{{48,108},500437835},{{48,110},690210005},{{48,112},493329701},{{48,114},913508192},{{48,116},695611331},{{48,118},515433292},{{48,120},682059417},{{48,122},760833644},{{48,124},299135864},{{48,126},144219873},{{48,128},937695856},{{48,130},872711671},{{48,132},176916492},{{48,134},348891212},{{48,136},334587033},{{48,138},49595521},{{48,140},749704350},{{48,142},806067034},{{48,144},773327860},{{48,146},183297942},{{48,148},590517602},{{48,150},642228939},{{48,152},275941227},{{48,154},305722242},{{48,156},165986509},{{48,158},644370063},{{48,160},71211109},{{48,162},994092320},{{48,164},193064301},{{48,166},728492690},{{48,168},76982066},{{48,170},397536959},{{48,172},240992716},{{48,174},459846893},{{48,176},745186728},{{48,178},715105963},{{48,180},864528752},{{48,182},8495685},{{48,184},753272988},{{48,186},61740216},{{48,188},691254120},{{48,190},133693721},{{48,192},536597663},{{48,194},806042634},{{48,196},964981978},{{48,198},37162518},{{48,200},164112239},{{48,202},637759779},{{48,204},841824460},{{48,206},829311498},{{48,208},573961610},{{48,210},622092127},{{48,212},856298148},{{48,214},23010232},{{48,216},90428839},{{48,218},608194623},{{48,220},46765621},{{48,222},381935126},{{48,224},362962166},{{48,226},452925715},{{48,228},585602790},{{48,230},768818647},{{48,232},88708532},{{48,234},942042803},{{48,236},418311021},{{48,238},521378251},{{48,240},499003594},{{48,242},126819649},{{48,244},281499536},{{48,246},951375086},{{48,248},146412815},{{48,250},883657287},{{48,252},598780576},{{48,254},163659546},{{48,256},959278876},{{48,258},560517421},{{48,260},665346319},{{48,262},929162776},{{48,264},164983787},{{48,266},77699826},{{48,268},451232846},{{48,270},342897676},{{48,272},483260356},{{48,274},399557298},{{48,276},954841649},{{48,278},593150358},{{48,280},617703430},{{48,282},292815034},{{48,284},3827776},{{48,286},631211917},{{48,288},629217856},{{48,290},387782790},{{48,292},117795063},{{48,294},964508694},{{48,296},824603912},{{48,298},347867132},{{48,300},217932218},{{48,302},808071571},{{48,304},466159291},{{48,306},919428338},{{48,308},306867765},{{48,310},310085680},{{48,312},347929669},{{48,314},103137973},{{48,316},445637697},{{48,318},645585557},{{48,320},573817817},{{48,322},596387955},{{48,324},672995733},{{48,326},578127218},{{48,328},402908135},{{48,330},115353766},{{48,332},244018895},{{48,334},365778204},{{48,336},555835033},{{48,338},188328988},{{48,340},247770780},{{48,342},214263457},{{48,344},844226086},{{48,346},575129810},{{48,348},998900133},{{48,350},642186262},{{48,352},886066131},{{48,354},9933705},{{48,356},609621463},{{48,358},398319031},{{48,360},223920768},{{48,362},209742125},{{48,364},519163806},{{48,366},74615456},{{48,368},814536291},{{48,370},217678251},{{48,372},205417278},{{48,374},306418059},{{48,376},464475526},{{48,378},330591049},{{48,380},614947407},{{48,382},841330174},{{48,384},17421893},{{48,386},462387593},{{48,388},572435987},{{48,390},550253368},{{48,392},393354277},{{48,394},125715312},{{48,396},124567536},{{48,398},533400012},{{48,400},599797708},{{48,402},528236566},{{48,404},670562226},{{48,406},867851657},{{48,408},488086533},{{48,410},312725786},{{48,412},238592338},{{48,414},37063455},{{48,416},385067665},{{48,418},487783197},{{48,420},118051898},{{48,422},700641656},{{48,424},71282753},{{48,426},435781034},{{48,428},103306472},{{48,430},894876554},{{48,432},845215295},{{48,434},848516},{{48,436},105817111},{{48,438},455104275},{{48,440},971250603},{{48,442},659938256},{{48,444},173306291},{{48,446},702024160},{{48,448},716038595},{{48,450},487118454},{{48,452},170680030},{{48,454},880373959},{{48,456},881689085},{{48,458},153725278},{{48,460},74926408},{{48,462},143593976},{{48,464},537712434},{{48,466},635112688},{{48,468},530810156},{{48,470},750175992},{{48,472},211491335},{{48,474},495469862},{{48,476},938874667},{{48,478},906814766},{{48,480},530322450},{{48,482},654580872},{{48,484},345961757},{{48,486},642596517},{{48,488},63791230},{{48,490},944154048},{{48,492},670877958},{{48,494},937127089},{{48,496},186748489},{{48,498},915912734},{{48,500},209561832},{{48,502},276486399},{{48,504},229476817},{{48,506},558761321},{{48,508},226557040},{{48,510},227364465},{{48,512},312169979},{{48,514},745218623},{{48,516},741668605},{{48,518},732242764},{{48,520},141121784},{{48,522},862165956},{{48,524},612899824},{{48,526},26577011},{{48,528},945385273},{{48,530},251793938},{{48,532},946782241},{{48,534},731260038},{{48,536},244678083},{{48,538},406380914},{{48,540},904932224},{{48,542},539791264},{{48,544},681567161},{{48,546},903979395},{{48,548},522313639},{{48,550},307479666},{{48,552},592336384},{{48,554},274405785},{{48,556},808155145},{{48,558},116439879},{{48,560},610551965},{{48,562},466693001},{{48,564},783212908},{{48,566},356926408},{{48,568},441684284},{{48,570},460337698},{{48,572},929744044},{{48,574},6376955},{{48,576},718008169},{{48,578},946348344},{{48,580},771828366},{{48,582},973818233},{{48,584},895371075},{{48,586},977137826},{{48,588},380169268},{{48,590},772257849},{{48,592},31334848},{{48,594},472603919},{{48,596},411133545},{{48,598},814229722},{{48,600},268412684},{{48,602},269984826},{{48,604},925865608},{{48,606},465876593},{{48,608},90547760},{{48,610},192297128},{{48,612},107314233},{{48,614},564985934},{{48,616},624177562},{{48,618},939350415},{{48,620},164843750},{{48,622},127698384},{{48,624},375467125},{{48,626},733175906},{{48,628},272735725},{{48,630},449176665},{{48,632},148653187},{{48,634},981408173},{{48,636},518395662},{{48,638},539465581},{{48,640},376426572},{{48,642},523018009},{{48,644},244326749},{{48,646},117372211},{{48,648},788925566},{{48,650},998562683},{{48,652},66998700},{{48,654},958836224},{{48,656},912519308},{{48,658},243826028},{{48,660},372775429},{{48,662},817271079},{{48,664},249393258},{{48,666},980817911},{{48,668},290157076},{{48,670},803249202},{{48,672},54296904},{{48,674},967950499},{{48,676},259586185},{{48,678},891527285},{{48,680},197070576},{{48,682},229312354},{{48,684},227197980},{{48,686},799697366},{{48,688},938796541},{{48,690},780082061},{{48,692},90937344},{{48,694},484280959},{{48,696},41280132},{{48,698},365255061},{{48,700},357940368},{{48,702},463355056},{{48,704},931322797},{{48,706},484716584},{{48,708},549219150},{{48,710},927360223},{{48,712},836260928},{{48,714},974511964},{{48,716},168938341},{{48,718},138740543},{{48,720},617041490},{{48,722},552137623},{{48,724},940491117},{{48,726},311751083},{{48,728},797191757},{{48,730},581186247},{{48,732},747525174},{{48,734},464341615},{{48,736},45074367},{{48,738},877273095},{{48,740},118604361},{{48,742},820377975},{{48,744},651223472},{{48,746},330450797},{{48,748},299712101},{{48,750},798402816},{{48,752},155978336},{{48,754},76119913},{{48,756},279749437},{{48,758},94544299},{{48,760},576902970},{{48,762},337821847},{{48,764},762491092},{{48,766},205421212},{{48,768},628488971},{{48,770},912880168},{{48,772},293200919},{{48,774},74345429},{{48,776},106904237},{{48,778},117214135},{{48,780},997309646},{{48,782},440117215},{{48,784},601730010},{{48,786},44099662},{{48,788},275878624},{{48,790},579837056},{{48,792},734358196},{{48,794},740396992},{{48,796},105320711},{{48,798},497734455},{{48,800},593389397},{{48,802},892951024},{{48,804},375888233},{{48,806},469355971},{{48,808},904918031},{{48,810},759963217},{{48,812},159920933},{{48,814},656339936},{{48,816},82028185},{{48,818},635763012},{{48,820},494109863},{{48,822},887577439},{{48,824},747214684},{{48,826},51704021},{{48,828},870514178},{{48,830},310168296},{{48,832},344440919},{{48,834},671389360},{{48,836},63636271},{{48,838},867520663},{{48,840},253359253},{{48,842},809561479},{{48,844},515218518},{{48,846},735486509},{{48,848},595414813},{{48,850},855063768},{{48,852},809133514},{{48,854},296905455},{{48,856},403829884},{{48,858},13706060},{{48,860},521945271},{{48,862},406722813},{{48,864},508410711},{{48,866},177195219},{{48,868},735377028},{{48,870},927006199},{{48,872},631467156},{{48,874},561281245},{{48,876},747357347},{{48,878},2938426},{{48,880},465345595},{{48,882},461810717},{{48,884},851331500},{{48,886},936133185},{{48,888},709629669},{{48,890},764183492},{{48,892},336958888},{{48,894},999734612},{{48,896},886346709},{{48,898},929391292},{{48,900},283117585},{{48,902},489898780},{{48,904},493902211},{{48,906},377860665},{{48,908},233672406},{{48,910},313970515},{{48,912},130449778},{{48,914},925311516},{{48,916},829665465},{{48,918},27964512},{{48,920},47478431},{{48,922},502231137},{{48,924},77997958},{{48,926},450616449},{{48,928},231073347},{{48,930},922519036},{{48,932},577962078},{{48,934},74763491},{{48,936},840109600},{{48,938},825429573},{{48,940},325716083},{{48,942},462423227},{{48,944},684091307},{{48,946},610980133},{{48,948},146344297},{{48,950},230702558},{{48,952},840583842},{{48,954},568780809},{{48,956},837872774},{{48,958},467777629},{{48,960},918753619},{{48,962},868791683},{{48,964},692922864},{{48,966},937076083},{{48,968},487643358},{{48,970},553595896},{{48,972},717484731},{{48,974},882361644},{{48,976},739294901},{{48,978},547711612},{{48,980},781629368},{{48,982},821302751},{{48,984},368923697},{{48,986},499416921},{{48,988},374122329},{{48,990},146178192},{{48,992},867117817},{{48,994},743635071},{{48,996},435195107},{{48,998},43377741},{{48,1000},23687167},{{48,1002},878990481},{{48,1004},99110158},{{48,1006},262344925},{{48,1008},137035868},{{48,1010},292609610},{{48,1012},625408058},{{48,1014},171070693},{{48,1016},281506530},{{48,1018},350758492},{{48,1020},515834894},{{48,1022},237732608},{{48,1024},828774443},{{48,1026},840832942},{{48,1028},431386878},{{48,1030},857791323},{{48,1032},291378943},{{48,1034},894741249},{{48,1036},559570546},{{48,1038},881728336},{{48,1040},216217018},{{48,1042},497590589},{{48,1044},210577047},{{48,1046},706853900},{{48,1048},528807154},{{48,1050},595327246},{{48,1052},243687205},{{48,1054},679896105},{{48,1056},276389715},{{48,1058},520651743},{{48,1060},981854062},{{48,1062},782051052},{{48,1064},628779694},{{48,1066},482906971},{{48,1068},308000266},{{48,1070},98460224},{{48,1072},329039027},{{48,1074},663453182},{{48,1076},866909422},{{48,1078},358447817},{{48,1080},756042580},{{48,1082},103701857},{{48,1084},530184673},{{48,1086},82157052},{{48,1088},864831037},{{48,1090},833622836},{{48,1092},129557279},{{48,1094},680891914},{{48,1096},903510655},{{48,1098},223117879},{{48,1100},584910098},{{48,1102},872789802},{{48,1104},683398377},{{48,1106},818673921},{{48,1108},424793316},{{48,1110},162530200},{{48,1112},461191009},{{48,1114},233747923},{{48,1116},764377859},{{48,1118},866276050},{{48,1120},20068038},{{48,1122},599500015},{{48,1124},419525268},{{48,1126},504837656},{{48,1128},702339633},{{48,1130},161478719},{{48,1132},731429464},{{48,1134},9977417},{{48,1136},955013204},{{48,1138},944736389},{{48,1140},868359658},{{48,1142},303235910},{{48,1144},570685307},{{48,1146},762022093},{{48,1148},973456873},{{48,1150},491776893},{{48,1152},191155949},{{49,0},1},{{49,2},48},{{49,4},1222},{{49,6},21804},{{49,8},304834},{{49,10},3544928},{{49,12},35583250},{{49,14},316123172},{{49,16},530785426},{{49,18},505824986},{{49,20},901343166},{{49,22},615485588},{{49,24},789348648},{{49,26},698747334},{{49,28},657848248},{{49,30},964586458},{{49,32},476943547},{{49,34},698458295},{{49,36},801769019},{{49,38},257736525},{{49,40},542576587},{{49,42},933572174},{{49,44},9542546},{{49,46},488292838},{{49,48},779820677},{{49,50},404677231},{{49,52},568188493},{{49,54},931045218},{{49,56},340825658},{{49,58},205993974},{{49,60},185959269},{{49,62},78058729},{{49,64},445883053},{{49,66},431770274},{{49,68},625502333},{{49,70},180277174},{{49,72},804167964},{{49,74},894493650},{{49,76},995189957},{{49,78},934651928},{{49,80},779076648},{{49,82},286076285},{{49,84},196236261},{{49,86},433504295},{{49,88},796345349},{{49,90},46608071},{{49,92},262327913},{{49,94},615865530},{{49,96},569486410},{{49,98},232121371},{{49,100},86175778},{{49,102},154003167},{{49,104},455565337},{{49,106},592635041},{{49,108},449778081},{{49,110},946011559},{{49,112},315342730},{{49,114},523152035},{{49,116},660192808},{{49,118},984322053},{{49,120},918448908},{{49,122},362530845},{{49,124},976500024},{{49,126},826353996},{{49,128},979299043},{{49,130},20455239},{{49,132},106430716},{{49,134},169990095},{{49,136},856925551},{{49,138},339927417},{{49,140},872925000},{{49,142},454748405},{{49,144},844111855},{{49,146},778706572},{{49,148},953334777},{{49,150},367875579},{{49,152},54603227},{{49,154},952723870},{{49,156},746089521},{{49,158},114899675},{{49,160},378338080},{{49,162},515017450},{{49,164},901556480},{{49,166},75514717},{{49,168},118586517},{{49,170},750778341},{{49,172},164215503},{{49,174},398032943},{{49,176},932771419},{{49,178},175973529},{{49,180},371281707},{{49,182},414155738},{{49,184},136305212},{{49,186},176477492},{{49,188},529591042},{{49,190},473449712},{{49,192},104580388},{{49,194},917944592},{{49,196},711611694},{{49,198},275529831},{{49,200},657391663},{{49,202},618370464},{{49,204},182199238},{{49,206},863262145},{{49,208},671572410},{{49,210},926093081},{{49,212},964697471},{{49,214},20599847},{{49,216},886336884},{{49,218},976845790},{{49,220},332330830},{{49,222},936899217},{{49,224},469444206},{{49,226},333826539},{{49,228},382006323},{{49,230},404644652},{{49,232},86283892},{{49,234},711449573},{{49,236},711524895},{{49,238},240243757},{{49,240},137744674},{{49,242},52585102},{{49,244},502954368},{{49,246},568353873},{{49,248},424768720},{{49,250},673699213},{{49,252},453807002},{{49,254},277591996},{{49,256},614231800},{{49,258},858886730},{{49,260},933633627},{{49,262},855960053},{{49,264},795294602},{{49,266},320736325},{{49,268},160050137},{{49,270},741837408},{{49,272},875372187},{{49,274},933116510},{{49,276},439299086},{{49,278},339530899},{{49,280},998809886},{{49,282},988163112},{{49,284},414204450},{{49,286},626581582},{{49,288},425958595},{{49,290},547450689},{{49,292},257877182},{{49,294},25212376},{{49,296},487090639},{{49,298},693248108},{{49,300},736165691},{{49,302},261048117},{{49,304},530252319},{{49,306},667332870},{{49,308},224234420},{{49,310},283256778},{{49,312},493030047},{{49,314},381167115},{{49,316},959191937},{{49,318},567700201},{{49,320},408470930},{{49,322},456733167},{{49,324},877572444},{{49,326},640070139},{{49,328},177231251},{{49,330},53889209},{{49,332},630925282},{{49,334},764167042},{{49,336},903138510},{{49,338},822950867},{{49,340},161878067},{{49,342},741376139},{{49,344},620673064},{{49,346},828400388},{{49,348},989198090},{{49,350},398235498},{{49,352},335164252},{{49,354},650259410},{{49,356},895482301},{{49,358},288920533},{{49,360},986020511},{{49,362},960531109},{{49,364},692510577},{{49,366},743863232},{{49,368},159848129},{{49,370},639142915},{{49,372},658806616},{{49,374},286815941},{{49,376},569150064},{{49,378},996156909},{{49,380},474086872},{{49,382},377428234},{{49,384},108191201},{{49,386},968576455},{{49,388},934066962},{{49,390},520785392},{{49,392},648351310},{{49,394},322768543},{{49,396},500047228},{{49,398},717012630},{{49,400},366640002},{{49,402},617370336},{{49,404},747113890},{{49,406},647615517},{{49,408},420668064},{{49,410},485924194},{{49,412},28548015},{{49,414},242698362},{{49,416},20265134},{{49,418},481161073},{{49,420},780894508},{{49,422},716872330},{{49,424},925052871},{{49,426},809234518},{{49,428},209608950},{{49,430},454869307},{{49,432},42621234},{{49,434},266915957},{{49,436},548835092},{{49,438},11648368},{{49,440},200676498},{{49,442},803279760},{{49,444},609790836},{{49,446},522043768},{{49,448},787672824},{{49,450},264643232},{{49,452},571421826},{{49,454},762085826},{{49,456},854807719},{{49,458},119023111},{{49,460},660310435},{{49,462},945098645},{{49,464},838260736},{{49,466},592383406},{{49,468},728604232},{{49,470},586121308},{{49,472},18945549},{{49,474},62079587},{{49,476},8000021},{{49,478},137221342},{{49,480},936745518},{{49,482},867913927},{{49,484},937623778},{{49,486},183088542},{{49,488},624248829},{{49,490},606106136},{{49,492},815005922},{{49,494},728188591},{{49,496},164502140},{{49,498},885086995},{{49,500},646575964},{{49,502},60630781},{{49,504},250914884},{{49,506},619961376},{{49,508},835493684},{{49,510},1794097},{{49,512},350786557},{{49,514},222634027},{{49,516},605402916},{{49,518},871984975},{{49,520},140157610},{{49,522},784428245},{{49,524},701028584},{{49,526},784157139},{{49,528},199990301},{{49,530},49282014},{{49,532},806191394},{{49,534},544636448},{{49,536},696393844},{{49,538},625422532},{{49,540},306981977},{{49,542},200109353},{{49,544},819880255},{{49,546},622554727},{{49,548},966234587},{{49,550},1715755},{{49,552},884432882},{{49,554},186517679},{{49,556},414057470},{{49,558},559202957},{{49,560},356291776},{{49,562},440462056},{{49,564},76496043},{{49,566},54502936},{{49,568},82793754},{{49,570},693820485},{{49,572},333532789},{{49,574},139408482},{{49,576},538301356},{{49,578},908601203},{{49,580},663844984},{{49,582},277481039},{{49,584},494620179},{{49,586},126148065},{{49,588},101563902},{{49,590},543304970},{{49,592},40138848},{{49,594},255494176},{{49,596},250466774},{{49,598},181548534},{{49,600},183041503},{{49,602},553027506},{{49,604},468172977},{{49,606},571880068},{{49,608},685135214},{{49,610},70030015},{{49,612},431414252},{{49,614},965377675},{{49,616},285528459},{{49,618},577690235},{{49,620},3039911},{{49,622},424468115},{{49,624},149219671},{{49,626},315258608},{{49,628},442938842},{{49,630},340124780},{{49,632},620577523},{{49,634},697442435},{{49,636},606981307},{{49,638},195766252},{{49,640},513624332},{{49,642},160814831},{{49,644},144529981},{{49,646},626344971},{{49,648},929525101},{{49,650},167384034},{{49,652},985564306},{{49,654},757660450},{{49,656},674490248},{{49,658},404160553},{{49,660},218780132},{{49,662},253152109},{{49,664},588527766},{{49,666},276135385},{{49,668},293545669},{{49,670},229980166},{{49,672},406532593},{{49,674},544661736},{{49,676},944987368},{{49,678},74067610},{{49,680},979465423},{{49,682},367319108},{{49,684},691015763},{{49,686},308068787},{{49,688},270297211},{{49,690},892899529},{{49,692},571121326},{{49,694},682341094},{{49,696},508186314},{{49,698},992592910},{{49,700},570463576},{{49,702},551864557},{{49,704},443417375},{{49,706},102996223},{{49,708},180706669},{{49,710},66278518},{{49,712},547390018},{{49,714},97982020},{{49,716},377733797},{{49,718},642211092},{{49,720},809569594},{{49,722},442856622},{{49,724},912786312},{{49,726},563198351},{{49,728},549331531},{{49,730},576357131},{{49,732},891027263},{{49,734},77805689},{{49,736},816522985},{{49,738},731749256},{{49,740},313952972},{{49,742},411776160},{{49,744},795006290},{{49,746},22615421},{{49,748},348238413},{{49,750},716260746},{{49,752},223962550},{{49,754},78670864},{{49,756},47765882},{{49,758},267128253},{{49,760},587371111},{{49,762},927656165},{{49,764},192469863},{{49,766},806624234},{{49,768},136996971},{{49,770},759497678},{{49,772},646978177},{{49,774},833527505},{{49,776},472805550},{{49,778},754214240},{{49,780},960030895},{{49,782},232746388},{{49,784},490616131},{{49,786},420542303},{{49,788},904038549},{{49,790},210637836},{{49,792},74285318},{{49,794},144447351},{{49,796},742135765},{{49,798},244372617},{{49,800},87595635},{{49,802},852731251},{{49,804},594678505},{{49,806},794681848},{{49,808},228154101},{{49,810},363702627},{{49,812},673985808},{{49,814},239196945},{{49,816},836249623},{{49,818},602064792},{{49,820},462168907},{{49,822},430511049},{{49,824},331217937},{{49,826},84426505},{{49,828},529390112},{{49,830},953694258},{{49,832},768941491},{{49,834},296949641},{{49,836},617567965},{{49,838},759210871},{{49,840},554347066},{{49,842},314959464},{{49,844},855978152},{{49,846},459336095},{{49,848},416019714},{{49,850},554419893},{{49,852},643616814},{{49,854},307318600},{{49,856},193723511},{{49,858},342506504},{{49,860},737708842},{{49,862},961578294},{{49,864},644413804},{{49,866},283651295},{{49,868},449519877},{{49,870},262823100},{{49,872},438065978},{{49,874},195660179},{{49,876},15479674},{{49,878},929627357},{{49,880},712657286},{{49,882},867475048},{{49,884},618979059},{{49,886},615899609},{{49,888},290553872},{{49,890},46585860},{{49,892},675146342},{{49,894},899293157},{{49,896},138576244},{{49,898},932939832},{{49,900},413352510},{{49,902},228638502},{{49,904},577046541},{{49,906},52412367},{{49,908},271101119},{{49,910},704058715},{{49,912},716195674},{{49,914},113738084},{{49,916},976781966},{{49,918},417637854},{{49,920},201849275},{{49,922},137988263},{{49,924},703452509},{{49,926},833173534},{{49,928},774723430},{{49,930},98520292},{{49,932},647910333},{{49,934},702073064},{{49,936},101667724},{{49,938},93613248},{{49,940},4773372},{{49,942},993672667},{{49,944},598539625},{{49,946},298728331},{{49,948},547262186},{{49,950},609550837},{{49,952},42278975},{{49,954},203431476},{{49,956},764589375},{{49,958},791435299},{{49,960},273439277},{{49,962},15186943},{{49,964},247517820},{{49,966},332116413},{{49,968},672582410},{{49,970},88991345},{{49,972},573172714},{{49,974},370502342},{{49,976},495515460},{{49,978},486357723},{{49,980},529038430},{{49,982},112617630},{{49,984},9655079},{{49,986},54905538},{{49,988},630913486},{{49,990},94540925},{{49,992},694069860},{{49,994},101033114},{{49,996},601510215},{{49,998},405093272},{{49,1000},877399916},{{49,1002},606786230},{{49,1004},712700446},{{49,1006},365826653},{{49,1008},440611748},{{49,1010},222502187},{{49,1012},628732942},{{49,1014},260127071},{{49,1016},415183336},{{49,1018},331627148},{{49,1020},603111841},{{49,1022},484627861},{{49,1024},252203062},{{49,1026},603610758},{{49,1028},918118836},{{49,1030},775502591},{{49,1032},558836403},{{49,1034},458735214},{{49,1036},903545723},{{49,1038},229008632},{{49,1040},239177179},{{49,1042},70767308},{{49,1044},751925156},{{49,1046},652119146},{{49,1048},980361868},{{49,1050},450630793},{{49,1052},63075950},{{49,1054},714904102},{{49,1056},795480239},{{49,1058},196855664},{{49,1060},446357279},{{49,1062},343343138},{{49,1064},751184330},{{49,1066},353543327},{{49,1068},265335039},{{49,1070},291055365},{{49,1072},141693974},{{49,1074},952501609},{{49,1076},772988967},{{49,1078},982806649},{{49,1080},295006336},{{49,1082},142133453},{{49,1084},389243658},{{49,1086},551050114},{{49,1088},837354729},{{49,1090},288032982},{{49,1092},926886748},{{49,1094},940810321},{{49,1096},996269340},{{49,1098},544323652},{{49,1100},123254721},{{49,1102},449847916},{{49,1104},164321665},{{49,1106},408440169},{{49,1108},540527971},{{49,1110},235735087},{{49,1112},384560805},{{49,1114},888470688},{{49,1116},711171300},{{49,1118},414716347},{{49,1120},219479361},{{49,1122},559050803},{{49,1124},610845133},{{49,1126},321258507},{{49,1128},296543705},{{49,1130},253557800},{{49,1132},771631909},{{49,1134},466270561},{{49,1136},966519146},{{49,1138},100544233},{{49,1140},474799959},{{49,1142},147649345},{{49,1144},956135303},{{49,1146},808272257},{{49,1148},279282920},{{49,1150},472357219},{{49,1152},422709994},{{49,1154},530025514},{{49,1156},999788009},{{49,1158},64593897},{{49,1160},709199531},{{49,1162},479060735},{{49,1164},311654131},{{49,1166},943520011},{{49,1168},427742758},{{49,1170},799287390},{{49,1172},782392773},{{49,1174},191335024},{{49,1176},830990096},{{49,1178},336010037},{{49,1180},237942831},{{49,1182},237453992},{{49,1184},695887098},{{49,1186},398366572},{{49,1188},529644737},{{49,1190},344086296},{{49,1192},862051533},{{49,1194},684436865},{{49,1196},317549101},{{49,1198},968659087},{{49,1200},366641438},{{50,0},1},{{50,2},49},{{50,4},1272},{{50,6},23124},{{50,8},329180},{{50,10},3895908},{{50,12},39783804},{{50,14},359447204},{{50,16},925733384},{{50,18},746545659},{{50,20},165655001},{{50,22},158091124},{{50,24},719304162},{{50,26},111160209},{{50,28},171158550},{{50,30},935012406},{{50,32},874008903},{{50,34},988755604},{{50,36},608336289},{{50,38},351327718},{{50,40},211049418},{{50,42},970686245},{{50,44},441380023},{{50,46},920727544},{{50,48},396494781},{{50,50},218114186},{{50,52},934368772},{{50,54},753990221},{{50,56},203263446},{{50,58},488226646},{{50,60},946324350},{{50,62},642441651},{{50,64},816607227},{{50,66},122420091},{{50,68},629716118},{{50,70},498106515},{{50,72},488881569},{{50,74},100763230},{{50,76},814241373},{{50,78},430998026},{{50,80},986590664},{{50,82},188596813},{{50,84},238499794},{{50,86},887765759},{{50,88},719310391},{{50,90},819612870},{{50,92},840885905},{{50,94},584773429},{{50,96},811468143},{{50,98},396065785},{{50,100},368868801},{{50,102},299761844},{{50,104},617462619},{{50,106},308704442},{{50,108},206242421},{{50,110},833439007},{{50,112},106715469},{{50,114},970135543},{{50,116},972244832},{{50,118},66232618},{{50,120},207050932},{{50,122},577078708},{{50,124},955731123},{{50,126},103929249},{{50,128},632790957},{{50,130},297717977},{{50,132},280927805},{{50,134},856143814},{{50,136},140717794},{{50,138},889342899},{{50,140},570959166},{{50,142},553036683},{{50,144},311778062},{{50,146},833874032},{{50,148},321035571},{{50,150},629235909},{{50,152},60666525},{{50,154},19636232},{{50,156},889773198},{{50,158},837811568},{{50,160},283828621},{{50,162},499062871},{{50,164},459250525},{{50,166},468391935},{{50,168},389843786},{{50,170},80632526},{{50,172},462481073},{{50,174},859711240},{{50,176},66143264},{{50,178},831825780},{{50,180},518914304},{{50,182},998480225},{{50,184},496960804},{{50,186},480385724},{{50,188},483317701},{{50,190},923742113},{{50,192},771054094},{{50,194},630267330},{{50,196},478946945},{{50,198},527928962},{{50,200},674723787},{{50,202},882998613},{{50,204},123711144},{{50,206},324674723},{{50,208},964132061},{{50,210},961988031},{{50,212},65215295},{{50,214},858250635},{{50,216},924300325},{{50,218},577545014},{{50,220},241841560},{{50,222},172586320},{{50,224},726876085},{{50,226},210684082},{{50,228},897202470},{{50,230},742850020},{{50,232},161301259},{{50,234},120853804},{{50,236},344539574},{{50,238},836860211},{{50,240},667275920},{{50,242},72688787},{{50,244},930704832},{{50,246},179668299},{{50,248},861726583},{{50,250},168665810},{{50,252},834696469},{{50,254},672920894},{{50,256},419563732},{{50,258},302874180},{{50,260},454615268},{{50,262},934181182},{{50,264},119694911},{{50,266},779976833},{{50,268},216225187},{{50,270},244379028},{{50,272},586838513},{{50,274},942544272},{{50,276},397970796},{{50,278},155525782},{{50,280},435250288},{{50,282},609294947},{{50,284},697035870},{{50,286},790138207},{{50,288},313089121},{{50,290},451259481},{{50,292},904475234},{{50,294},15500998},{{50,296},428233316},{{50,298},352796372},{{50,300},805867626},{{50,302},355791012},{{50,304},191743365},{{50,306},390372515},{{50,308},86113794},{{50,310},224579645},{{50,312},34292553},{{50,314},472538607},{{50,316},244805809},{{50,318},799547326},{{50,320},350596592},{{50,322},550928379},{{50,324},248605526},{{50,326},858957317},{{50,328},809083222},{{50,330},418025439},{{50,332},717379009},{{50,334},843111164},{{50,336},748566980},{{50,338},795763411},{{50,340},344249103},{{50,342},246799165},{{50,344},468081584},{{50,346},533360568},{{50,348},97839725},{{50,350},814208152},{{50,352},370784820},{{50,354},149643652},{{50,356},648814350},{{50,358},586462723},{{50,360},179226570},{{50,362},323415874},{{50,364},413399345},{{50,366},830824722},{{50,368},901264775},{{50,370},785155020},{{50,372},673315179},{{50,374},883230707},{{50,376},320461657},{{50,378},209574161},{{50,380},896187167},{{50,382},641537195},{{50,384},580708044},{{50,386},615201169},{{50,388},907420567},{{50,390},226969633},{{50,392},44823693},{{50,394},653925850},{{50,396},618905940},{{50,398},556249274},{{50,400},683808190},{{50,402},595045606},{{50,404},406684866},{{50,406},817926872},{{50,408},498013040},{{50,410},741888764},{{50,412},255307898},{{50,414},750076370},{{50,416},226664326},{{50,418},45791371},{{50,420},138249186},{{50,422},182084615},{{50,424},925519009},{{50,426},32002450},{{50,428},507648904},{{50,430},36302093},{{50,432},164244320},{{50,434},134446595},{{50,436},176304234},{{50,438},443232913},{{50,440},204696272},{{50,442},377207389},{{50,444},330407781},{{50,446},317016375},{{50,448},255990328},{{50,450},346121343},{{50,452},776903928},{{50,454},865285835},{{50,456},180645765},{{50,458},94169320},{{50,460},523805568},{{50,462},66571932},{{50,464},958229276},{{50,466},706032441},{{50,468},157122799},{{50,470},174128102},{{50,472},265560802},{{50,474},960871567},{{50,476},814597354},{{50,478},840895548},{{50,480},702037},{{50,482},848074074},{{50,484},17426708},{{50,486},276377856},{{50,488},55696613},{{50,490},206160180},{{50,492},32721003},{{50,494},453495162},{{50,496},587538197},{{50,498},204676036},{{50,500},610254246},{{50,502},936113705},{{50,504},842825687},{{50,506},202272844},{{50,508},145230437},{{50,510},624393323},{{50,512},739106533},{{50,514},700708897},{{50,516},523328161},{{50,518},691038973},{{50,520},656087189},{{50,522},213848962},{{50,524},927815456},{{50,526},921255504},{{50,528},609475698},{{50,530},113463094},{{50,532},529085932},{{50,534},807792149},{{50,536},579407091},{{50,538},163833313},{{50,540},694176222},{{50,542},471399591},{{50,544},346973697},{{50,546},718259544},{{50,548},297359882},{{50,550},892552532},{{50,552},451373341},{{50,554},120883534},{{50,556},8029910},{{50,558},624607649},{{50,560},606649877},{{50,562},815313728},{{50,564},231664869},{{50,566},673443919},{{50,568},615486405},{{50,570},94571095},{{50,572},110823650},{{50,574},950289120},{{50,576},646876432},{{50,578},928906934},{{50,580},684469503},{{50,582},297251947},{{50,584},919054473},{{50,586},285157267},{{50,588},967739040},{{50,590},274416446},{{50,592},465229888},{{50,594},656873003},{{50,596},825576691},{{50,598},53305194},{{50,600},539107135},{{50,602},609069516},{{50,604},669008004},{{50,606},585520763},{{50,608},526072937},{{50,610},91836656},{{50,612},101778461},{{50,614},538228891},{{50,616},424599066},{{50,618},719851020},{{50,620},234795290},{{50,622},701214554},{{50,624},914481398},{{50,626},497763115},{{50,628},504286064},{{50,630},212679726},{{50,632},409710596},{{50,634},134500525},{{50,636},154608785},{{50,638},554889670},{{50,640},267547678},{{50,642},851784437},{{50,644},749366191},{{50,646},681515762},{{50,648},587313005},{{50,650},604179607},{{50,652},297539881},{{50,654},51380469},{{50,656},30897443},{{50,658},988568867},{{50,660},430543091},{{50,662},168358864},{{50,664},325894509},{{50,666},131217074},{{50,668},122226126},{{50,670},289735266},{{50,672},2541560},{{50,674},697428098},{{50,676},339809826},{{50,678},339814711},{{50,680},568813016},{{50,682},256466301},{{50,684},865405619},{{50,686},710940331},{{50,688},7424767},{{50,690},660900037},{{50,692},729644940},{{50,694},444},{{50,696},450105203},{{50,698},690939247},{{50,700},459755659},{{50,702},92556107},{{50,704},42398758},{{50,706},782901298},{{50,708},483436309},{{50,710},73995240},{{50,712},784415989},{{50,714},602791285},{{50,716},655683750},{{50,718},744368335},{{50,720},684929720},{{50,722},939318197},{{50,724},1937536},{{50,726},94209990},{{50,728},544006669},{{50,730},195169186},{{50,732},297173575},{{50,734},151918090},{{50,736},559870646},{{50,738},425964491},{{50,740},818978660},{{50,742},571568643},{{50,744},60393204},{{50,746},415731654},{{50,748},547756555},{{50,750},991386612},{{50,752},383053326},{{50,754},997830526},{{50,756},963081859},{{50,758},107336308},{{50,760},898219937},{{50,762},906988404},{{50,764},550036125},{{50,766},981857264},{{50,768},691293427},{{50,770},481189647},{{50,772},501756531},{{50,774},316529056},{{50,776},476096058},{{50,778},168221459},{{50,780},165690115},{{50,782},553028411},{{50,784},960794528},{{50,786},453386272},{{50,788},963889156},{{50,790},71983103},{{50,792},494867184},{{50,794},462967097},{{50,796},635240847},{{50,798},989817132},{{50,800},23786457},{{50,802},968645733},{{50,804},163475174},{{50,806},884798755},{{50,808},971346358},{{50,810},8231228},{{50,812},947835970},{{50,814},751371876},{{50,816},21594745},{{50,818},702982989},{{50,820},997528759},{{50,822},30899466},{{50,824},874470660},{{50,826},839706683},{{50,828},64336797},{{50,830},183002010},{{50,832},415355406},{{50,834},851375333},{{50,836},802315034},{{50,838},662347966},{{50,840},459017349},{{50,842},83113197},{{50,844},807783874},{{50,846},686211775},{{50,848},665742332},{{50,850},548408223},{{50,852},38712773},{{50,854},947065654},{{50,856},224142524},{{50,858},544199777},{{50,860},554457822},{{50,862},161813447},{{50,864},59932464},{{50,866},324817969},{{50,868},826816639},{{50,870},159675767},{{50,872},610260222},{{50,874},802832692},{{50,876},962264291},{{50,878},230527850},{{50,880},654881259},{{50,882},493134625},{{50,884},56109407},{{50,886},491401533},{{50,888},163680598},{{50,890},892934948},{{50,892},889185132},{{50,894},78662275},{{50,896},741528574},{{50,898},616484511},{{50,900},204394884},{{50,902},120980232},{{50,904},4959172},{{50,906},884202370},{{50,908},468625389},{{50,910},987185268},{{50,912},797914336},{{50,914},292935354},{{50,916},542176515},{{50,918},965256954},{{50,920},25044127},{{50,922},701524209},{{50,924},669825969},{{50,926},264620823},{{50,928},983915826},{{50,930},463815578},{{50,932},325409981},{{50,934},142164710},{{50,936},946513145},{{50,938},626025918},{{50,940},890502327},{{50,942},456729879},{{50,944},921471703},{{50,946},889764153},{{50,948},10834930},{{50,950},550258959},{{50,952},888111963},{{50,954},456661896},{{50,956},560525119},{{50,958},254574198},{{50,960},379302005},{{50,962},359197537},{{50,964},748972811},{{50,966},432885247},{{50,968},174603143},{{50,970},495215302},{{50,972},304225805},{{50,974},499574},{{50,976},89067439},{{50,978},956588800},{{50,980},479903186},{{50,982},900293862},{{50,984},918419160},{{50,986},874312513},{{50,988},779518268},{{50,990},750190343},{{50,992},34999197},{{50,994},204187488},{{50,996},29703716},{{50,998},310295240},{{50,1000},212734818},{{50,1002},705461990},{{50,1004},880565621},{{50,1006},542764103},{{50,1008},578132976},{{50,1010},871657196},{{50,1012},920555643},{{50,1014},635330221},{{50,1016},603836039},{{50,1018},905337022},{{50,1020},446003049},{{50,1022},531829391},{{50,1024},914627500},{{50,1026},109964459},{{50,1028},793773872},{{50,1030},883594493},{{50,1032},588890899},{{50,1034},761763418},{{50,1036},850946563},{{50,1038},47045637},{{50,1040},406265955},{{50,1042},398330580},{{50,1044},175033998},{{50,1046},98562597},{{50,1048},74022406},{{50,1050},109783010},{{50,1052},888406279},{{50,1054},62923507},{{50,1056},851720727},{{50,1058},920064661},{{50,1060},659715101},{{50,1062},731241623},{{50,1064},740764931},{{50,1066},68490942},{{50,1068},26861674},{{50,1070},832409630},{{50,1072},156628069},{{50,1074},65837301},{{50,1076},277330611},{{50,1078},504531610},{{50,1080},621094682},{{50,1082},513712789},{{50,1084},824543274},{{50,1086},863846088},{{50,1088},522929299},{{50,1090},50674845},{{50,1092},205053841},{{50,1094},391074024},{{50,1096},703020653},{{50,1098},598865065},{{50,1100},977680558},{{50,1102},126857946},{{50,1104},571772915},{{50,1106},596794646},{{50,1108},195429545},{{50,1110},328266420},{{50,1112},36051456},{{50,1114},451216030},{{50,1116},522276964},{{50,1118},948367998},{{50,1120},561406981},{{50,1122},389510759},{{50,1124},585943971},{{50,1126},108053297},{{50,1128},459413669},{{50,1130},288907310},{{50,1132},136029766},{{50,1134},802792879},{{50,1136},520247265},{{50,1138},414339912},{{50,1140},337619243},{{50,1142},597859489},{{50,1144},40005835},{{50,1146},350918},{{50,1148},321070418},{{50,1150},199829979},{{50,1152},141119131},{{50,1154},515535428},{{50,1156},350920730},{{50,1158},314377413},{{50,1160},808898947},{{50,1162},900198037},{{50,1164},799762368},{{50,1166},570476717},{{50,1168},244997759},{{50,1170},402733111},{{50,1172},626061442},{{50,1174},103647198},{{50,1176},938528989},{{50,1178},898060580},{{50,1180},652361018},{{50,1182},641847472},{{50,1184},149112119},{{50,1186},134262079},{{50,1188},887185896},{{50,1190},606038263},{{50,1192},859408453},{{50,1194},950373236},{{50,1196},692335861},{{50,1198},405660442},{{50,1200},565431386},{{50,1202},959094106},{{50,1204},393940636},{{50,1206},423632434},{{50,1208},612413824},{{50,1210},143336067},{{50,1212},663257107},{{50,1214},9730523},{{50,1216},471491852},{{50,1218},112828340},{{50,1220},936303905},{{50,1222},998673093},{{50,1224},55233966},{{50,1226},416039620},{{50,1228},144081002},{{50,1230},565258672},{{50,1232},539355694},{{50,1234},202448366},{{50,1236},14002378},{{50,1238},539019751},{{50,1240},307827209},{{50,1242},288622328},{{50,1244},788194350},{{50,1246},570120788},{{50,1248},965430343},{{50,1250},472467292}, // }; void solve_umekomi() { map<PII, int> m; int n, k; cin >> n >> k; if (k % 2 == 1) cout << 0 << endl; else { cout << m[PII(n, k)] << endl; } } template <std::uint_least32_t MODULO> class modint { public: using uint32 = std::uint_least32_t; using uint64 = std::uint_least64_t; using iint64 = std::int_fast64_t; class optimize_tag_t {}; static constexpr optimize_tag_t optimize_tag{}; public: using value_type = uint32; value_type a; static constexpr value_type cst(iint64 x) noexcept { x %= static_cast<iint64>(MODULO); if (x < static_cast<iint64>(0)) { x += static_cast<iint64>(MODULO); } return static_cast<value_type>(x); } constexpr modint(optimize_tag_t, const value_type &x) noexcept : a(x) {} constexpr modint() noexcept : a(static_cast<value_type>(0)) {} constexpr modint(const iint64 &x) noexcept : a(cst(x)) {} constexpr modint operator+(const modint &o) const noexcept { return modint(optimize_tag, a + o.a < MODULO ? a + o.a : a + o.a - MODULO); } constexpr modint operator-(const modint &o) const noexcept { return modint(optimize_tag, a < o.a ? a + MODULO - o.a : a - o.a); } constexpr modint operator*(const modint &o) const noexcept { return modint(optimize_tag, static_cast<value_type>(static_cast<uint64>(a) * static_cast<uint64>(o.a) % static_cast<uint64>(MODULO))); } constexpr modint operator/(const modint &o) const { return modint(optimize_tag, static_cast<value_type>(static_cast<uint64>(a) * static_cast<uint64>((~o).a) % static_cast<uint64>(MODULO))); } modint &operator+=(const modint &o) noexcept { if ((a += o.a) >= MODULO) a -= MODULO; return *this; } modint &operator-=(const modint &o) noexcept { if (a < o.a) a += MODULO; a -= o.a; return *this; } modint &operator*=(const modint &o) noexcept { a = static_cast<value_type>(static_cast<uint64>(a) * static_cast<uint64>(o.a) % static_cast<uint64>(MODULO)); return *this; } modint &operator/=(const modint &o) { a = static_cast<uint64>(a) * (~o).a % MODULO; return *this; } constexpr modint inverse() const noexcept { assert(a != static_cast<value_type>(0) && "0 does not have inverse"); return pow(static_cast<uint64>(MODULO - static_cast<value_type>(2))); } constexpr modint operator~() const noexcept { return inverse(); } constexpr modint operator-() const noexcept { if (a == static_cast<value_type>(0)) { return modint(optimize_tag, static_cast<value_type>(0)); } else { return modint(optimize_tag, MODULO - a); } } modint &operator++() noexcept { if (++a == MODULO) { a = static_cast<value_type>(0); } return *this; } modint &operator--() noexcept { if (a == static_cast<value_type>(0)) { a = MODULO; } --a; return *this; } constexpr bool operator==(const modint &o) const noexcept { return a == o.a; } constexpr bool operator!=(const modint &o) const noexcept { return a != o.a; } constexpr bool operator<(const modint &o) const noexcept { return a < o.a; } constexpr bool operator<=(const modint &o) const noexcept { return a <= o.a; } constexpr bool operator>(const modint &o) const noexcept { return a > o.a; } constexpr bool operator>=(const modint &o) const noexcept { return a >= o.a; } constexpr explicit operator bool() const noexcept { return a; } constexpr explicit operator value_type() const noexcept { return a; } modint pow(iint64 inx) const noexcept { if (inx < 0) assert(a != static_cast<value_type>(0) && "not pow index < 0"); uint64 x = inx; uint64 t = a, u = 1; while (x) { if (x & 1) u = u * t % MODULO; t = (t * t) % MODULO; x >>= 1; } return modint(optimize_tag, static_cast<value_type>(u)); } constexpr value_type get() const noexcept { return a; } }; using mint = modint<MOD>; mint dp[51][51][3503]; void solve_dp() { LL N, score; cin >> N >> score; dp[0][0][0] = 1; // (i,j left, score sum) FOR(i, 0, N) { FOR(j, 0, i + 1) { FOR(k, 0, score + 1) { { // o---o int nj = j; dp[i + 1][nj][k + 2 * nj] += dp[i][j][k]; } { // o...o int nj = j + 1; dp[i + 1][nj][k + 2 * nj] += dp[i][j][k]; } { // o/...o int nj = j; dp[i + 1][nj][k + 2 * nj] += dp[i][j][k] * (2 * j); } if (j) { // o/..\o int nj = j - 1; dp[i + 1][nj][k + 2 * nj] += dp[i][j][k] * (j * j); } } } } mint ans = dp[N][0][score]; cout << ans.get() << "\n"; } int main() { cin.tie(0); ios_base::sync_with_stdio(false); // maintest(); // cap(); // return 0; // solve_umekomi(); solve_dp(); return 0; }
replace
211
212
211
212
0
p02974
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (ll i = 0; i < ((ll)(n)); i++) #define reg(i, a, b) for (ll i = ((ll)(a)); i <= ((ll)(b)); i++) #define irep(i, n) for (ll i = ((ll)(n)-1); i >= 0; i--) #define ireg(i, a, b) for (ll i = ((ll)(b)); i >= ((ll)(a)); i--) /* またぐときにコストが発生すると考える。 dp(i,j) = i個保留、コストがjとなる場合の数 */ template <int MOD> struct ModInt { static const int Mod = MOD; unsigned x; ModInt() : x(0) {} ModInt(signed sig) { int sigt = sig % MOD; if (sigt < 0) sigt += MOD; x = sigt; } ModInt(signed long long sig) { int sigt = sig % MOD; if (sigt < 0) sigt += MOD; x = sigt; } int get() const { return (int)x; } ModInt &operator+=(ModInt that) { if ((x += that.x) >= MOD) x -= MOD; return *this; } ModInt &operator-=(ModInt that) { if ((x += MOD - that.x) >= MOD) x -= MOD; return *this; } ModInt &operator*=(ModInt that) { x = (unsigned long long)x * that.x % MOD; return *this; } ModInt &operator/=(ModInt that) { return *this *= that.inverse(); } ModInt operator+(ModInt that) const { return ModInt(*this) += that; } ModInt operator-(ModInt that) const { return ModInt(*this) -= that; } ModInt operator*(ModInt that) const { return ModInt(*this) *= that; } ModInt operator/(ModInt that) const { return ModInt(*this) /= that; } ModInt inverse() const { signed a = x, b = MOD, u = 1, v = 0; while (b) { signed t = a / b; a -= t * b; std::swap(a, b); u -= t * v; std::swap(u, v); } if (u < 0) u += Mod; ModInt res; res.x = (unsigned)u; return res; } }; typedef ModInt<1000000007> mint; ll n, m; mint dp[51][5001], dp2[51][5001]; void init() { cin >> n >> m; dp[0][0] = 1; } int main(void) { init(); rep(i, n) { rep(j, n) { rep(k, n * n + 1) { dp2[j][k + j * 2] += dp[j][k] * 2 * j; // どのjとくっつくかで 2j 通り dp2[j - 1][k + j * 2] += dp[j][k] * j * j; // 左右それぞれどのjを受け取るかで j^2 通り dp2[j][k + j * 2] += dp[j][k]; // ---- dp2[j + 1][k + j * 2] += dp[j][k]; // 出す } } // cerr<<i<<endl; rep(j, n) { rep(k, n * n + 1) { dp[j][k] = dp2[j][k]; dp2[j][k] = 0; // cerr<<dp[j][k].get()<<" "; } // cerr<<endl; } } cout << dp[0][m].get() << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (ll i = 0; i < ((ll)(n)); i++) #define reg(i, a, b) for (ll i = ((ll)(a)); i <= ((ll)(b)); i++) #define irep(i, n) for (ll i = ((ll)(n)-1); i >= 0; i--) #define ireg(i, a, b) for (ll i = ((ll)(b)); i >= ((ll)(a)); i--) /* またぐときにコストが発生すると考える。 dp(i,j) = i個保留、コストがjとなる場合の数 */ template <int MOD> struct ModInt { static const int Mod = MOD; unsigned x; ModInt() : x(0) {} ModInt(signed sig) { int sigt = sig % MOD; if (sigt < 0) sigt += MOD; x = sigt; } ModInt(signed long long sig) { int sigt = sig % MOD; if (sigt < 0) sigt += MOD; x = sigt; } int get() const { return (int)x; } ModInt &operator+=(ModInt that) { if ((x += that.x) >= MOD) x -= MOD; return *this; } ModInt &operator-=(ModInt that) { if ((x += MOD - that.x) >= MOD) x -= MOD; return *this; } ModInt &operator*=(ModInt that) { x = (unsigned long long)x * that.x % MOD; return *this; } ModInt &operator/=(ModInt that) { return *this *= that.inverse(); } ModInt operator+(ModInt that) const { return ModInt(*this) += that; } ModInt operator-(ModInt that) const { return ModInt(*this) -= that; } ModInt operator*(ModInt that) const { return ModInt(*this) *= that; } ModInt operator/(ModInt that) const { return ModInt(*this) /= that; } ModInt inverse() const { signed a = x, b = MOD, u = 1, v = 0; while (b) { signed t = a / b; a -= t * b; std::swap(a, b); u -= t * v; std::swap(u, v); } if (u < 0) u += Mod; ModInt res; res.x = (unsigned)u; return res; } }; typedef ModInt<1000000007> mint; ll n, m; mint dp[51][5001], dp2[51][5001]; void init() { cin >> n >> m; dp[0][0] = 1; } int main(void) { init(); rep(i, n) { rep(j, n) { rep(k, n * n + 1) { dp2[j][k + j * 2] += dp[j][k] * 2 * j; // どのjとくっつくかで 2j 通り if (j - 1 >= 0) dp2[j - 1][k + j * 2] += dp[j][k] * j * j; // 左右それぞれどのjを受け取るかで j^2 通り dp2[j][k + j * 2] += dp[j][k]; // ---- dp2[j + 1][k + j * 2] += dp[j][k]; // 出す } } // cerr<<i<<endl; rep(j, n) { rep(k, n * n + 1) { dp[j][k] = dp2[j][k]; dp2[j][k] = 0; // cerr<<dp[j][k].get()<<" "; } // cerr<<endl; } } cout << dp[0][m].get() << endl; return 0; }
replace
84
86
84
87
0
p02974
C++
Runtime Error
#pragma GCC optimize("O3") #include <algorithm> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unordered_map> #include <unordered_set> using namespace std; using QWORD = uint64_t; using SQWORD = int64_t; using DWORD = uint32_t; using SDWORD = int32_t; using WORD = uint16_t; using SWORD = int16_t; using BYTE = uint8_t; using SBYTE = int8_t; using DOUBLE = double; using FLOAT = float; #define MIN_SDWORD (-2147483648) #define MAX_SDWORD (2147483647) #define MIN_SBYTE (-128) #define MAX_SBYTE (127) #define MIN_SQWORD (0x8000000000000000) #define MAX_SQWORD (0x7FFFFFFFFFFFFFFF) #define MAX_QWORD (0xFFFFFFFFFFFFFFFF) #define MAX_DWORD (0xFFFFFFFF) #define MAX_WORD (0xFFFF) #define MAX_BYTE (0xFF) #define MAX_DOUBLE (1.0e+308) #define DOUBLE_EPS (1.0e-12) #define MIN_DOUBLE_N (-1.0e+308) #define ArrayLength(a) (sizeof(a) / sizeof(a[0])) static inline DOUBLE MAX(DOUBLE a, DOUBLE b) { return a > b ? a : b; } static inline QWORD MAX(QWORD a, QWORD b) { return a > b ? a : b; } static inline DWORD MAX(DWORD a, DWORD b) { return a > b ? a : b; } static inline SDWORD MAX(SDWORD a, SDWORD b) { return a > b ? a : b; } static inline DOUBLE MIN(DOUBLE a, DOUBLE b) { return a < b ? a : b; } static inline QWORD MIN(QWORD a, QWORD b) { return a < b ? a : b; } static inline DWORD MIN(DWORD a, DWORD b) { return a < b ? a : b; } static inline SDWORD MIN(SDWORD a, SDWORD b) { return a < b ? a : b; } #define BYTE_BITS (8) #define WORD_BITS (16) #define DWORD_BITS (32) #define QWORD_BITS (64) static inline void inputStringSpSeparated(char *pcStr) { char *pcCur = pcStr; for (;;) { char c = getchar(); if (('\n' == c) || (EOF == c) || (' ' == c)) { break; } *pcCur = c; pcCur++; } *pcCur = '\0'; } static inline void inputString(char *pcStr) { char *pcCur = pcStr; for (;;) { char c = getchar(); if (('\n' == c) || (EOF == c)) { break; } *pcCur = c; pcCur++; } *pcCur = '\0'; } static inline SQWORD inputSQWORD(void) { SQWORD sqNumber = 0; SQWORD sqMultiplier = 1; bool bRead = false; for (;;) { char c = getchar(); if (!bRead) { if ('-' == c) { sqMultiplier = -1; } } if (('0' <= c) && (c <= '9')) { sqNumber *= 10LL; sqNumber += (SQWORD)(c - '0'); bRead = true; } else { if (bRead) { return sqNumber * sqMultiplier; } } } } static inline SDWORD inputSDWORD(void) { SDWORD lNumber = 0; SDWORD lMultiplier = 1; bool bRead = false; for (;;) { char c = getchar(); if (!bRead) { if ('-' == c) { lMultiplier = -1; } } if (('0' <= c) && (c <= '9')) { lNumber *= 10; lNumber += (c - '0'); bRead = true; } else { if (bRead) { return lNumber * lMultiplier; } } } } static inline DOUBLE inputFP(void) { DOUBLE dInt = 0.0; DOUBLE dFrac = 0.0; DOUBLE dMultiplier = 1.0; DWORD dwFpCnt = 0; DOUBLE *pdCur = &dInt; bool bRead = false; for (;;) { char c = getchar(); if (!bRead) { if ('-' == c) { dMultiplier = -1; } } if ('.' == c) { pdCur = &dFrac; } else if (('0' <= c) && (c <= '9')) { (*pdCur) *= 10; (*pdCur) += (DOUBLE)(c - '0'); bRead = true; if (pdCur == &dFrac) { dwFpCnt++; } } else { if (bRead) { return dMultiplier * (dInt + dFrac / (pow((DOUBLE)10.0, (DOUBLE)dwFpCnt))); } } } } /** * mod による操作ライブラリ */ #define ANS_MOD (1000000007LL) static SQWORD addMod(SQWORD x, SQWORD y) { return (x + y) % ANS_MOD; } static SQWORD subMod(SQWORD x, SQWORD y) { return (x - y + ANS_MOD) % ANS_MOD; } static SQWORD mulMod(SQWORD x, SQWORD y) { return (x * y) % ANS_MOD; } static SQWORD powMod(SQWORD x, SQWORD e) { SQWORD v = 1; for (; e; x = mulMod(x, x), e >>= 1) { if (e & 1) { v = mulMod(v, x); } } return v; } static SQWORD divMod(SQWORD x, SQWORD y) { return mulMod(x, powMod(y, ANS_MOD - 2)); } static SQWORD combMod(SQWORD n, SQWORD k) { SQWORD v = 1; for (SQWORD i = 1; i <= k; i++) { v = divMod(mulMod(v, n - i + 1), i); } return v; } /*----------------------------------------------*/ #define ARYSIZE_N (50 + 1) #define ARYSIZE_ODDNESS (ARYSIZE_N * ARYSIZE_N + ARYSIZE_N * 2) #define MAX_ODDNESS (50 * 50) int main(void) { SQWORD sqInput_n = inputSQWORD(); SQWORD sqInput_k = inputSQWORD(); /* * dp[i][j][k] * 上からi段目、 * 保留(未接続線) がj本 * 奇妙さがk */ static SQWORD s_aaasqDp[ARYSIZE_N][ARYSIZE_N][ARYSIZE_ODDNESS]; s_aaasqDp[0][0][0] = 1; for (SQWORD sqIdxNum = 1; sqIdxNum <= sqInput_n; sqIdxNum++) { for (SQWORD sqUnCon = 0; sqUnCon <= sqIdxNum; sqUnCon++) { for (SQWORD sqOddness = 0; sqOddness <= MAX_ODDNESS; sqOddness++) { /* 〇 --- 〇 */ { SQWORD sqNextUnCon = sqUnCon; SQWORD *psqDpTbl = &(s_aaasqDp[sqIdxNum][sqNextUnCon][sqOddness + sqUnCon * 2]); *psqDpTbl = addMod(*psqDpTbl, s_aaasqDp[sqIdxNum - 1][sqUnCon][sqOddness]); } /* 〇・ ・〇 */ { SQWORD sqNextUnCon = sqUnCon + 1; SQWORD *psqDpTbl = &(s_aaasqDp[sqIdxNum][sqNextUnCon][sqOddness + sqUnCon * 2]); *psqDpTbl = addMod(*psqDpTbl, s_aaasqDp[sqIdxNum - 1][sqUnCon][sqOddness]); } /* 〇↑ ・〇 、 〇・ ↑〇 */ { SQWORD sqNextUnCon = sqUnCon; SQWORD *psqDpTbl = &(s_aaasqDp[sqIdxNum][sqNextUnCon][sqOddness + sqUnCon * 2]); SQWORD sqMul = sqUnCon * 2; *psqDpTbl = addMod( *psqDpTbl, mulMod(s_aaasqDp[sqIdxNum - 1][sqUnCon][sqOddness], sqMul)); } /* 〇↑ ↑〇 */ if (1 <= sqUnCon) { SQWORD sqNextUnCon = sqUnCon - 1; SQWORD *psqDpTbl = &(s_aaasqDp[sqIdxNum][sqNextUnCon][sqOddness + sqUnCon * 2]); SQWORD sqMul = mulMod(sqUnCon, sqUnCon); *psqDpTbl = addMod( *psqDpTbl, mulMod(s_aaasqDp[sqIdxNum - 1][sqUnCon][sqOddness], sqMul)); } } } } SQWORD sqAns = s_aaasqDp[sqInput_n][0][sqInput_k]; printf("%lld\n", sqAns); return 0; }
#pragma GCC optimize("O3") #include <algorithm> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unordered_map> #include <unordered_set> using namespace std; using QWORD = uint64_t; using SQWORD = int64_t; using DWORD = uint32_t; using SDWORD = int32_t; using WORD = uint16_t; using SWORD = int16_t; using BYTE = uint8_t; using SBYTE = int8_t; using DOUBLE = double; using FLOAT = float; #define MIN_SDWORD (-2147483648) #define MAX_SDWORD (2147483647) #define MIN_SBYTE (-128) #define MAX_SBYTE (127) #define MIN_SQWORD (0x8000000000000000) #define MAX_SQWORD (0x7FFFFFFFFFFFFFFF) #define MAX_QWORD (0xFFFFFFFFFFFFFFFF) #define MAX_DWORD (0xFFFFFFFF) #define MAX_WORD (0xFFFF) #define MAX_BYTE (0xFF) #define MAX_DOUBLE (1.0e+308) #define DOUBLE_EPS (1.0e-12) #define MIN_DOUBLE_N (-1.0e+308) #define ArrayLength(a) (sizeof(a) / sizeof(a[0])) static inline DOUBLE MAX(DOUBLE a, DOUBLE b) { return a > b ? a : b; } static inline QWORD MAX(QWORD a, QWORD b) { return a > b ? a : b; } static inline DWORD MAX(DWORD a, DWORD b) { return a > b ? a : b; } static inline SDWORD MAX(SDWORD a, SDWORD b) { return a > b ? a : b; } static inline DOUBLE MIN(DOUBLE a, DOUBLE b) { return a < b ? a : b; } static inline QWORD MIN(QWORD a, QWORD b) { return a < b ? a : b; } static inline DWORD MIN(DWORD a, DWORD b) { return a < b ? a : b; } static inline SDWORD MIN(SDWORD a, SDWORD b) { return a < b ? a : b; } #define BYTE_BITS (8) #define WORD_BITS (16) #define DWORD_BITS (32) #define QWORD_BITS (64) static inline void inputStringSpSeparated(char *pcStr) { char *pcCur = pcStr; for (;;) { char c = getchar(); if (('\n' == c) || (EOF == c) || (' ' == c)) { break; } *pcCur = c; pcCur++; } *pcCur = '\0'; } static inline void inputString(char *pcStr) { char *pcCur = pcStr; for (;;) { char c = getchar(); if (('\n' == c) || (EOF == c)) { break; } *pcCur = c; pcCur++; } *pcCur = '\0'; } static inline SQWORD inputSQWORD(void) { SQWORD sqNumber = 0; SQWORD sqMultiplier = 1; bool bRead = false; for (;;) { char c = getchar(); if (!bRead) { if ('-' == c) { sqMultiplier = -1; } } if (('0' <= c) && (c <= '9')) { sqNumber *= 10LL; sqNumber += (SQWORD)(c - '0'); bRead = true; } else { if (bRead) { return sqNumber * sqMultiplier; } } } } static inline SDWORD inputSDWORD(void) { SDWORD lNumber = 0; SDWORD lMultiplier = 1; bool bRead = false; for (;;) { char c = getchar(); if (!bRead) { if ('-' == c) { lMultiplier = -1; } } if (('0' <= c) && (c <= '9')) { lNumber *= 10; lNumber += (c - '0'); bRead = true; } else { if (bRead) { return lNumber * lMultiplier; } } } } static inline DOUBLE inputFP(void) { DOUBLE dInt = 0.0; DOUBLE dFrac = 0.0; DOUBLE dMultiplier = 1.0; DWORD dwFpCnt = 0; DOUBLE *pdCur = &dInt; bool bRead = false; for (;;) { char c = getchar(); if (!bRead) { if ('-' == c) { dMultiplier = -1; } } if ('.' == c) { pdCur = &dFrac; } else if (('0' <= c) && (c <= '9')) { (*pdCur) *= 10; (*pdCur) += (DOUBLE)(c - '0'); bRead = true; if (pdCur == &dFrac) { dwFpCnt++; } } else { if (bRead) { return dMultiplier * (dInt + dFrac / (pow((DOUBLE)10.0, (DOUBLE)dwFpCnt))); } } } } /** * mod による操作ライブラリ */ #define ANS_MOD (1000000007LL) static SQWORD addMod(SQWORD x, SQWORD y) { return (x + y) % ANS_MOD; } static SQWORD subMod(SQWORD x, SQWORD y) { return (x - y + ANS_MOD) % ANS_MOD; } static SQWORD mulMod(SQWORD x, SQWORD y) { return (x * y) % ANS_MOD; } static SQWORD powMod(SQWORD x, SQWORD e) { SQWORD v = 1; for (; e; x = mulMod(x, x), e >>= 1) { if (e & 1) { v = mulMod(v, x); } } return v; } static SQWORD divMod(SQWORD x, SQWORD y) { return mulMod(x, powMod(y, ANS_MOD - 2)); } static SQWORD combMod(SQWORD n, SQWORD k) { SQWORD v = 1; for (SQWORD i = 1; i <= k; i++) { v = divMod(mulMod(v, n - i + 1), i); } return v; } /*----------------------------------------------*/ #define ARYSIZE_N (50 + 2) #define ARYSIZE_ODDNESS (ARYSIZE_N * ARYSIZE_N + ARYSIZE_N * 2) #define MAX_ODDNESS (50 * 50) int main(void) { SQWORD sqInput_n = inputSQWORD(); SQWORD sqInput_k = inputSQWORD(); /* * dp[i][j][k] * 上からi段目、 * 保留(未接続線) がj本 * 奇妙さがk */ static SQWORD s_aaasqDp[ARYSIZE_N][ARYSIZE_N][ARYSIZE_ODDNESS]; s_aaasqDp[0][0][0] = 1; for (SQWORD sqIdxNum = 1; sqIdxNum <= sqInput_n; sqIdxNum++) { for (SQWORD sqUnCon = 0; sqUnCon <= sqIdxNum; sqUnCon++) { for (SQWORD sqOddness = 0; sqOddness <= MAX_ODDNESS; sqOddness++) { /* 〇 --- 〇 */ { SQWORD sqNextUnCon = sqUnCon; SQWORD *psqDpTbl = &(s_aaasqDp[sqIdxNum][sqNextUnCon][sqOddness + sqUnCon * 2]); *psqDpTbl = addMod(*psqDpTbl, s_aaasqDp[sqIdxNum - 1][sqUnCon][sqOddness]); } /* 〇・ ・〇 */ { SQWORD sqNextUnCon = sqUnCon + 1; SQWORD *psqDpTbl = &(s_aaasqDp[sqIdxNum][sqNextUnCon][sqOddness + sqUnCon * 2]); *psqDpTbl = addMod(*psqDpTbl, s_aaasqDp[sqIdxNum - 1][sqUnCon][sqOddness]); } /* 〇↑ ・〇 、 〇・ ↑〇 */ { SQWORD sqNextUnCon = sqUnCon; SQWORD *psqDpTbl = &(s_aaasqDp[sqIdxNum][sqNextUnCon][sqOddness + sqUnCon * 2]); SQWORD sqMul = sqUnCon * 2; *psqDpTbl = addMod( *psqDpTbl, mulMod(s_aaasqDp[sqIdxNum - 1][sqUnCon][sqOddness], sqMul)); } /* 〇↑ ↑〇 */ if (1 <= sqUnCon) { SQWORD sqNextUnCon = sqUnCon - 1; SQWORD *psqDpTbl = &(s_aaasqDp[sqIdxNum][sqNextUnCon][sqOddness + sqUnCon * 2]); SQWORD sqMul = mulMod(sqUnCon, sqUnCon); *psqDpTbl = addMod( *psqDpTbl, mulMod(s_aaasqDp[sqIdxNum - 1][sqUnCon][sqOddness], sqMul)); } } } } SQWORD sqAns = s_aaasqDp[sqInput_n][0][sqInput_k]; printf("%lld\n", sqAns); return 0; }
replace
201
202
201
202
0
p02974
C++
Runtime Error
#include <bits/stdc++.h> #define owo(i, a, b) for (int i = (a); i < (b); ++i) #define uwu(i, a, b) for (int i = (a)-1; i >= (b); --i) #define senpai push_back #define ttgl pair<int, int> #define ayaya cout << "ayaya~" << endl using namespace std; /*#include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; gp_hash_table<int, int> mp;*/ using ll = long long; using ld = long double; const ll MOD = 1000000007; const ll root = 62; int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } ll binpow(ll a, ll b) { ll res = 1; while (b) { if (b & 1) res = (res * a) % MOD; a = (a * a) % MOD; b >>= 1; } return res; } ll modInv(ll a) { return binpow(a, MOD - 2); } const double PI = acos(-1); const double eps = -1e6; const int INF = 0x3f3f3f3f; const int NINF = 0xc0c0c0c0; const ll INFLL = 0x3f3f3f3f3f3f3f3f; const ll NINFLL = 0xc0c0c0c0c0c0c0c0; const int mxN = 51; ll dp[mxN][mxN][mxN * mxN + 101]; int n, m; int main() { // freopen("file.in", "r", stdin); // freopen("file.out", "w", stdout); mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); cin.tie(0)->sync_with_stdio(0); cin >> n >> m; dp[0][0][0] = 1; owo(i, 0, n + 1) { owo(j, 0, i + 1) { owo(k, 0, m + 1) { // pair the next ones dp[i + 1][j][k + 2 * j] = (dp[i + 1][j][k + 2 * j] + dp[i][j][k]) % MOD; // pair one of them backwards and one fowards dp[i + 1][j][k + 2 * j] = (dp[i + 1][j][k + 2 * j] + 2 * j * dp[i][j][k]) % MOD; // pair them both backwards if (j > 0) { dp[i + 1][j - 1][k + 2 * j] = (dp[i + 1][j - 1][k + 2 * j] + j * j * dp[i][j][k]) % MOD; } // pair them both fowards dp[i + 1][j + 1][k + 2 * j] = (dp[i + 1][j + 1][k + 2 * j] + dp[i][j][k]) % MOD; // cout<<i<<" "<<j<<" "<<k<<" "<<dp[i][j][k]<<"\n"; } } } cout << dp[n][0][m] << "\n"; return 0; }
#include <bits/stdc++.h> #define owo(i, a, b) for (int i = (a); i < (b); ++i) #define uwu(i, a, b) for (int i = (a)-1; i >= (b); --i) #define senpai push_back #define ttgl pair<int, int> #define ayaya cout << "ayaya~" << endl using namespace std; /*#include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; gp_hash_table<int, int> mp;*/ using ll = long long; using ld = long double; const ll MOD = 1000000007; const ll root = 62; int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } ll binpow(ll a, ll b) { ll res = 1; while (b) { if (b & 1) res = (res * a) % MOD; a = (a * a) % MOD; b >>= 1; } return res; } ll modInv(ll a) { return binpow(a, MOD - 2); } const double PI = acos(-1); const double eps = -1e6; const int INF = 0x3f3f3f3f; const int NINF = 0xc0c0c0c0; const ll INFLL = 0x3f3f3f3f3f3f3f3f; const ll NINFLL = 0xc0c0c0c0c0c0c0c0; const int mxN = 51; ll dp[mxN][mxN][mxN * mxN + 101]; int n, m; int main() { // freopen("file.in", "r", stdin); // freopen("file.out", "w", stdout); mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); cin.tie(0)->sync_with_stdio(0); cin >> n >> m; dp[0][0][0] = 1; owo(i, 0, n) { owo(j, 0, i + 1) { owo(k, 0, m + 1) { // pair the next ones dp[i + 1][j][k + 2 * j] = (dp[i + 1][j][k + 2 * j] + dp[i][j][k]) % MOD; // pair one of them backwards and one fowards dp[i + 1][j][k + 2 * j] = (dp[i + 1][j][k + 2 * j] + 2 * j * dp[i][j][k]) % MOD; // pair them both backwards if (j > 0) { dp[i + 1][j - 1][k + 2 * j] = (dp[i + 1][j - 1][k + 2 * j] + j * j * dp[i][j][k]) % MOD; } // pair them both fowards dp[i + 1][j + 1][k + 2 * j] = (dp[i + 1][j + 1][k + 2 * j] + dp[i][j][k]) % MOD; // cout<<i<<" "<<j<<" "<<k<<" "<<dp[i][j][k]<<"\n"; } } } cout << dp[n][0][m] << "\n"; return 0; }
replace
43
44
43
44
0
p02974
C++
Runtime Error
// #pragma GCC optimize("O3") // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native") // #pragma GCC optimize ("unroll-loops") #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; const int N = 51; const int mod = 1e9 + 7; ll dp[N][N][N * N]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n, k; cin >> n >> k; if (k & 1) { cout << 0; return 0; } k >>= 1; dp[0][0][0] = 1; for (int i = 1; i <= n; i++) { for (int j = 0; j <= i; j++) { for (int k = 0; k <= n * n / 2; k++) { (dp[i][j][k + j] += dp[i - 1][j][k]) %= mod; (dp[i][j + 1][k + j + 1] += dp[i - 1][j][k]) %= mod; (dp[i][j][k + j] += dp[i - 1][j][k] * 2 * j) %= mod; if (j >= 1) { (dp[i][j - 1][k + j - 1] += dp[i - 1][j][k] * j * j) %= mod; } } } } cout << dp[n][0][k]; return 0; }
// #pragma GCC optimize("O3") // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native") // #pragma GCC optimize ("unroll-loops") #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; const int N = 100; const int mod = 1e9 + 7; ll dp[N][N][N * N]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n, k; cin >> n >> k; if (k & 1) { cout << 0; return 0; } k >>= 1; dp[0][0][0] = 1; for (int i = 1; i <= n; i++) { for (int j = 0; j <= i; j++) { for (int k = 0; k <= n * n / 2; k++) { (dp[i][j][k + j] += dp[i - 1][j][k]) %= mod; (dp[i][j + 1][k + j + 1] += dp[i - 1][j][k]) %= mod; (dp[i][j][k + j] += dp[i - 1][j][k] * 2 * j) %= mod; if (j >= 1) { (dp[i][j - 1][k + j - 1] += dp[i - 1][j][k] * j * j) %= mod; } } } } cout << dp[n][0][k]; return 0; }
replace
10
11
10
11
0
p02974
C++
Runtime Error
#ifdef stderr_path #define LOCAL #endif #ifdef LOCAL #define _GLIBCXX_DEBUG #else #pragma GCC optimize("Ofast") #endif #include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <complex> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> // #define NDEBUG #define debug_stream std::cerr #define iostream_untie true #define __precision__ 10 #define all(v) std::begin(v), std::end(v) #define rall(v) std::rbegin(v), std::rend(v) #define __odd(n) ((n)&1) #define __even(n) (not __odd(n)) #define __popcount(n) __builtin_popcountll(n) #define __clz32(n) __builtin_clz(n) #define __clz64(n) __builtin_clzll(n) #define __ctz32(n) __builtin_ctz(n) #define __ctz64(n) __builtin_ctzll(n) using i64 = int_fast64_t; using pii = std::pair<int, int>; using pll = std::pair<int_fast64_t, int_fast64_t>; template <class T> using heap = std::priority_queue<T>; template <class T> using minheap = std::priority_queue<T, std::vector<T>, std::greater<T>>; template <class T> constexpr T inf = std::numeric_limits<T>::max() / T(2) - T(1123456); namespace execution { std::chrono::system_clock::time_point start_time, end_time; void print_elapsed_time() { end_time = std::chrono::system_clock::now(); std::cerr << "\n----- Exec time : "; std::cerr << std::chrono::duration_cast<std::chrono::milliseconds>(end_time - start_time) .count(); std::cerr << " ms -----\n\n"; } struct setupper { setupper() { if (iostream_untie) { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); } std::cout << std::fixed << std::setprecision(__precision__); #ifdef stderr_path if (freopen(stderr_path, "a", stderr)) { std::cerr << std::fixed << std::setprecision(__precision__); } #endif #ifdef stdout_path if (not freopen(stdout_path, "w", stdout)) { freopen("CON", "w", stdout); std::cerr << "Failed to open the stdout file\n\n"; } std::cout << ""; #endif #ifdef stdin_path if (not freopen(stdin_path, "r", stdin)) { freopen("CON", "r", stdin); std::cerr << "Failed to open the stdin file\n\n"; } #endif #ifdef LOCAL std::cerr << "----- stderr at LOCAL -----\n\n"; atexit(print_elapsed_time); start_time = std::chrono::system_clock::now(); #else fclose(stderr); #endif } } __setupper; } // namespace execution class myclock_t { std::chrono::system_clock::time_point built_pt, last_pt; int built_ln, last_ln; std::string built_func, last_func; bool is_built; public: explicit myclock_t() : is_built(false) {} void build(int crt_ln, const std::string &crt_func) { is_built = true; last_pt = built_pt = std::chrono::system_clock::now(); last_ln = built_ln = crt_ln, last_func = built_func = crt_func; } void set(int crt_ln, const std::string &crt_func) { if (is_built) { last_pt = std::chrono::system_clock::now(); last_ln = crt_ln, last_func = crt_func; } else { debug_stream << "[ " << crt_ln << " : " << crt_func << " ] " << "myclock_t::set failed (yet to be built!)\n"; } } void get(int crt_ln, const std::string &crt_func) { if (is_built) { std::chrono::system_clock::time_point crt_pt( std::chrono::system_clock::now()); int64_t diff = std::chrono::duration_cast<std::chrono::milliseconds>( crt_pt - last_pt) .count(); debug_stream << diff << " ms elapsed from" << " [ " << last_ln << " : " << last_func << " ]"; if (last_ln == built_ln) debug_stream << " (when built)"; debug_stream << " to" << " [ " << crt_ln << " : " << crt_func << " ]" << "\n"; last_pt = built_pt, last_ln = built_ln, last_func = built_func; } else { debug_stream << "[ " << crt_ln << " : " << crt_func << " ] " << "myclock_t::get failed (yet to be built!)\n"; } } }; #ifdef LOCAL myclock_t __myclock; #define build_clock() __myclock.build(__LINE__, __func__) #define set_clock() __myclock.set(__LINE__, __func__) #define get_clock() __myclock.get(__LINE__, __func__) #else #define build_clock() ((void)0) #define set_clock() ((void)0) #define get_clock() ((void)0) #endif namespace std { template <class RAitr> void rsort(RAitr __first, RAitr __last) { sort(__first, __last, greater<>()); } template <class T> size_t hash_combine(size_t seed, T const &key) { return seed ^ (hash<T>()(key) + 0x9e3779b9 + (seed << 6) + (seed >> 2)); } template <class T, class U> struct hash<pair<T, U>> { size_t operator()(pair<T, U> const &pr) const { return hash_combine(hash_combine(0, pr.first), pr.second); } }; template <class tuple_t, size_t index = tuple_size<tuple_t>::value - 1> struct tuple_hash_calc { static size_t apply(size_t seed, tuple_t const &t) { return hash_combine(tuple_hash_calc<tuple_t, index - 1>::apply(seed, t), get<index>(t)); } }; template <class tuple_t> struct tuple_hash_calc<tuple_t, 0> { static size_t apply(size_t seed, tuple_t const &t) { return hash_combine(seed, get<0>(t)); } }; template <class... T> struct hash<tuple<T...>> { size_t operator()(tuple<T...> const &t) const { return tuple_hash_calc<tuple<T...>>::apply(0, t); } }; template <class T, class U> istream &operator>>(std::istream &s, pair<T, U> &p) { return s >> p.first >> p.second; } template <class T, class U> ostream &operator<<(std::ostream &s, const pair<T, U> p) { return s << p.first << " " << p.second; } template <class T> istream &operator>>(istream &s, vector<T> &v) { for (T &e : v) { s >> e; } return s; } template <class T> ostream &operator<<(ostream &s, const vector<T> &v) { bool is_front = true; for (const T &e : v) { if (not is_front) { s << ' '; } else { is_front = false; } s << e; } return s; } template <class tuple_t, size_t index> struct tupleos { static ostream &apply(ostream &s, const tuple_t &t) { tupleos<tuple_t, index - 1>::apply(s, t); return s << " " << get<index>(t); } }; template <class tuple_t> struct tupleos<tuple_t, 0> { static ostream &apply(ostream &s, const tuple_t &t) { return s << get<0>(t); } }; template <class... T> ostream &operator<<(ostream &s, const tuple<T...> &t) { return tupleos<tuple<T...>, tuple_size<tuple<T...>>::value - 1>::apply(s, t); } template <> ostream &operator<<(ostream &s, const tuple<> &t) { return s; } string revstr(string str) { reverse(str.begin(), str.end()); return str; } } // namespace std #ifdef LOCAL #define dump(...) \ debug_stream << "[ " << __LINE__ << " : " << __FUNCTION__ << " ]\n", \ dump_func(#__VA_ARGS__, __VA_ARGS__) template <class T> void dump_func(const char *ptr, const T &x) { debug_stream << '\t'; for (char c = *ptr; c != '\0'; c = *++ptr) { if (c != ' ') debug_stream << c; } debug_stream << " : " << x << '\n'; } template <class T, class... rest_t> void dump_func(const char *ptr, const T &x, rest_t... rest) { debug_stream << '\t'; for (char c = *ptr; c != ','; c = *++ptr) { if (c != ' ') debug_stream << c; } debug_stream << " : " << x << ",\n"; dump_func(++ptr, rest...); } #else #define dump(...) ((void)0) #endif template <class P> void read_range(P __first, P __second) { for (P i = __first; i != __second; ++i) std::cin >> *i; } template <class P> void write_range(P __first, P __second) { for (P i = __first; i != __second; std::cout << (++i == __second ? '\n' : ' ')) { std::cout << *i; } } // substitute y for x. template <class T> void subst(T &x, const T &y) { x = y; } // substitue y for x iff x > y. template <class T> bool chmin(T &x, const T &y) { return x > y ? x = y, true : false; } // substitue y for x iff x < y. template <class T> bool chmax(T &x, const T &y) { return x < y ? x = y, true : false; } template <class T> constexpr T minf(const T &x, const T &y) { return std::min(x, y); } template <class T> constexpr T maxf(const T &x, const T &y) { return std::max(x, y); } // binary search. template <class int_t, class F> int_t bin(int_t ok, int_t ng, const F &f) { while (std::abs(ok - ng) > 1) { int_t mid = (ok + ng) / 2; (f(mid) ? ok : ng) = mid; } return ok; } // be careful that val is type-sensitive. template <class T, class A, size_t N> void init(A (&array)[N], const T &val) { std::fill((T *)array, (T *)(array + N), val); } void reset() {} template <class A, class... rest_t> void reset(A &array, rest_t... rest) { memset(array, 0, sizeof(array)); reset(rest...); } // a integer uniformly and randomly chosen from the interval [l, r). template <typename int_t> int_t rand_int(int_t l, int_t r) { static std::random_device seed_gen; static std::mt19937 engine(seed_gen()); std::uniform_int_distribution<int_t> unid(l, r - 1); return unid(engine); } // a real number uniformly and randomly chosen from the interval [l, r). template <typename real_t> real_t rand_real(real_t l, real_t r) { static std::random_device seed_gen; static std::mt19937 engine(seed_gen()); std::uniform_real_distribution<real_t> unid(l, r); return unid(engine); } /* The main code follows. */ namespace math { template <int mod> struct modint { int rep; constexpr modint() : rep(0) {} constexpr modint(int_fast64_t y) : rep(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {} constexpr modint &operator+=(const modint &p) { return (rep += p.rep) < mod ? 0 : rep -= mod, *this; } constexpr modint &operator++() { return ++rep, *this; } constexpr modint operator++(int) { modint t = *this; return ++rep, t; } constexpr modint &operator-=(const modint &p) { return (rep += mod - p.rep) < mod ? 0 : rep -= mod, *this; } constexpr modint &operator--() { return --rep, *this; } constexpr modint operator--(int) { modint t = *this; return --rep, t; } constexpr modint &operator*=(const modint &p) { return rep = (int_fast64_t)rep * p.rep % mod, *this; } constexpr modint &operator/=(const modint &p) { return *this *= inverse(p); } // constexpr modint &operator%=(int m) { return rep %= m, *this; } constexpr modint operator-() const { return modint(-rep); } constexpr modint operator+(const modint &p) const { return modint(*this) += p; } constexpr modint operator-(const modint &p) const { return modint(*this) -= p; } constexpr modint operator*(const modint &p) const { return modint(*this) *= p; } constexpr modint operator/(const modint &p) const { return modint(*this) /= p; } // constexpr modint operator%(int m) const { return modint(*this) %= m; // } constexpr bool operator==(const modint &p) const { return rep == p.rep; } constexpr bool operator!=(const modint &p) const { return rep != p.rep; } constexpr bool operator!() const { return !rep; } // constexpr bool operator>(const modint &p) const { return rep > p.rep; } // constexpr bool operator<(const modint &p) const { return rep < p.rep; } // constexpr bool operator>=(const modint &p) const { return rep >= p.rep; } // constexpr bool operator<=(const modint &p) const { return rep <= p.rep; } constexpr friend modint<mod> inverse(const modint<mod> &p) { int a = p.rep, b = mod, u = 1, v = 0; while (b > 0) { int t = a / b; a -= t * b; a ^= b ^= a ^= b; u -= t * v; u ^= v ^= u ^= v; } return modint(u); } constexpr friend modint pow(modint p, int_fast64_t e) { if (e < 0) e = (e % (mod - 1) + mod - 1) % (mod - 1); modint ret = 1; while (e) { if (e & 1) ret *= p; p *= p; e >>= 1; } return ret; } friend std::ostream &operator<<(std::ostream &s, const modint &p) { return s << p.rep; } friend std::istream &operator>>(std::istream &s, modint &p) { int_fast64_t rep; p = modint((s >> rep, rep)); return s; } }; } // namespace math using namespace std; using namespace math; signed main() { void __solve(); void __precalc(); unsigned int t = 1; // cin >> t; __precalc(); #ifdef LOCAL t = 1; #endif while (t--) { __solve(); } } using mint = modint<1000000007>; void __precalc() {} void __solve() { int n, k; cin >> n >> k; mint dp[2][2507][51]; reset(dp); auto &crt = dp[0]; auto &nxt = dp[1]; dp[0][0][0] = 1; for (int i = 0; i < n; ++i) { reset(nxt); for (int s = 0; s <= n * n; ++s) { for (int j = 0; j < n; ++j) { if (not crt[s][j]) continue; nxt[s + j * 2][j] += crt[s][j] * (j * 2 + 1); nxt[s + (j + 1) * 2][j + 1] += crt[s][j]; if (j) { nxt[s + (j - 1) * 2][j - 1] += crt[s][j] * j * j; } } } swap(crt, nxt); } std::cout << crt[k][0] << "\n"; }
#ifdef stderr_path #define LOCAL #endif #ifdef LOCAL #define _GLIBCXX_DEBUG #else #pragma GCC optimize("Ofast") #endif #include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <complex> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> // #define NDEBUG #define debug_stream std::cerr #define iostream_untie true #define __precision__ 10 #define all(v) std::begin(v), std::end(v) #define rall(v) std::rbegin(v), std::rend(v) #define __odd(n) ((n)&1) #define __even(n) (not __odd(n)) #define __popcount(n) __builtin_popcountll(n) #define __clz32(n) __builtin_clz(n) #define __clz64(n) __builtin_clzll(n) #define __ctz32(n) __builtin_ctz(n) #define __ctz64(n) __builtin_ctzll(n) using i64 = int_fast64_t; using pii = std::pair<int, int>; using pll = std::pair<int_fast64_t, int_fast64_t>; template <class T> using heap = std::priority_queue<T>; template <class T> using minheap = std::priority_queue<T, std::vector<T>, std::greater<T>>; template <class T> constexpr T inf = std::numeric_limits<T>::max() / T(2) - T(1123456); namespace execution { std::chrono::system_clock::time_point start_time, end_time; void print_elapsed_time() { end_time = std::chrono::system_clock::now(); std::cerr << "\n----- Exec time : "; std::cerr << std::chrono::duration_cast<std::chrono::milliseconds>(end_time - start_time) .count(); std::cerr << " ms -----\n\n"; } struct setupper { setupper() { if (iostream_untie) { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); } std::cout << std::fixed << std::setprecision(__precision__); #ifdef stderr_path if (freopen(stderr_path, "a", stderr)) { std::cerr << std::fixed << std::setprecision(__precision__); } #endif #ifdef stdout_path if (not freopen(stdout_path, "w", stdout)) { freopen("CON", "w", stdout); std::cerr << "Failed to open the stdout file\n\n"; } std::cout << ""; #endif #ifdef stdin_path if (not freopen(stdin_path, "r", stdin)) { freopen("CON", "r", stdin); std::cerr << "Failed to open the stdin file\n\n"; } #endif #ifdef LOCAL std::cerr << "----- stderr at LOCAL -----\n\n"; atexit(print_elapsed_time); start_time = std::chrono::system_clock::now(); #else fclose(stderr); #endif } } __setupper; } // namespace execution class myclock_t { std::chrono::system_clock::time_point built_pt, last_pt; int built_ln, last_ln; std::string built_func, last_func; bool is_built; public: explicit myclock_t() : is_built(false) {} void build(int crt_ln, const std::string &crt_func) { is_built = true; last_pt = built_pt = std::chrono::system_clock::now(); last_ln = built_ln = crt_ln, last_func = built_func = crt_func; } void set(int crt_ln, const std::string &crt_func) { if (is_built) { last_pt = std::chrono::system_clock::now(); last_ln = crt_ln, last_func = crt_func; } else { debug_stream << "[ " << crt_ln << " : " << crt_func << " ] " << "myclock_t::set failed (yet to be built!)\n"; } } void get(int crt_ln, const std::string &crt_func) { if (is_built) { std::chrono::system_clock::time_point crt_pt( std::chrono::system_clock::now()); int64_t diff = std::chrono::duration_cast<std::chrono::milliseconds>( crt_pt - last_pt) .count(); debug_stream << diff << " ms elapsed from" << " [ " << last_ln << " : " << last_func << " ]"; if (last_ln == built_ln) debug_stream << " (when built)"; debug_stream << " to" << " [ " << crt_ln << " : " << crt_func << " ]" << "\n"; last_pt = built_pt, last_ln = built_ln, last_func = built_func; } else { debug_stream << "[ " << crt_ln << " : " << crt_func << " ] " << "myclock_t::get failed (yet to be built!)\n"; } } }; #ifdef LOCAL myclock_t __myclock; #define build_clock() __myclock.build(__LINE__, __func__) #define set_clock() __myclock.set(__LINE__, __func__) #define get_clock() __myclock.get(__LINE__, __func__) #else #define build_clock() ((void)0) #define set_clock() ((void)0) #define get_clock() ((void)0) #endif namespace std { template <class RAitr> void rsort(RAitr __first, RAitr __last) { sort(__first, __last, greater<>()); } template <class T> size_t hash_combine(size_t seed, T const &key) { return seed ^ (hash<T>()(key) + 0x9e3779b9 + (seed << 6) + (seed >> 2)); } template <class T, class U> struct hash<pair<T, U>> { size_t operator()(pair<T, U> const &pr) const { return hash_combine(hash_combine(0, pr.first), pr.second); } }; template <class tuple_t, size_t index = tuple_size<tuple_t>::value - 1> struct tuple_hash_calc { static size_t apply(size_t seed, tuple_t const &t) { return hash_combine(tuple_hash_calc<tuple_t, index - 1>::apply(seed, t), get<index>(t)); } }; template <class tuple_t> struct tuple_hash_calc<tuple_t, 0> { static size_t apply(size_t seed, tuple_t const &t) { return hash_combine(seed, get<0>(t)); } }; template <class... T> struct hash<tuple<T...>> { size_t operator()(tuple<T...> const &t) const { return tuple_hash_calc<tuple<T...>>::apply(0, t); } }; template <class T, class U> istream &operator>>(std::istream &s, pair<T, U> &p) { return s >> p.first >> p.second; } template <class T, class U> ostream &operator<<(std::ostream &s, const pair<T, U> p) { return s << p.first << " " << p.second; } template <class T> istream &operator>>(istream &s, vector<T> &v) { for (T &e : v) { s >> e; } return s; } template <class T> ostream &operator<<(ostream &s, const vector<T> &v) { bool is_front = true; for (const T &e : v) { if (not is_front) { s << ' '; } else { is_front = false; } s << e; } return s; } template <class tuple_t, size_t index> struct tupleos { static ostream &apply(ostream &s, const tuple_t &t) { tupleos<tuple_t, index - 1>::apply(s, t); return s << " " << get<index>(t); } }; template <class tuple_t> struct tupleos<tuple_t, 0> { static ostream &apply(ostream &s, const tuple_t &t) { return s << get<0>(t); } }; template <class... T> ostream &operator<<(ostream &s, const tuple<T...> &t) { return tupleos<tuple<T...>, tuple_size<tuple<T...>>::value - 1>::apply(s, t); } template <> ostream &operator<<(ostream &s, const tuple<> &t) { return s; } string revstr(string str) { reverse(str.begin(), str.end()); return str; } } // namespace std #ifdef LOCAL #define dump(...) \ debug_stream << "[ " << __LINE__ << " : " << __FUNCTION__ << " ]\n", \ dump_func(#__VA_ARGS__, __VA_ARGS__) template <class T> void dump_func(const char *ptr, const T &x) { debug_stream << '\t'; for (char c = *ptr; c != '\0'; c = *++ptr) { if (c != ' ') debug_stream << c; } debug_stream << " : " << x << '\n'; } template <class T, class... rest_t> void dump_func(const char *ptr, const T &x, rest_t... rest) { debug_stream << '\t'; for (char c = *ptr; c != ','; c = *++ptr) { if (c != ' ') debug_stream << c; } debug_stream << " : " << x << ",\n"; dump_func(++ptr, rest...); } #else #define dump(...) ((void)0) #endif template <class P> void read_range(P __first, P __second) { for (P i = __first; i != __second; ++i) std::cin >> *i; } template <class P> void write_range(P __first, P __second) { for (P i = __first; i != __second; std::cout << (++i == __second ? '\n' : ' ')) { std::cout << *i; } } // substitute y for x. template <class T> void subst(T &x, const T &y) { x = y; } // substitue y for x iff x > y. template <class T> bool chmin(T &x, const T &y) { return x > y ? x = y, true : false; } // substitue y for x iff x < y. template <class T> bool chmax(T &x, const T &y) { return x < y ? x = y, true : false; } template <class T> constexpr T minf(const T &x, const T &y) { return std::min(x, y); } template <class T> constexpr T maxf(const T &x, const T &y) { return std::max(x, y); } // binary search. template <class int_t, class F> int_t bin(int_t ok, int_t ng, const F &f) { while (std::abs(ok - ng) > 1) { int_t mid = (ok + ng) / 2; (f(mid) ? ok : ng) = mid; } return ok; } // be careful that val is type-sensitive. template <class T, class A, size_t N> void init(A (&array)[N], const T &val) { std::fill((T *)array, (T *)(array + N), val); } void reset() {} template <class A, class... rest_t> void reset(A &array, rest_t... rest) { memset(array, 0, sizeof(array)); reset(rest...); } // a integer uniformly and randomly chosen from the interval [l, r). template <typename int_t> int_t rand_int(int_t l, int_t r) { static std::random_device seed_gen; static std::mt19937 engine(seed_gen()); std::uniform_int_distribution<int_t> unid(l, r - 1); return unid(engine); } // a real number uniformly and randomly chosen from the interval [l, r). template <typename real_t> real_t rand_real(real_t l, real_t r) { static std::random_device seed_gen; static std::mt19937 engine(seed_gen()); std::uniform_real_distribution<real_t> unid(l, r); return unid(engine); } /* The main code follows. */ namespace math { template <int mod> struct modint { int rep; constexpr modint() : rep(0) {} constexpr modint(int_fast64_t y) : rep(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {} constexpr modint &operator+=(const modint &p) { return (rep += p.rep) < mod ? 0 : rep -= mod, *this; } constexpr modint &operator++() { return ++rep, *this; } constexpr modint operator++(int) { modint t = *this; return ++rep, t; } constexpr modint &operator-=(const modint &p) { return (rep += mod - p.rep) < mod ? 0 : rep -= mod, *this; } constexpr modint &operator--() { return --rep, *this; } constexpr modint operator--(int) { modint t = *this; return --rep, t; } constexpr modint &operator*=(const modint &p) { return rep = (int_fast64_t)rep * p.rep % mod, *this; } constexpr modint &operator/=(const modint &p) { return *this *= inverse(p); } // constexpr modint &operator%=(int m) { return rep %= m, *this; } constexpr modint operator-() const { return modint(-rep); } constexpr modint operator+(const modint &p) const { return modint(*this) += p; } constexpr modint operator-(const modint &p) const { return modint(*this) -= p; } constexpr modint operator*(const modint &p) const { return modint(*this) *= p; } constexpr modint operator/(const modint &p) const { return modint(*this) /= p; } // constexpr modint operator%(int m) const { return modint(*this) %= m; // } constexpr bool operator==(const modint &p) const { return rep == p.rep; } constexpr bool operator!=(const modint &p) const { return rep != p.rep; } constexpr bool operator!() const { return !rep; } // constexpr bool operator>(const modint &p) const { return rep > p.rep; } // constexpr bool operator<(const modint &p) const { return rep < p.rep; } // constexpr bool operator>=(const modint &p) const { return rep >= p.rep; } // constexpr bool operator<=(const modint &p) const { return rep <= p.rep; } constexpr friend modint<mod> inverse(const modint<mod> &p) { int a = p.rep, b = mod, u = 1, v = 0; while (b > 0) { int t = a / b; a -= t * b; a ^= b ^= a ^= b; u -= t * v; u ^= v ^= u ^= v; } return modint(u); } constexpr friend modint pow(modint p, int_fast64_t e) { if (e < 0) e = (e % (mod - 1) + mod - 1) % (mod - 1); modint ret = 1; while (e) { if (e & 1) ret *= p; p *= p; e >>= 1; } return ret; } friend std::ostream &operator<<(std::ostream &s, const modint &p) { return s << p.rep; } friend std::istream &operator>>(std::istream &s, modint &p) { int_fast64_t rep; p = modint((s >> rep, rep)); return s; } }; } // namespace math using namespace std; using namespace math; signed main() { void __solve(); void __precalc(); unsigned int t = 1; // cin >> t; __precalc(); #ifdef LOCAL t = 1; #endif while (t--) { __solve(); } } using mint = modint<1000000007>; void __precalc() {} void __solve() { int n, k; cin >> n >> k; mint dp[2][3125][55]; reset(dp); auto &crt = dp[0]; auto &nxt = dp[1]; dp[0][0][0] = 1; for (int i = 0; i < n; ++i) { reset(nxt); for (int s = 0; s <= n * n; ++s) { for (int j = 0; j < n; ++j) { if (not crt[s][j]) continue; nxt[s + j * 2][j] += crt[s][j] * (j * 2 + 1); nxt[s + (j + 1) * 2][j + 1] += crt[s][j]; if (j) { nxt[s + (j - 1) * 2][j - 1] += crt[s][j] * j * j; } } } swap(crt, nxt); } std::cout << crt[k][0] << "\n"; }
replace
447
448
447
448
0
p02974
C++
Runtime Error
#include <bits/stdc++.h> #define debug(x) cerr << #x << ": " << x << '\n'; using namespace std; using ll = long long; using P = pair<int, int>; const int INF = (int)1e9; const int MOD = (int)1e9 + 7; template <int mod> struct ModInt { int x; ModInt() : x(0) {} ModInt(int64_t y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {} ModInt &operator+=(const ModInt &p) { if ((x += p.x) >= mod) x -= mod; return *this; } ModInt &operator-=(const ModInt &p) { if ((x += mod - p.x) >= mod) x -= mod; return *this; } ModInt &operator*=(const ModInt &p) { x = (int)(1LL * x * p.x % mod); return *this; } ModInt &operator/=(const ModInt &p) { *this *= p.inverse(); return *this; } ModInt operator-() const { return ModInt(-x); } ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; } ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; } ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; } ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; } bool operator==(const ModInt &p) const { return x == p.x; } bool operator!=(const ModInt &p) const { return x != p.x; } ModInt inverse() const { int a = x, b = mod, u = 1, v = 0, t; while (b > 0) { t = a / b; swap(a -= t * b, b); swap(u -= t * v, v); } return ModInt(u); } ModInt pow(int64_t n) const { ModInt ret(1), mul(x); while (n > 0) { if (n & 1) ret *= mul; mul *= mul; n >>= 1; } return ret; } friend ostream &operator<<(ostream &os, const ModInt &p) { return os << p.x; } friend istream &operator>>(istream &is, ModInt &a) { int64_t t; is >> t; a = ModInt<mod>(t); return (is); } static int get_mod() { return mod; } }; using mint = ModInt<MOD>; // dp[i][j][k]: i段目まで、保留j、奇妙さk mint dp[51][51][2600]; int main(void) { int N, K; cin >> N >> K; dp[0][0][0] = 1; for (int i = 0; i < N; i++) { for (int j = 0; j <= i + 1; j++) { for (int k = 0; k <= K; k++) { { int nj = j; dp[i + 1][nj][k + nj * 2] += dp[i][j][k]; } { int nj = j + 1; dp[i + 1][nj][k + nj * 2] += dp[i][j][k]; } { int nj = j; mint x = j * 2; dp[i + 1][nj][k + nj * 2] += dp[i][j][k] * x; } if (j >= 1) { int nj = j - 1; mint x = j * j; dp[i + 1][nj][k + nj * 2] += dp[i][j][k] * x; } } } } cout << dp[N][0][K] << '\n'; return 0; }
#include <bits/stdc++.h> #define debug(x) cerr << #x << ": " << x << '\n'; using namespace std; using ll = long long; using P = pair<int, int>; const int INF = (int)1e9; const int MOD = (int)1e9 + 7; template <int mod> struct ModInt { int x; ModInt() : x(0) {} ModInt(int64_t y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {} ModInt &operator+=(const ModInt &p) { if ((x += p.x) >= mod) x -= mod; return *this; } ModInt &operator-=(const ModInt &p) { if ((x += mod - p.x) >= mod) x -= mod; return *this; } ModInt &operator*=(const ModInt &p) { x = (int)(1LL * x * p.x % mod); return *this; } ModInt &operator/=(const ModInt &p) { *this *= p.inverse(); return *this; } ModInt operator-() const { return ModInt(-x); } ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; } ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; } ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; } ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; } bool operator==(const ModInt &p) const { return x == p.x; } bool operator!=(const ModInt &p) const { return x != p.x; } ModInt inverse() const { int a = x, b = mod, u = 1, v = 0, t; while (b > 0) { t = a / b; swap(a -= t * b, b); swap(u -= t * v, v); } return ModInt(u); } ModInt pow(int64_t n) const { ModInt ret(1), mul(x); while (n > 0) { if (n & 1) ret *= mul; mul *= mul; n >>= 1; } return ret; } friend ostream &operator<<(ostream &os, const ModInt &p) { return os << p.x; } friend istream &operator>>(istream &is, ModInt &a) { int64_t t; is >> t; a = ModInt<mod>(t); return (is); } static int get_mod() { return mod; } }; using mint = ModInt<MOD>; // dp[i][j][k]: i段目まで、保留j、奇妙さk mint dp[51][51][2600]; int main(void) { int N, K; cin >> N >> K; dp[0][0][0] = 1; for (int i = 0; i < N; i++) { for (int j = 0; j <= i; j++) { for (int k = 0; k <= K; k++) { { int nj = j; dp[i + 1][nj][k + nj * 2] += dp[i][j][k]; } { int nj = j + 1; dp[i + 1][nj][k + nj * 2] += dp[i][j][k]; } { int nj = j; mint x = j * 2; dp[i + 1][nj][k + nj * 2] += dp[i][j][k] * x; } if (j >= 1) { int nj = j - 1; mint x = j * j; dp[i + 1][nj][k + nj * 2] += dp[i][j][k] * x; } } } } cout << dp[N][0][K] << '\n'; return 0; }
replace
85
86
85
86
0
p02974
C++
Memory Limit Exceeded
#include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <string> #include <typeinfo> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; using ll = long long; using ull = unsigned long long; const ll INF = 1e18; const ll MOD = 1e9 + 7; #define REP(i, n) for (ll i = 0; i < n; i++) int main() { ll n, K; cin >> n >> K; vector<vector<vector<ll>>> dp( n * 3, vector<vector<ll>>(n * 3, vector<ll>(n * n * 3))); dp[0][0][0] = 1; REP(i, n) { REP(j, n) { REP(k, n * n + 1) { dp[i + 1][j][k + j * 2] += dp[i][j][k]; dp[i + 1][j][k + j * 2] %= MOD; dp[i + 1][j + 1][k + (j + 1) * 2] += dp[i][j][k]; dp[i + 1][j + 1][k + (j + 1) * 2] %= MOD; dp[i + 1][j][k + j * 2] += dp[i][j][k] * 2 * j; dp[i + 1][j][k + j * 2] %= MOD; if (j - 1 >= 0) { dp[i + 1][j - 1][k + (j - 1) * 2] += dp[i][j][k] * j * j; dp[i + 1][j - 1][k + (j - 1) * 2] %= MOD; } } } } cout << dp[n][0][K] << endl; }
#include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <string> #include <typeinfo> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; using ll = long long; using ull = unsigned long long; const ll INF = 1e18; const ll MOD = 1e9 + 7; #define REP(i, n) for (ll i = 0; i < n; i++) int main() { ll n, K; cin >> n >> K; vector<vector<vector<ll>>> dp(55, vector<vector<ll>>(55, vector<ll>(3000))); dp[0][0][0] = 1; REP(i, n) { REP(j, n) { REP(k, n * n + 1) { dp[i + 1][j][k + j * 2] += dp[i][j][k]; dp[i + 1][j][k + j * 2] %= MOD; dp[i + 1][j + 1][k + (j + 1) * 2] += dp[i][j][k]; dp[i + 1][j + 1][k + (j + 1) * 2] %= MOD; dp[i + 1][j][k + j * 2] += dp[i][j][k] * 2 * j; dp[i + 1][j][k + j * 2] %= MOD; if (j - 1 >= 0) { dp[i + 1][j - 1][k + (j - 1) * 2] += dp[i][j][k] * j * j; dp[i + 1][j - 1][k + (j - 1) * 2] %= MOD; } } } } cout << dp[n][0][K] << endl; }
replace
33
35
33
34
MLE
p02974
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; // #include <boost/multiprecision/cpp_int.hpp> // typedef boost::multiprecision::cpp_int ll; typedef long double dd; #define i_7 (ll)(1E9 + 7) // #define i_7 998244353 #define i_5 i_7 - 2 ll mod(ll a) { ll c = a % i_7; if (c >= 0) return c; return c + i_7; } typedef pair<ll, ll> l_l; ll inf = (ll)1E17; #define rep(i, l, r) for (ll i = l; i <= r; i++) #define pb push_back ll max(ll a, ll b) { if (a < b) return b; else return a; } ll min(ll a, ll b) { if (a > b) return b; else return a; } void Max(ll &pos, ll val) { pos = max(pos, val); } // Max(dp[n],dp[n-1]); void Min(ll &pos, ll val) { pos = min(pos, val); } void Add(ll &pos, ll val) { pos = mod(pos + val); } dd EPS = 1E-9; #define fastio \ ios::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); /////////////////////////////////////// int main() { ll m, k; cin >> m >> k; if (k % 2 == 1) { cout << 0 << endl; return 0; } ll N = 2 * m; ll dp[m + 1][N + 1][m + 1]; memset(dp, 0, sizeof(dp)); dp[0][0][0] = 1; rep(n, 0, m) { rep(d, 0, N) { rep(l, 0, m) { ll ad1 = 0; rep(li, l, n / 2) { if (n - 1 >= 0 && d - l >= 0) Add(ad1, (dp[n - 1][d - l][li])); } Add(dp[n][d][l], mod(ad1 * (2 * l + 1))); ll ad2 = 0; rep(li, l - 1, n / 2) { if (n - 2 >= 0 && (d - (2 * l - 1)) >= 0 && li >= 0) Add(ad2, dp[n - 2][d - (2 * l - 1)][li]); } Add(dp[n][d][l], mod(l * l * ad2)); } } } /*rep(i,0,N){ rep(j,0,m){ cout<<dp[m][i][j]<<" "; }cout<<endl; }*/ ll ans = 0; rep(i, 0, m) { Add(ans, dp[m][k / 2][i]); } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; // #include <boost/multiprecision/cpp_int.hpp> // typedef boost::multiprecision::cpp_int ll; typedef long double dd; #define i_7 (ll)(1E9 + 7) // #define i_7 998244353 #define i_5 i_7 - 2 ll mod(ll a) { ll c = a % i_7; if (c >= 0) return c; return c + i_7; } typedef pair<ll, ll> l_l; ll inf = (ll)1E17; #define rep(i, l, r) for (ll i = l; i <= r; i++) #define pb push_back ll max(ll a, ll b) { if (a < b) return b; else return a; } ll min(ll a, ll b) { if (a > b) return b; else return a; } void Max(ll &pos, ll val) { pos = max(pos, val); } // Max(dp[n],dp[n-1]); void Min(ll &pos, ll val) { pos = min(pos, val); } void Add(ll &pos, ll val) { pos = mod(pos + val); } dd EPS = 1E-9; #define fastio \ ios::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); /////////////////////////////////////// int main() { ll m, k; cin >> m >> k; if (k % 2 == 1) { cout << 0 << endl; return 0; } ll N = k / 2; ll dp[m + 1][N + 1][m + 1]; memset(dp, 0, sizeof(dp)); dp[0][0][0] = 1; rep(n, 0, m) { rep(d, 0, N) { rep(l, 0, m) { ll ad1 = 0; rep(li, l, n / 2) { if (n - 1 >= 0 && d - l >= 0) Add(ad1, (dp[n - 1][d - l][li])); } Add(dp[n][d][l], mod(ad1 * (2 * l + 1))); ll ad2 = 0; rep(li, l - 1, n / 2) { if (n - 2 >= 0 && (d - (2 * l - 1)) >= 0 && li >= 0) Add(ad2, dp[n - 2][d - (2 * l - 1)][li]); } Add(dp[n][d][l], mod(l * l * ad2)); } } } /*rep(i,0,N){ rep(j,0,m){ cout<<dp[m][i][j]<<" "; }cout<<endl; }*/ ll ans = 0; rep(i, 0, m) { Add(ans, dp[m][k / 2][i]); } cout << ans << endl; return 0; }
replace
49
50
49
50
0
p02974
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using int64 = long long; constexpr int64 P = 1000000007; // Verified: ABC133E, ABC132D, ABC130E struct FiniteField { private: int64 x; public: FiniteField(int64 input_x) : x(input_x) {} FiniteField() : x(0) {} int64 Value() { return x; } inline FiniteField operator+(FiniteField o) { FiniteField r(*this); r += o; return r; } inline FiniteField operator-(FiniteField o) { FiniteField r(*this); r -= o; return r; } inline FiniteField operator*(FiniteField o) { FiniteField r(*this); r *= o; return r; } inline FiniteField operator/(FiniteField o) { FiniteField r(*this); r /= o; return r; } inline void operator+=(FiniteField o) { x = (x + o.x) % P; } inline void operator-=(FiniteField o) { x = (x + P - o.x) % P; } inline void operator*=(FiniteField o) { x = (x * o.x) % P; } void operator/=(FiniteField o) { int64 p = P - 2; while (p) { if (p % 2) { *this *= o; } o *= o; p /= 2; } } }; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; vector<vector<vector<FiniteField>>> dp( n + 1, vector<vector<FiniteField>>(n + 1, vector<FiniteField>(m + 1))); dp[0][0][0] = 1; for (int i = 0; i < n; i++) { for (int j = 0; j <= n; j++) { for (int k = 0; k <= m; k++) { if (k + 2 * j <= m) { dp[i + 1][j][k + 2 * j] += dp[i][j][k]; } if (k + 2 * (j + 1) <= m) { dp[i + 1][j + 1][k + 2 * (j + 1)] += dp[i][j][k]; } if (j >= 1 && k + 2 * (j - 1) <= m) { dp[i + 1][j - 1][k + 2 * (j - 1)] += dp[i][j][k] * j * j; } if (j >= 1 && k + 2 * j <= m) { dp[i + 1][j][k + 2 * j] += dp[i][j][k] * 2 * j; } } } } cout << dp[n][0][m].Value() << endl; }
#include <bits/stdc++.h> using namespace std; using int64 = long long; constexpr int64 P = 1000000007; // Verified: ABC133E, ABC132D, ABC130E struct FiniteField { private: int64 x; public: FiniteField(int64 input_x) : x(input_x) {} FiniteField() : x(0) {} int64 Value() { return x; } inline FiniteField operator+(FiniteField o) { FiniteField r(*this); r += o; return r; } inline FiniteField operator-(FiniteField o) { FiniteField r(*this); r -= o; return r; } inline FiniteField operator*(FiniteField o) { FiniteField r(*this); r *= o; return r; } inline FiniteField operator/(FiniteField o) { FiniteField r(*this); r /= o; return r; } inline void operator+=(FiniteField o) { x = (x + o.x) % P; } inline void operator-=(FiniteField o) { x = (x + P - o.x) % P; } inline void operator*=(FiniteField o) { x = (x * o.x) % P; } void operator/=(FiniteField o) { int64 p = P - 2; while (p) { if (p % 2) { *this *= o; } o *= o; p /= 2; } } }; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; vector<vector<vector<FiniteField>>> dp( n + 1, vector<vector<FiniteField>>(n + 1, vector<FiniteField>(m + 1))); dp[0][0][0] = 1; for (int i = 0; i < n; i++) { for (int j = 0; j <= n; j++) { for (int k = 0; k <= m; k++) { if (dp[i][j][k].Value() == 0) continue; if (k + 2 * j <= m) { dp[i + 1][j][k + 2 * j] += dp[i][j][k]; } if (k + 2 * (j + 1) <= m) { dp[i + 1][j + 1][k + 2 * (j + 1)] += dp[i][j][k]; } if (j >= 1 && k + 2 * (j - 1) <= m) { dp[i + 1][j - 1][k + 2 * (j - 1)] += dp[i][j][k] * j * j; } if (j >= 1 && k + 2 * j <= m) { dp[i + 1][j][k + 2 * j] += dp[i][j][k] * 2 * j; } } } } cout << dp[n][0][m].Value() << endl; }
insert
64
64
64
66
0
p02974
C++
Runtime Error
#include <bits/stdc++.h> // #include <boost/multiprecision/cpp_int.hpp> #define int long long #define inf 1000000007 #define pa pair<int, int> #define ll long long #define pal pair<double, double> #define ppap pair<pa, int> #define PI 3.14159265358979323846 #define paa pair<int, char> #define mp make_pair #define pb push_back #define EPS (1e-10) int dx[8] = {0, 1, 0, -1, 1, 1, -1, -1}; int dy[8] = {1, 0, -1, 0, -1, 1, 1, -1}; using namespace std; class pa3 { public: int x; int y, z; pa3(int x = 0, int y = 0, int z = 0) : x(x), y(y), z(z) {} bool operator<(const pa3 &p) const { if (x != p.x) return x < p.x; if (y != p.y) return y < p.y; return z < p.z; // return x != p.x ? x<p.x: y<p.y; } bool operator>(const pa3 &p) const { if (x != p.x) return x > p.x; if (y != p.y) return y > p.y; return z > p.z; // return x != p.x ? x<p.x: y<p.y; } bool operator==(const pa3 &p) const { return x == p.x && y == p.y && z == p.z; } bool operator!=(const pa3 &p) const { return !(x == p.x && y == p.y && z == p.z); } }; class pa4 { public: int x; int y, z, w; pa4(int x = 0, int y = 0, int z = 0, int w = 0) : x(x), y(y), z(z), w(w) {} bool operator<(const pa4 &p) const { if (x != p.x) return x < p.x; if (y != p.y) return y < p.y; if (z != p.z) return z < p.z; return w < p.w; // return x != p.x ? x<p.x: y<p.y; } bool operator>(const pa4 &p) const { if (x != p.x) return x > p.x; if (y != p.y) return y > p.y; if (z != p.z) return z > p.z; return w > p.w; // return x != p.x ? x<p.x: y<p.y; } bool operator==(const pa4 &p) const { return x == p.x && y == p.y && z == p.z && w == p.w; } }; class pa2 { public: int x, y; pa2(int x = 0, int y = 0) : x(x), y(y) {} pa2 operator+(pa2 p) { return pa2(x + p.x, y + p.y); } pa2 operator-(pa2 p) { return pa2(x - p.x, y - p.y); } bool operator<(const pa2 &p) const { return y != p.y ? y < p.y : x < p.x; } bool operator>(const pa2 &p) const { return x != p.x ? x < p.x : y < p.y; } bool operator==(const pa2 &p) const { return abs(x - p.x) == 0 && abs(y - p.y) == 0; } bool operator!=(const pa2 &p) const { return !(abs(x - p.x) == 0 && abs(y - p.y) == 0); } }; string itos(int i) { ostringstream s; s << i; return s.str(); } int gcd(int v, int b) { if (v > b) return gcd(b, v); if (v == b) return b; if (b % v == 0) return v; return gcd(v, b % v); } int mod; int extgcd(int a, int b, int &x, int &y) { if (b == 0) { x = 1; y = 0; return a; } int d = extgcd(b, a % b, y, x); y -= a / b * x; return d; } pa operator+(const pa &l, const pa &r) { return {l.first + r.first, l.second + r.second}; } pa operator-(const pa &l, const pa &r) { return {l.first - r.first, l.second - r.second}; } int pr[200010]; int inv[200010]; int beki(int wa, int rr, int warukazu) { if (rr == 0) return 1 % warukazu; if (rr == 1) return wa % warukazu; wa %= warukazu; if (rr % 2 == 1) return ((ll)beki(wa, rr - 1, warukazu) * (ll)wa) % warukazu; ll zx = beki(wa, rr / 2, warukazu); return (zx * zx) % warukazu; } int comb(int nn, int rr) { if (rr < 0 || rr > nn || nn < 0) return 0; int r = pr[nn] * inv[rr]; r %= mod; r *= inv[nn - rr]; r %= mod; return r; } void gya(int ert) { pr[0] = 1; for (int i = 1; i <= ert; i++) { pr[i] = (pr[i - 1] * i) % mod; } inv[ert] = beki(pr[ert], mod - 2, mod); for (int i = ert - 1; i >= 0; i--) { inv[i] = inv[i + 1] * (i + 1) % mod; } } // cin.tie(0); // ios::sync_with_stdio(false); // priority_queue<pa3,vector<pa3>,greater<pa3>> pq; // sort(ve.begin(),ve.end(),greater<int>()); // mt19937(clock_per_sec); // mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()) ; //----------------kokomade tenpure------------ int dp[60][60][2600] = {}; signed main() { cin.tie(0); ios::sync_with_stdio(false); dp[0][0][0] = 1; int n, k; cin >> n >> k; for (int i = 1; i <= n; i++) for (int j = 0; j <= i; j++) for (int h = 0; h <= n * n; h++) { /* dp[i+1][j][h+2*(i+1-j)]+= dp[i][j][h]*(i+1-j)%inf; dp[i+1][j+1][h+] += dp[i][j][h]* */ if (j >= 0 && h - 2 * (i - 1 - j + 1) >= 0) dp[i][j][h] += dp[i - 1][j - 1][h - 2 * (i - 1 - j + 1)]; // if(i==2&& j==2 && h==0) cout<<dp[i][j][h]<<endl; if (j - 2 >= 0 && h - 2 * (i - 1 - j + 2) >= 0) dp[i][j][h] += dp[i - 1][j - 2][h - 2 * (i - 1 - j + 2)] * (i - 1 - j + 2) * (i - 1 - j + 2) % inf; if (j - 1 >= 0 && h - 2 * (i - 1 - j + 1) >= 0) dp[i][j][h] += dp[i - 1][j - 1][h - 2 * (i - 1 - j + 1)] * (i - 1 - j + 1) % inf; if (j - 1 >= 0 && h - 2 * (i - 1 - j + 1) >= 0) dp[i][j][h] += dp[i - 1][j - 1][h - 2 * (i - 1 - j + 1)] * (i - 1 - j + 1) % inf; if (j >= 0 && h - 2 * (i - 1 - j) >= 0) dp[i][j][h] += dp[i - 1][j][h - 2 * (i - 1 - j)] % inf; // cout<<i<<" "<<j<<" "<<h<<" "<<dp[i][j][h]<<endl; dp[i][j][h] %= inf; } cout << dp[n][n][k] << endl; return 0; }
#include <bits/stdc++.h> // #include <boost/multiprecision/cpp_int.hpp> #define int long long #define inf 1000000007 #define pa pair<int, int> #define ll long long #define pal pair<double, double> #define ppap pair<pa, int> #define PI 3.14159265358979323846 #define paa pair<int, char> #define mp make_pair #define pb push_back #define EPS (1e-10) int dx[8] = {0, 1, 0, -1, 1, 1, -1, -1}; int dy[8] = {1, 0, -1, 0, -1, 1, 1, -1}; using namespace std; class pa3 { public: int x; int y, z; pa3(int x = 0, int y = 0, int z = 0) : x(x), y(y), z(z) {} bool operator<(const pa3 &p) const { if (x != p.x) return x < p.x; if (y != p.y) return y < p.y; return z < p.z; // return x != p.x ? x<p.x: y<p.y; } bool operator>(const pa3 &p) const { if (x != p.x) return x > p.x; if (y != p.y) return y > p.y; return z > p.z; // return x != p.x ? x<p.x: y<p.y; } bool operator==(const pa3 &p) const { return x == p.x && y == p.y && z == p.z; } bool operator!=(const pa3 &p) const { return !(x == p.x && y == p.y && z == p.z); } }; class pa4 { public: int x; int y, z, w; pa4(int x = 0, int y = 0, int z = 0, int w = 0) : x(x), y(y), z(z), w(w) {} bool operator<(const pa4 &p) const { if (x != p.x) return x < p.x; if (y != p.y) return y < p.y; if (z != p.z) return z < p.z; return w < p.w; // return x != p.x ? x<p.x: y<p.y; } bool operator>(const pa4 &p) const { if (x != p.x) return x > p.x; if (y != p.y) return y > p.y; if (z != p.z) return z > p.z; return w > p.w; // return x != p.x ? x<p.x: y<p.y; } bool operator==(const pa4 &p) const { return x == p.x && y == p.y && z == p.z && w == p.w; } }; class pa2 { public: int x, y; pa2(int x = 0, int y = 0) : x(x), y(y) {} pa2 operator+(pa2 p) { return pa2(x + p.x, y + p.y); } pa2 operator-(pa2 p) { return pa2(x - p.x, y - p.y); } bool operator<(const pa2 &p) const { return y != p.y ? y < p.y : x < p.x; } bool operator>(const pa2 &p) const { return x != p.x ? x < p.x : y < p.y; } bool operator==(const pa2 &p) const { return abs(x - p.x) == 0 && abs(y - p.y) == 0; } bool operator!=(const pa2 &p) const { return !(abs(x - p.x) == 0 && abs(y - p.y) == 0); } }; string itos(int i) { ostringstream s; s << i; return s.str(); } int gcd(int v, int b) { if (v > b) return gcd(b, v); if (v == b) return b; if (b % v == 0) return v; return gcd(v, b % v); } int mod; int extgcd(int a, int b, int &x, int &y) { if (b == 0) { x = 1; y = 0; return a; } int d = extgcd(b, a % b, y, x); y -= a / b * x; return d; } pa operator+(const pa &l, const pa &r) { return {l.first + r.first, l.second + r.second}; } pa operator-(const pa &l, const pa &r) { return {l.first - r.first, l.second - r.second}; } int pr[200010]; int inv[200010]; int beki(int wa, int rr, int warukazu) { if (rr == 0) return 1 % warukazu; if (rr == 1) return wa % warukazu; wa %= warukazu; if (rr % 2 == 1) return ((ll)beki(wa, rr - 1, warukazu) * (ll)wa) % warukazu; ll zx = beki(wa, rr / 2, warukazu); return (zx * zx) % warukazu; } int comb(int nn, int rr) { if (rr < 0 || rr > nn || nn < 0) return 0; int r = pr[nn] * inv[rr]; r %= mod; r *= inv[nn - rr]; r %= mod; return r; } void gya(int ert) { pr[0] = 1; for (int i = 1; i <= ert; i++) { pr[i] = (pr[i - 1] * i) % mod; } inv[ert] = beki(pr[ert], mod - 2, mod); for (int i = ert - 1; i >= 0; i--) { inv[i] = inv[i + 1] * (i + 1) % mod; } } // cin.tie(0); // ios::sync_with_stdio(false); // priority_queue<pa3,vector<pa3>,greater<pa3>> pq; // sort(ve.begin(),ve.end(),greater<int>()); // mt19937(clock_per_sec); // mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()) ; //----------------kokomade tenpure------------ int dp[60][60][2600] = {}; signed main() { cin.tie(0); ios::sync_with_stdio(false); dp[0][0][0] = 1; int n, k; cin >> n >> k; for (int i = 1; i <= n; i++) for (int j = 0; j <= i; j++) for (int h = 0; h <= n * n; h++) { /* dp[i+1][j][h+2*(i+1-j)]+= dp[i][j][h]*(i+1-j)%inf; dp[i+1][j+1][h+] += dp[i][j][h]* */ if (j - 1 >= 0 && h - 2 * (i - 1 - j + 1) >= 0) dp[i][j][h] += dp[i - 1][j - 1][h - 2 * (i - 1 - j + 1)]; // if(i==2&& j==2 && h==0) cout<<dp[i][j][h]<<endl; if (j - 2 >= 0 && h - 2 * (i - 1 - j + 2) >= 0) dp[i][j][h] += dp[i - 1][j - 2][h - 2 * (i - 1 - j + 2)] * (i - 1 - j + 2) * (i - 1 - j + 2) % inf; if (j - 1 >= 0 && h - 2 * (i - 1 - j + 1) >= 0) dp[i][j][h] += dp[i - 1][j - 1][h - 2 * (i - 1 - j + 1)] * (i - 1 - j + 1) % inf; if (j - 1 >= 0 && h - 2 * (i - 1 - j + 1) >= 0) dp[i][j][h] += dp[i - 1][j - 1][h - 2 * (i - 1 - j + 1)] * (i - 1 - j + 1) % inf; if (j >= 0 && h - 2 * (i - 1 - j) >= 0) dp[i][j][h] += dp[i - 1][j][h - 2 * (i - 1 - j)] % inf; // cout<<i<<" "<<j<<" "<<h<<" "<<dp[i][j][h]<<endl; dp[i][j][h] %= inf; } cout << dp[n][n][k] << endl; return 0; }
replace
187
188
187
188
0
p02974
C++
Runtime Error
#include <algorithm> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using namespace std; using lint = long long; using P = pair<int, int>; using LLP = pair<long long, long long>; #define REP(i, x, n) for (int i = (x), i##_len = int(n); i < i##_len; ++i) #define rep(i, n) for (int i = 0, i##_len = int(n); i < i##_len; ++i) #define reps(i, n) for (int i = 1, i##_len = int(n); i <= i##_len; ++i) #define rrep(i, n) for (int i = int(n) - 1; i >= 0; --i) #define rreps(i, n) for (int i = int(n); i > 0; --i) #define SORT(x) sort((x).begin(), (x).end()) #define SORT_INV(x) sort((x).rbegin(), (x).rend()) #define TWINS(x) cout << ((x) ? "Yay!" : ":(") << endl const int IINF = (1 << 30) - 1; const long long LLINF = 1LL << 61; const int dx4[] = {1, 0, -1, 0}, dy4[] = {0, 1, 0, -1}; const int dx8[] = {1, 1, 0, -1, -1, -1, 0, 1}, dy8[] = {0, -1, -1, -1, 0, 1, 1, 1}; const double EPS = 1e-8; template <long long modulus> class ModInt { long long num; long long mod(long long n) { if (n < 0LL) { n += (abs(n + 1LL) / modulus + 1LL) * modulus; } return n % modulus; } long long ext_gcd(long long a, long long b, long long &x, long long &y) { if (b == 0LL) { x = 1; y = 0; return a; } long long d = ext_gcd(b, a % b, y, x); y -= a / b * x; return d; } long long get_inv(long long n) { long long x, y; ext_gcd(n, modulus, x, y); return mod(x); } public: ModInt(long long n = 0LL) { init(n); } void init(long long n = 0LL) { num = mod(n); return; } long long get(void) { return num; } ModInt &operator+=(const ModInt &rhs) { num += rhs.num; if (num >= modulus) { num -= modulus; } return *this; } ModInt &operator-=(const ModInt &rhs) { num -= rhs.num; if (num < 0LL) { num += modulus; } return *this; } ModInt &operator*=(const ModInt &rhs) { num = num * rhs.num % modulus; return *this; } ModInt &operator/=(const ModInt &rhs) { long long inv = get_inv(rhs.num); num = num * inv % modulus; return *this; } ModInt operator+(const ModInt &rhs) const { return ModInt(*this) += rhs; } ModInt operator-(const ModInt &rhs) const { return ModInt(*this) -= rhs; } ModInt operator*(const ModInt &rhs) const { return ModInt(*this) *= rhs; } ModInt operator/(const ModInt &rhs) const { return ModInt(*this) /= rhs; } ModInt &operator=(const ModInt &rhs) { num = rhs.num; return *this; } bool operator<(const ModInt &rhs) const { return num < rhs.num; } }; template <long long modulus> istream &operator>>(istream &lhs, ModInt<modulus> &rhs) { long long val; lhs >> val; rhs.init(val); return lhs; } template <long long modulus> ostream &operator<<(ostream &lhs, ModInt<modulus> rhs) { lhs << rhs.get(); return lhs; } using mint = ModInt<1000000007LL>; template <typename T> bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <typename T> bool chmin(T &a, T b) { if (b < a) { a = b; return true; } return false; } int main() { cin.tie(0); ios::sync_with_stdio(false); int n, k; cin >> n >> k; // int maxi = 0; // rep(i, n){ // maxi += abs(i - (n + ~i)); // } // if((k & 1) || k > maxi){ // cout << 0 << endl; // return 0; // } mint dp[51][51][251]; dp[0][0][0] = mint(1); rep(i, n) { rep(j, i + 1) { rep(l, k + 1) { if (2 * j + l <= k) { dp[i + 1][j][2 * j + l] += dp[i][j][l] * mint(2 * j + 1); } if (j && 2 * j + l - 2 <= k) { dp[i + 1][j - 1][2 * j + l - 2] += dp[i][j][l] * mint(j * j); } if (2 * j + l + 2 <= k) { dp[i + 1][j + 1][2 * j + l + 2] += dp[i][j][l]; } } } } cout << dp[n][0][k] << endl; return 0; }
#include <algorithm> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using namespace std; using lint = long long; using P = pair<int, int>; using LLP = pair<long long, long long>; #define REP(i, x, n) for (int i = (x), i##_len = int(n); i < i##_len; ++i) #define rep(i, n) for (int i = 0, i##_len = int(n); i < i##_len; ++i) #define reps(i, n) for (int i = 1, i##_len = int(n); i <= i##_len; ++i) #define rrep(i, n) for (int i = int(n) - 1; i >= 0; --i) #define rreps(i, n) for (int i = int(n); i > 0; --i) #define SORT(x) sort((x).begin(), (x).end()) #define SORT_INV(x) sort((x).rbegin(), (x).rend()) #define TWINS(x) cout << ((x) ? "Yay!" : ":(") << endl const int IINF = (1 << 30) - 1; const long long LLINF = 1LL << 61; const int dx4[] = {1, 0, -1, 0}, dy4[] = {0, 1, 0, -1}; const int dx8[] = {1, 1, 0, -1, -1, -1, 0, 1}, dy8[] = {0, -1, -1, -1, 0, 1, 1, 1}; const double EPS = 1e-8; template <long long modulus> class ModInt { long long num; long long mod(long long n) { if (n < 0LL) { n += (abs(n + 1LL) / modulus + 1LL) * modulus; } return n % modulus; } long long ext_gcd(long long a, long long b, long long &x, long long &y) { if (b == 0LL) { x = 1; y = 0; return a; } long long d = ext_gcd(b, a % b, y, x); y -= a / b * x; return d; } long long get_inv(long long n) { long long x, y; ext_gcd(n, modulus, x, y); return mod(x); } public: ModInt(long long n = 0LL) { init(n); } void init(long long n = 0LL) { num = mod(n); return; } long long get(void) { return num; } ModInt &operator+=(const ModInt &rhs) { num += rhs.num; if (num >= modulus) { num -= modulus; } return *this; } ModInt &operator-=(const ModInt &rhs) { num -= rhs.num; if (num < 0LL) { num += modulus; } return *this; } ModInt &operator*=(const ModInt &rhs) { num = num * rhs.num % modulus; return *this; } ModInt &operator/=(const ModInt &rhs) { long long inv = get_inv(rhs.num); num = num * inv % modulus; return *this; } ModInt operator+(const ModInt &rhs) const { return ModInt(*this) += rhs; } ModInt operator-(const ModInt &rhs) const { return ModInt(*this) -= rhs; } ModInt operator*(const ModInt &rhs) const { return ModInt(*this) *= rhs; } ModInt operator/(const ModInt &rhs) const { return ModInt(*this) /= rhs; } ModInt &operator=(const ModInt &rhs) { num = rhs.num; return *this; } bool operator<(const ModInt &rhs) const { return num < rhs.num; } }; template <long long modulus> istream &operator>>(istream &lhs, ModInt<modulus> &rhs) { long long val; lhs >> val; rhs.init(val); return lhs; } template <long long modulus> ostream &operator<<(ostream &lhs, ModInt<modulus> rhs) { lhs << rhs.get(); return lhs; } using mint = ModInt<1000000007LL>; template <typename T> bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <typename T> bool chmin(T &a, T b) { if (b < a) { a = b; return true; } return false; } int main() { cin.tie(0); ios::sync_with_stdio(false); int n, k; cin >> n >> k; // int maxi = 0; // rep(i, n){ // maxi += abs(i - (n + ~i)); // } // if((k & 1) || k > maxi){ // cout << 0 << endl; // return 0; // } mint dp[51][51][2501]; dp[0][0][0] = mint(1); rep(i, n) { rep(j, i + 1) { rep(l, k + 1) { if (2 * j + l <= k) { dp[i + 1][j][2 * j + l] += dp[i][j][l] * mint(2 * j + 1); } if (j && 2 * j + l - 2 <= k) { dp[i + 1][j - 1][2 * j + l - 2] += dp[i][j][l] * mint(j * j); } if (2 * j + l + 2 <= k) { dp[i + 1][j + 1][2 * j + l + 2] += dp[i][j][l]; } } } } cout << dp[n][0][k] << endl; return 0; }
replace
169
170
169
170
0
p02974
C++
Time Limit Exceeded
#define _USE_MATH_DEFINES #define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING #define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS #define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <immintrin.h> #include <mmintrin.h> #include <nmmintrin.h> using namespace std; #define dprint(Exp, ...) \ if (Exp) { \ fprintf(stderr, __VA_ARGS__); \ } #define printe(...) fprintf(stderr, __VA_ARGS__); #define PrtExp(_Exp) cerr << #_Exp << " = " << (_Exp) #define PrtExpN(_Exp) cerr << #_Exp << " = " << (_Exp) << "\n" #define SINT(n) scanf("%d", &n) #define SINT2(n, m) scanf("%d %d", &n, &m) #define SINT3(n, m, o) scanf("%d %d %d", &n, &m, &o) #define SINT4(n, m, o, P) scanf("%d %d %d %d", &n, &m, &o, &P) #define SINT5(n, m, o, P, q) scanf("%d %d %d %d %d", &n, &m, &o, &P, &q) #define SLL(n) scanf("%lld", &n) #define SLL2(n, m) scanf("%lld %lld", &n, &m) #define SLL3(n, m, o) scanf("%lld %lld %lld", &n, &m, &o) #define SST(s) scanf("%s", s) #define SCH(c) scanf("%c", &c) #define GC() getchar() #define PINT(n) printf("%d", (int)(n)) #define PINT2(n, m) printf("%d %d", (int)(n), (int)(m)) #define PINT3(n, m, l) printf("%d %d %d", (int)(n), (int)(m), (int)(l)) #define PLL(n) printf("%lld", (long long)(n)) #define PST(s) printf("%s", (s)) #define PCH(s) printf("%c", (s)) #define PINTN(n) printf("%d\n", (int)(n)) #define PINT2N(n, m) printf("%d %d\n", (int)(n), (int)(m)) #define PINT3N(n, m, l) printf("%d %d %d\n", (int)(n), (int)(m), (int)(l)) #define PLLN(n) printf("%lld\n", (long long)(n)) #define PSTN(s) printf("%s\n", (s)) #define PCHN(s) printf("%c\n", (s)) #define PSP() printf(" ") #define PN() printf("\n") #define PC(c) putchar(c) #define CSP (' ') #define SN ("\n") #define rep(i, a) for (int i = 0; i < a; i++) #define reP(i, a) for (int i = 0; i <= a; i++) #define Rep(i, a) for (int i = a - 1; i >= 0; i--) #define ReP(i, a) for (int i = a; i >= 0; i--) #define rEp(i, a) for (i = 0; i < a; i++) #define rEP(i, a) for (i = 0; i <= a; i++) #define REp(i, a) for (i = a - 1; i >= 0; i--) #define REP(i, a) for (i = a; i >= 0; i--) #define repft(i, a, b) for (int i = a; i < b; i++) #define repfT(i, a, b) for (int i = a; i <= b; i++) #define Repft(i, a, b) for (int i = a - 1; i >= b; i--) #define RepfT(i, a, b) for (int i = a; i >= b; i--) #define foreach(a, it) for (auto it = a.begin(); it != a.end(); ++it) #define FILL(a, v) fill(begin(a), end(a), v) #define FILL0(a) memset(a, 0, sizeof(a)) #define FILL1(a) memset(a, -1, sizeof(a)) typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> Pi; typedef pair<ll, ll> Pll; const int INF = 1'010'000'000; // 0x3C33'6080 const ll INFLL = 0x1f1f1f1f1f1f1f1fLL; // 2,242,545,357,980,376,863 template <class A, class B> inline ostream &operator<<(ostream &st, const pair<A, B> &P) { return st << "(" << P.first << "," << P.second << ")"; }; template <class A, class B> inline pair<A, B> operator+(const pair<A, B> &P, const pair<A, B> &Q) { return pair<A, B>(P.first + Q.first, P.second + Q.second); }; template <class A, class B> inline pair<A, B> operator-(const pair<A, B> &P, const pair<A, B> &Q) { return pair<A, B>(P.first - Q.first, P.second - Q.second); }; #define fs first #define sc second const ll M = 1000000007; int solve(int n, int k) { int a[50]; rep(i, n) a[i] = i; int ret = 0; do { int b = 0; rep(i, n) { b += abs(a[i] - i); } if (b == k) { // cout << "| "; rep(i, n) cout << a[i] + 1 << " "; cout << endl; if (++ret >= M) ret = 0; } } while (next_permutation(a, a + n)); return ret; } int n, k; ll memo[64][4096]; ll dfs(int i, int r) { if (r == 0) return 1; if (i == n) { /* if (r <= n) return 1; return 0; */ return 0; } if (memo[i][r] >= 0) return memo[i][r]; ll ret = 0; reP(w, n - i + 1) { if (r < w) break; ret += dfs(i + 1, r - w); ret %= M; } printf("dsf(%d, %d) : %lld\n", i, r, ret); return memo[i][r] = ret; } /* 1; 1, 1; 1, 2, 3; 1, 3, 7, 9, 4; 1, 4, 12, 24, 35, 24, 20 */ int dat[] = { 1, 1, 1, 1, 2, 3, 1, 3, 7, 9, 4, 1, 4, 12, 24, 35, 24, 20, 1, 5, 18, 46, 93, 137, 148, 136, 100, 36, 1, 6, 25, 76, 187, 366, 591, 744, 884, 832, 716, 360, 252, 1, 7, 33, 115, 327, 765, 1523, 2553, 3696, 4852, 5708, 5892, 5452, 4212, 2844, 1764, 576, 1, 8, 42, 164, 524, 1400, 3226, 6436, 11323, 17640, 25472, 33280, 40520, 44240, 45512, 40608, 35496, 25632, 18108, 8064, 5184, 1, 9, 52, 224, 790, 2350, 6072, 13768, 27821, 50461, 83420, 127840, 182256, 242272, 301648, 350864, 382576, 389232, 373536, 332640, 273060, 208548, 136512, 81792, 46656, 14400, 1, 10, 63, 296, 1138, 3708, 10538, 26480, 59673, 121626, 226787, 390144, 628744, 949472, 1355952, 1826464, 2341600, 2833632, 3282464, 3584160, 3765600, 3719664, 3531924, 3093336, 2642364, 2010240, 1508544, 963072, 621504, 259200, 158400, 1, 11, 75, 381, 1582, 5582, 17222, 47194, 116457, 261163, 537459, 1022981, 1817652, 3040352, 4810720, 7230928, 10360160, 14178912, 18577792, 23327872, 28132048, 32571504, 36310464, 38903904, 40028724, 39552156, 37457388, 33941412, 29314944, 24179904, 18835776, 13777344, 9452736, 5716800, 3211200, 1742400, 518400, 1, 12, 88, 480, 2137, 8096, 26860, 79376, 211811, 515308, 1153268, 2391936, 4633331, 8438664, 14557048, 23874176, 37407760, 56117824, 80906752, 112162240, 150052400, 193572736, 241706624, 291576384, 341323776, 386160048, 424359540, 450394992, 464545584, 461528208, 446428476, 413557632, 373573440, 321120000, 268449408, 210332160, 162330624, 112550400, 77788800, 46540800, 28497600, 11404800, 6739200, 1, 13, 102, 594, 2819, 11391, 40344, 127508, 364587, 952559, 2293742, 5126898, 10710633, 21042989, 39117852, 69175664, 116857024, 189256368, 294745440, 442503456, 641759376, 900689616, 225195321, 617201401, 74227554, 586823330, 140227131, 711888699, 274217080, 795069832, 242715461, 585116357, 796764497, 861974465, 769155485, 525176285, 146566301, 650715556, 73773796, 455145195, 828946802, 226153586, 685663993, 216281593, 828705600, 536385600, 309484800, 166924800, 87609600, 25401600, 1, 14, 117, 724, 3645, 15626, 58741, 197280, 600215, 1671266, 4295107, 10259436, 22922995, 48184950, 95816051, 181136304, 327071752, 566117888, 942525072, 513281017, 349163810, 532145419, 154557773, 309226767, 88509354, 563257605, 789064441, 766807654, 474675580, 795689314, 599134613, 627066840, 658988947, 307608398, 337632800, 295701193, 44870369, 150212311, 705302359, 336038622, 452522163, 797367958, 62674553, 57993322, 777736994, 845298906, 452367755, 90655804, 810196653, 976943895, 564798323, 582118351, 994783972, 869862386, 697759993, 660441600, 381024000, 1, 15, 133, 871, 4633, 20979, 83313, 295803, 952299, 2809009, 7656027, 19414457, 46086247, 102967901, 217634463, 437195525, 838372452, 540635289, 722168530, 638311860, 640827391, 196046908, 898688562, 478199884, 793020369, 808862771, 562236075, 94791602, 385333320, 237794527, 197694759, 398043392, 504456766, 579736664, 78137089, 793367253, 961295251, 280517488, 179779783, 947563092, 901772777, 859566930, 199212409, 920781370, 362900807, 735004334, 297264154, 482748036, 653703312, 140400674, 623159781, 320434095, 373194802, 13313867, 205909676, 360223815, 570584277, 68075848, 372652149, 961247580, 23084534, 261139053, 151302323, 715359965, 625702393, 1, 16, 150, 1036, 5802, 27648, 115538, 431844, 1464468, 4554040, 13096378, 35069940, 87969166, 207781760, 464351910, 986188668, 998611836, 879505923, 237509223, 15110629, 621334822, 88677622, 257578542, 963016850, 235638961, 442107823, 429101453, 483004748, 329733855, 718448185, 266304376, 413950543, 256286771, 626720357, 318467482, 59069608, 81901162, 352730851, 104241055, 503595237, 956355036, 534522134, 457799859, 108929893, 887297322, 424614770, 265024591, 876853471, 515703045, 692038809, 210906163, 20070317, 468291405, 145357835, 797577421, 232358134, 747771239, 343859985, 833879609, 78548665, 289896769, 449285934, 313197004, 379603290, 397630660, 609910102, 442642726, 627950853, 722186028, 705163253, 998661511, 771071664, 636940611, 1, 17, 168, 1220, 7172, 35852, 157132, 616084, 2192506, 7159090, 21631676, 60902460, 160707468, 399489140, 939796228, 101060910, 481320121, 151453550, 952463061, 931694473, 957528293, 554162053, 990142499, 644946993, 651797781, 791594351, 556120466, 271969917, 107619398, 710253075, 280526462, 615698879, 99748930, 775178221, 257586036, 645364809, 806795120, 340635512, 801741075, 790520661, 68328385, 331513794, 351728404, 931812262, 91105169, 176869824, 445724501, 370449983, 359815736, 918724628, 869062973, 659791249, 657727222, 395793733, 32692523, 78858425, 151369211, 628504487, 842750087, 152091477, 889718876, 908002421, 944598446, 656459208, 712920845, 47550280, 92244967, 110652620, 951703750, 217822851, 901098263, 655149074, 861896271, 859184013, 992613245, 768042116, 807916959, 335381553, 909568095, 153171069, 827990317, 681893483, 1, 18, 187, 1424, 8764, 45832, 210072, 861400, 3206786, 10957868, 34666130, 102239488, 282743580, 736889224, 817936097, 262532028, 534038590, 412279142, 965109380, 86702267, 846482566, 945052509, 644517943, 548776024, 679330947, 152291502, 882910517, 188127435, 636778925, 902059202, 132531208, 193904122, 893705022, 246193070, 652079051, 958060250, 148697872, 504141990, 371410212, 807466717, 514477363, 565424570, 560794838, 11419155, 215137208, 665710713, 791504234, 359367396, 224050172, 509091270, 125989128, 782600310, 957126038, 667219607, 386301613, 605448653, 296557741, 618019404, 194294675, 222923480, 765962783, 743934970, 24324611, 512643153, 214242880, 286900578, 228877964, 91240846, 430467141, 533029377, 904804693, 373207899, 916503101, 83598539, 560288494, 363356684, 68282446, 152683809, 284461190, 124425011, 167972327, 428909487, 373215034, 420008537, 513304383, 874743039, 487193257, 97337408, 532639641, 184378261, 955976093, 1, 19, 207, 1649, 10600, 57852, 276620, 1183172, 4595034, 16384606, 54107670, 166643130, 481442164, 311240781, 381378831, 288429444, 380463632, 370477330, 171662912, 688513797, 626045604, 789881798, 844990830, 70546834, 230422087, 267733218, 970080423, 75064762, 104073936, 888990608, 393490487, 819401315, 362017415, 197941501, 97730360, 491049732, 790022455, 142301163, 381999002, 81566974, 255547256, 500580164, 503785886, 874661360, 953064009, 357278689, 416715628, 656421867, 311332859, 849655408, 575613107, 850236831, 533549113, 255339339, 611845477, 501164398, 135987981, 672393680, 678611757, 552403430, 470027818, 333312311, 203812034, 929380798, 133842121, 497262544, 839881753, 29703780, 133717366, 249364505, 959337844, 632980495, 72879056, 356819838, 662140760, 182352973, 260787823, 329159184, 423643610, 488600943, 164109163, 8143787, 184454683, 684285006, 693158498, 382122550, 488552031, 777204359, 564238497, 598675373, 603916585, 720234840, 93182262, 238936257, 486420235, 352604922, 958291193, 880928218, 736558676, 163545641, 189347824, 1, 20, 228, 1896, 12703, 72200, 359348, 1599616, 6465450, 23997032, 82508708, 264654080, 796563486, 260832418, 76986106, 528774007, 854313906, 307546108, 722735109, 61004626, 805619536, 18191861, 511411798, 993782454, 401030744, 633897378, 70862649, 96855526, 314416445, 92910833, 135520920, 492052755, 24334887, 643976444, 574388511, 317610455, 122930943, 637889505, 255461238, 950861369, 48876234, 149504663, 198682481, 942670278, 866921314, 563621302, 960474580, 980132644, 624295523, 399490883, 351714973, 945626033, 827908349, 157456205, 481861323, 472454109, 343580291, 683697065, 95059407, 841332348, 464714941, 596887160, 38681949, 757883329, 590303711, 64921694, 730086270, 15240461, 714742087, 32874447, 175996750, 277466516, 788882909, 11880203, 95097385, 778398376, 531252352, 479554466, 557013590, 609738833, 798714176, 859324339, 721484640, 268442938, 861267595, 806087188, 31691029, 950412807, 580575404, 849451646, 691790951, 264837637, 967322620, 365040170, 622467624, 456436788, 658680316, 60575186, 387550026, 215002020, 31349904, 449373833, 559514745, 640364153, 807042078, 450172023, 562637973, 109112418, 545193132, 195217263, 976304283, 1, 21, 250, 2166, 15097, 89189, 461164, 2132144, 8950214, 34503182, 123236828, 410729140, 284813823, 790835929, 594736274, 153822108, 374418504, 157537842, 147846917, 133568389, 483576696, 508616649, 656867821, 84463125, 640047601, 955370715, 182167616, 49108700, 229345632, 795610484, 502493987, 857101031, 142485158, 996679960, 742503997, 723858587, 317526153, 365342533, 250775491, 442738912, 408346120, 881242865, 135363327, 231979623, 347291745, 824934645, 995772018, 164592917, 354883487, 450805745, 963969802, 171006181, 92161176, 169883419, 961669090, 26844445, 393784092, 571606470, 464707158, 34144520, 652396373, 745405475, 202923498, 135935314, 703695236, 776259115, 48310283, 874186699, 219390686, 510394758, 751965065, 418424556, 8781061, 736058807, 674014147, 674780706, 590530540, 4352977, 803825827, 167292329, 541083402, 260679638, 665083995, 939990721, 816665296, 886017767, 669822229, 694816125, 643235536, 937314556, 115942268, 261159535, 687177905, 12245758, 694615643, 977706180, 217949106, 118952653, 898868241, 856650616, 42954342, 330321980, 535121720, 982503521, 719423135, 714354007, 18745970, 333448882, 302037622, 935654015, 778423936, 317991952, 284756555, 504736970, 155871365, 118263505, 797065125, 640838446, 258037348, 34344762, 502389803, 911086550, 1, 22, 273, 2460, 17807, 109158, 585339, 2805752, 12209406, 48792492, 180680070, 624410736, 25734764, 199973794, 977710523, 571365953, 412869707, 328237414, 214863466, 633048751, 257394955, 317735309, 673309005, 193600985, 704135816, 514918834, 650479735, 33606857, 490034801, 698396427, 67986999, 220797055, 218864611, 931163713, 940790978, 675674698, 85542051, 543018292, 61247584, 910803604, 831296179, 923943160, 89478028, 104500393, 161998091, 254912705, 539249258, 547749719, 357852173, 690014841, 206926249, 893887199, 747112232, 382059625, 148865046, 301618706, 260333115, 442306036, 247371284, 782005651, 233300621, 920894203, 317455792, 678639547, 427050277, 482884001, 854060466, 980543322, 860769666, 701293636, 771136168, 670745480, 486701027, 168461356, 848787800, 289825171, 498776317, 33320170, 430165721, 821516580, 115533370, 398776967, 333310602, 563097053, 553134182, 219816464, 216637272, 206027601, 933677337, 925510467, 267639197, 43693887, 486722546, 270929495, 877730912, 261947307, 375318068, 692508932, 989184491, 226696206, 288508969, 739837562, 849035543, 782296408, 273955665, 801085382, 431898190, 935043965, 202752072, 867866169, 151133676, 67940990, 78118516, 742654574, 165553271, 254022475, 668960857, 929973305, 656759571, 877339826, 925206924, 133648890, 623964326, 796176354, 256442424, 844384225, 955053908, 35821657, 33969824, 328610099, 171474448, 265634834, 954990510, 1, 23, 297, 2779, 20859, 132473, 735535, 3649437, 16435370, 67971642, 260491974, 931772466, 129241853, 915880695, 773220207, 21124907, 663657824, 89235883, 562087424, 395633225, 79602143, 818737728, 503346111, 923762587, 810187543, 71950684, 872552891, 722894374, 788701216, 792043650, 839896539, 577542972, 345484502, 350106805, 159630680, 594479078, 806985602, 451202244, 562057157, 345406448, 404888318, 371479292, 122121086, 196184273, 855722413, 625056343, 209132008, 580725504, 234791519, 683270249, 879431955, 820639155, 890517789, 877206124, 780147370, 943542736, 532169988, 134361777, 389279830, 486085405, 212150153, 60309713, 36144061, 220641769, 167907687, 433032241, 672669299, 4840381, 543970499, 860603358, 920463673, 899153827, 269139419, 99866794, 833550296, 732963165, 649634036, 220976898, 948879986, 81746947, 249278044, 943429751, 227240067, 617290217, 857759442, 317672542, 702411387, 392102340, 598392406, 771484657, 20769431, 772211314, 777981688, 103043307, 336611982, 922346108, 46010568, 620920750, 740298345, 143296430, 127113300, 229361025, 452883985, 298773134, 583669967, 430943791, 878469881, 498554889, 377075156, 399618101, 518539100, 610655946, 762624102, 339746521, 193491143, 582788075, 58498274, 139175929, 439487543, 659039143, 969039085, 205473123, 149794944, 735361805, 144310487, 952281582, 885994682, 290034640, 449859219, 870975475, 717604104, 930837761, 466542500, 510501275, 368063612, 61813298, 959329905, 938922014, 660077190, 12025968, 335011033, 657136343, 351072920, 964781583, 196462283, 1, 24, 322, 3124, 24280, 159528, 915834, 4696644, 21857553, 93405656, 369882084, 367190881, 745178532, 541448535, 237690972, 408537702, 191376116, 678513161, 493570976, 397907192, 9101765, 658714208, 122356973, 514532531, 911169029, 6916896, 782796, 910119724, 942560918, 62371227, 773940129, 523667340, 669757203, 42568262, 891666384, 467022993, 486796667, 727294526, 413613585, 787453753, 599953158, 417187968, 359849625, 117069116, 879478181, 12380000, 910899870, 838986319, 102687453, 103327364, 376800830, 429223538, 780159138, 706916356, 587575355, 971169352, 36010810, 483798044, 344462034, 787276711, 359714668, 737585540, 514856433, 506547585, 7966248, 935961, 931790046, 725219981, 437246235, 737823353, 539625329, 101294921, 998345360, 158678756, 14552916, 434899855, 58679632, 771567929, 908041362, 370603042, 958461645, 473954165, 329932246, 645017860, 950250115, 632956030, 39737256, 308287817, 593859369, 848980890, 73354610, 67983312, 794665532, 744501399, 571146358, 79777328, 768540650, 301591668, 87146707, 749547055, 542914952, 113807115, 981646049, 443442346, 689844336, 226785366, 664441023, 644644459, 65534356, 186334852, 433121661, 818953887, 687026114, 344822747, 464015963, 110899493, 294091084, 65199948, 37449794, 719226153, 501099656, 413337315, 725255533, 799293560, 259962068, 954615054, 373654234, 764439094, 914044890, 22085466, 539035590, 698634111, 313016212, 98993468, 941478268, 955683335, 902077766, 420565422, 767959775, 128648986, 355285226, 534029655, 104714136, 932643222, 778200211, 56428536, 225880543, 792355687, 449940761, 181471652, 529937629, 325235521, 6575392, 94094707, 441392085, 37264955, 911557047, 1, 25, 348, 3496, 28098, 190746, 1130768, 5985744, 28747851, 126764795, 517958180, 975500521, 75313899, 914923483, 611051644, 458281681, 932346365, 712529240, 185024083, 463834094, 950836649, 286357381, 871292163, 434939852, 58330077, 629835295, 27932676, 66354549, 10923173, 590226200, 526183672, 176005584, 809584977, 222348292, 260397896, 396327746, 178971085, 774808076, 78650222, 507195902, 144802453, 299847298, 581537053, 724817078, 350425193, 503589319, 654904119, 595937600, 992781673, 82554146, 868891604, 769490422, 119334199, 287573489, 85347169, 118147346, 949694675, 540939467, 927324362, 545027201, 610310429, 769058023, 21423, 262519735, 786795808, 240407039, 428554518, 447092428, 788617633, 367724192, 374279457, 343082569, 856162651, 150954733, 962857235, 700751807, 895999415, 533537747, 537990547, 268357366, 869434038, 633081543, 603452058, 947934680, 987367826, 743179254, 710352935, 835787228, 706586787, 845202323, 238777269, 405136472, 480736674, 155194042, 871452828, 677921910, 616952227, 984554304, 602482844, 894952109, 161534829, 782737895, 850072208, 670793244, 828100052, 222399146, 284700626, 231919567, 306545173, 673216888, 772842480, 314744315, 347738200, 25002680, 730048408, 649455506, 745857274, 196252843, 529935260, 419302767, 276709210, 732855171, 343508231, 624945362, 861002432, 484757974, 367927715, 209929226, 661865936, 531107025, 413469524, 479519565, 741904536, 610072165, 606639245, 934344602, 716197790, 587584177, 185414563, 306822687, 841034662, 971868532, 919896238, 158358640, 773475266, 936203252, 665923149, 911486615, 197651366, 774528535, 82937079, 883806524, 130206852, 774201811, 995994000, 245370199, 842572718, 793423605, 740588350, 687616120, 657690139, 857790226, 37323118, 88399209, 523321086, 117621631, 71036645, 222192424, 788926021, 202125596, 1, 26, 375, 3896, 32342, 226580, 1385350, 7560544, 37426495, 170077814, 716127109, 814596482, 388283574, 187079164, 480126707, 290089727, 38629756, 54115650, 64891257, 901599546, 718222041, 911275669, 323565019, 817912019, 805459451, 803612364, 201797073, 732830955, 80380678, 23464457, 701195891, 272214917, 913862649, 132026200, 669751010, 759341231, 973676755, 794065196, 967438659, 308299894, 10712690, 949669597, 781686555, 88559004, 727530543, 318751597, 278470531, 434911202, 804701133, 324324750, 981099143, 232682614, 987104568, 776649739, 786487389, 442468777, 569068005, 663709268, 881510700, 203686642, 57967683, 568729400, 236001193, 623959074, 703861418, 908672716, 70204475, 867825588, 827103298, 241630317, 362696969, 415618616, 805038660, 598704556, 10082872, 643477587, 415164213, 703084166, 477367476, 20036406, 629980785, 802614294, 952521645, 17601466, 311433959, 830294700, 548394039, 535645146, 521413012, 929141249, 283365227, 727229980, 443388093, 410708269, 286618040, 319768543, 938841603, 93475597, 394693465, 931196821, 495806189, 902879580, 707905623, 303901454, 576396872, 484544924, 486011674, 564305854, 311518869, 856442237, 372745088, 366968335, 813470622, 720542245, 551543931, 596748971, 778551123, 354920979, 984250497, 691689872, 327423759, 52302396, 920309409, 457393341, 162758194, 401889329, 760192486, 361045291, 58998809, 845800809, 8575285, 649668894, 501939170, 542308042, 574502757, 192463535, 690505425, 204738512, 689813836, 483570629, 525148782, 216925832, 952334594, 68584858, 946061868, 229986068, 113082103, 705545851, 563504064, 430610853, 209937938, 608555345, 578039088, 750439353, 944169681, 417934823, 74422181, 960090808, 568355902, 435674968, 894299009, 15861008, 618713868, 509911155, 168869978, 339481775, 369451744, 600513141, 71634326, 781507214, 857107917, 106564183, 736233715, 362800524, 615467708, 519437498, 342065337, 206666492, 505918934, 308299385, 20927738, 106279730, 457391057, 1, 27, 403, 4325, 37042, 267514, 1685106, 9470830, 48268511, 225792189, 978561725, 958557158, 38052071, 919433401, 254995547, 546697380, 704487939, 32839999, 508901654, 551556389, 663564198, 695178769, 814009554, 547143595, 371559020, 945387943, 670094820, 616330760, 976064124, 607380120, 8699769, 998280938, 580008436, 958036252, 912203574, 544195790, 396609897, 954428754, 708902921, 801338681, 431017191, 381717232, 344144422, 131861617, 874277396, 830300192, 596462835, 318671397, 244894238, 904557382, 834593756, 283869037, 697514761, 969250693, 509524190, 913260759, 384371901, 692021356, 509945770, 32685910, 505430483, 907189201, 193340383, 693205397, 603006308, 305262013, 925218957, 968092842, 27052064, 47727228, 477199307, 293774777, 98292616, 663047137, 995897620, 288543890, 998081856, 524487172, 892499155, 556044593, 972323813, 578208602, 933674462, 509188659, 985492681, 986901126, 628028841, 519717277, 311965185, 897395442, 829761538, 9680527, 161715155, 343759581, 402616197, 861303980, 911400557, 358697993, 515548395, 553147014, 892738525, 205604013, 762111690, 442223169, 7841804, 517369986, 84729818, 152655938, 700957258, 898706126, 75157861, 271201265, 543855670, 440588279, 204308612, 236683234, 208667572, 404506592, 809547310, 853106482, 518815458, 16491026, 491832633, 360120645, 923872102, 602086347, 641452842, 18221609, 229080666, 428455406, 569262655, 856993308, 230900297, 490066099, 367669571, 96292417, 52365382, 469261002, 374633464, 900617667, 182287939, 49700390, 796588976, 949085023, 222503562, 658471212, 94278399, 66098044, 72459139, 603916441, 257635815, 234793049, 951525459, 549173423, 938321308, 13662267, 288258509, 65326301, 11071916, 364716823, 929353581, 839483911, 199241395, 29486252, 482468148, 829994735, 370892643, 687560607, 531658704, 568187724, 486108828, 475403750, 227529481, 124500798, 228110006, 56292488, 958873404, 963718586, 481659835, 183136868, 593123751, 622015148, 469053734, 211587807, 928091671, 481375722, 612130911, 134707706, 334981252, 784422204, 712253942, 698883770, 390222722, 25478322, 28778175, 349558455, 616616543, 1, 28, 432, 4784, 42229, 314064, 2036108, 11772944, 61710789, 296841956, 322742117, 501368237, 486564198, 208215103, 787564548, 236938424, 301578523, 866593178, 461034739, 153403692, 741061604, 268366308, 41671958, 999969805, 820629183, 540097933, 348143198, 290585123, 709901036, 830657214, 397773343, 205345230, 80836479, 744283025, 767371096, 13280133, 166091858, 688213267, 405245759, 999129285, 957885801, 125598090, 229197648, 232621259, 771781842, 15692966, 623498734, 209019752, 451480479, 405116698, 905232949, 522429827, 160392239, 911337480, 463779522, 870625842, 997849245, 364479050, 834828, 300785526, 10186705, 265101999, 566806573, 614983712, 685595755, 48653250, 344390997, 673637797, 896886255, 108856368, 31386606, 486989879, 489263782, 517653845, 976993581, 117774221, 829510874, 294191687, 233225993, 831800739, 448583977, 657291524, 649603801, 456575978, 536862581, 855051723, 994222346, 302476269, 502749737, 322446053, 790323255, 357338908, 887312147, 181428924, 536100952, 55330164, 160205355, 190454705, 365581727, 201998030, 826748536, 400273437, 624522779, 849319472, 800147953, 80982274, 447705256, 168185200, 97822479, 309878269, 678607548, 912097410, 927785144, 334246635, 662138658, 715198385, 260363473, 461374975, 89468114, 651175074, 575096135, 130470890, 71518840, 879845193, 486812125, 128678982, 647847215, 49005945, 59417027, 550597313, 85275582, 589669875, 488581288, 579391253, 238935007, 307933774, 801626662, 991248834, 831660242, 2289249, 939337934, 170802252, 112167473, 712496239, 45742853, 482400666, 341362938, 957391891, 147812751, 376451585, 832724562, 418101830, 38563919, 274362964, 819817184, 400041713, 313141267, 806456583, 999307614, 670677205, 585839782, 845991536, 831623045, 109161241, 554327240, 822718306, 173814042, 363700239, 22366070, 479904205, 190929878, 554951008, 774006606, 279182950, 109357938, 401823952, 575672540, 860574847, 593910748, 547825741, 217594637, 989467389, 184852185, 331539318, 325720467, 383229710, 654245987, 146654996, 209385163, 560462909, 965812836, 65583448, 508391947, 709539829, 955465325, 214525022, 394005813, 531700924, 773028650, 417539579, 326670161, 406612199, 165245, 699092510, 550837077, 14964582, 527720684, 440459594, 268905155, 297293091, 881879628, 1, 29, 462, 5274, 47935, 366779, 2445008, 14530396, 78259797, 386723841, 770080067, 561338901, 331351593, 839635833, 167817400, 497149119, 881282118, 352201610, 471630724, 181160121, 88806794, 987377178, 289689361, 946592969, 656979867, 594487341, 196240769, 948508749, 810784209, 709855728, 576276359, 518417791, 87667236, 667014934, 181628700, 79050911, 337053925, 373883684, 560120551, 458872893, 815731972, 827954345, 771964062, 380463298, 190074568, 335845313, 308369049, 297128477, 730684746, 742600059, 263592454, 96421517, 206168581, 306386280, 238588046, 136275025, 509837233, 285349782, 467079296, 44733505, 132275281, 829959933, 391862643, 62600608, 253168338, 426879146, 365435454, 91732486, 471304236, 543190875, 798110387, 894371900, 696428631, 750022470, 726550236, 936549828, 542410178, 939184541, 791578453, 983635297, 823881369, 150676558, 585328209, 653882077, 963087655, 950795211, 936066317, 71868369, 440124326, 965151462, 175368387, 40663323, 699428294, 108367130, 332044307, 970432796, 572024201, 885659377, 539317691, 132218646, 139253073, 467726930, 45351751, 297376822, 508633325, 703469419, 746467332, 503668629, 112630766, 930570931, 962347630, 576196343, 698904389, 167199167, 333129737, 608922442, 222067115, 688206452, 802821275, 954540394, 911151138, 906746447, 902608727, 890863920, 307268385, 54404696, 104370759, 495676754, 441341576, 829087999, 88911607, 975336543, 381836343, 298727399, 758323163, 709721214, 146811076, 322114121, 909574264, 955852236, 803216000, 511491931, 157225317, 671670053, 367885171, 612666342, 842261160, 508147005, 345029386, 809990068, 981225972, 241279545, 458275632, 172983843, 48836190, 961296645, 538132589, 271432367, 877708377, 386417805, 815731556, 463571419, 404450924, 113136747, 549319603, 219464194, 220054123, 907114544, 328856175, 265047793, 589592614, 328159953, 809008569, 510434161, 420313068, 107873733, 868895119, 895337042, 156863206, 48004547, 666506430, 727609186, 85858741, 59205240, 78940637, 545962715, 139572749, 421355881, 858507471, 952603331, 401020118, 942925111, 296295597, 997986384, 115737481, 677010850, 282276283, 274892540, 163700485, 118592549, 846472792, 136765224, 236032397, 179431589, 539549211, 214067143, 923131121, 999465547, 232088789, 610013691, 896204760, 478686995, 218989077, 91096939, 221616643, 243944261, 454787573, 542927414, 355318220, 147354818, 482630, 675619041, 634351197, 478341164, 574509037, 738721209, 1, 30, 493, 5796, 54193, 426242, 2919073, 17814512, 98499977, 499582398, 346636279, 286311246, 338970899, 482987014, 740494022, 522312682, 389124982, 438269373, 295660905, 384589942, 269003911, 190728878, 21841107, 394443500, 159301748, 885681179, 869073529, 396029106, 969827087, 16747334, 474716791, 259235367, 753984455, 365768194, 423375006, 957390875, 407261764, 592999097, 928039310, 529328158, 133251022, 533719572, 434981329, 779487889, 212784950, 467080112, 287628298, 91658981, 576061624, 322787361, 682746649, 234833733, 676878118, 220869554, 982232103, 879428014, 742840902, 65876039, 230084790, 68776407, 988541480, 113769367, 288661011, 898604342, 790158821, 811679832, 416532461, 643426286, 357304561, 904850873, 143689492, 643378934, 217587561, 816799579, 741653213, 950522177, 519192837, 195766899, 875531753, 913462122, 931740864, 147485151, 73473743, 881407231, 943949423, 19375017, 95185407, 658198820, 654223830, 78841384, 487272636, 810454297, 156111172, 108214345, 594083015, 721613382, 413639222, 199581479, 219296986, 983776208, 50034813, 434669652, 336761553, 553659069, 443256837, 867959007, 649693919, 829394710, 511124003, 801382432, 809258820, 440312724, 549557631, 57091967, 619973166, 38255131, 989252595, 296849831, 126449228, 992478958, 948085171, 398912012, 308493194, 585304989, 581850817, 704472537, 457658359, 706849064, 974235300, 322942033, 801441410, 806760539, 930211369, 674605925, 140615032, 804334982, 654022727, 747554604, 304695097, 670935186, 973200118, 899755340, 43016718, 33443894, 486649937, 183173093, 28680647, 612676891, 17478829, 208078434, 467131016, 651933212, 464433186, 3993644, 959280435, 310671435, 524438940, 540166082, 143663989, 984026973, 596317769, 299039541, 925611762, 115137245, 238184581, 798462400, 902062936, 499673997, 696053154, 121959061, 376644235, 378356623, 996412950, 115590297, 517087995, 817795384, 731733847, 61225249, 930096903, 292653780, 149516053, 503527083, 233497811, 781589564, 87992011, 514696635, 495015483, 151617728, 478098704, 773499685, 621536652, 787266199, 440325002, 249898342, 747360642, 671517137, 216648293, 686506084, 544204132, 949750238, 249236969, 319054830, 756596931, 233403453, 594672369, 158463779, 809106181, 249481644, 610711719, 262167344, 179138909, 270160113, 278492510, 490828032, 946977816, 803242084, 541036271, 624688984, 204404014, 881539240, 779609382, 561095932, 524976628, 888316278, 139701497, 712146362, 413036824, 810411985, 241441787, 247390036, 695355554, 122993697, 227371919, 399947791, 833892197, 899399938, 781528108, 656359733, 551706967, 845829828, 900357325, 1, 31, 525, 6351, 61037, 493071, 3466221, 21705119, 123102861, 640304911, 83941000, 859775332, 485271727, 929183599, 393442380, 976105677, 287805815, 238271867, 74391877, 765979021, 335546599, 709265303, 808915958, 907593582, 463983041, 147572225, 888153362, 391439968, 221443415, 801779213, 245226914, 866175931, 810047153, 267980729, 805674759, 955321032, 906824500, 367243333, 486256638, 145115859, 530769671, 290945081, 932311137, 51068986, 807551107, 185085629, 261181005, 959829857, 118218336, 295880881, 506261294, 848742193, 936582961, 153400705, 578662225, 341741810, 161659811, 816049772, 839223846, 559301757, 400427189, 216771109, 207016492, 505237766, 795055758, 945605740, 555992642, 907845643, 982951177, 401043526, 597396374, 84431994, 362552441, 746539639, 303946121, 357484364, 893505269, 526515449, 560103044, 121894895, 445706213, 592793631, 713670463, 810676671, 143889731, 392244416, 73126772, 488568958, 542583029, 752584772, 7383345, 155007498, 994039957, 804821801, 379264833, 525210782, 239847467, 126254398, 219331239, 753237922, 434345445, 635807399, 872366121, 133933893, 590603804, 32230684, 70841222, 840236255, 909722819, 689521789, 529248821, 178846494, 980363222, 548654005, 434479841, 697553680, 35011089, 544881135, 260563063, 695816358, 44173506, 726085055, 671716390, 781464159, 450226987, 146813053, 877951734, 991641337, 221699230, 419417817, 794832550, 810418558, 969705412, 219055178, 274301546, 503413612, 695160244, 74090275, 26176299, 695070748, 341801549, 897892431, 470380437, 3467372, 448525308, 439337134, 724845391, 9187155, 585558376, 372261444, 277930003, 34819054, 431482585, 279947765, 492267585, 818516372, 484582901, 390623889, 856573701, 179325546, 611189228, 688765384, 847931848, 534263758, 557397045, 116495491, 85868985, 610969731, 478650084, 585159686, 14772190, 776211983, 474268574, 460744792, 134988124, 912707317, 105964987, 809266690, 785401545, 161419686, 653370610, 499797235, 534961655, 323936668, 802659551, 370287438, 326963010, 342959476, 313044094, 148582386, 976795271, 120954501, 724957759, 860215558, 270001726, 640931921, 833230238, 701256342, 242231076, 286286219, 13632467, 253663042, 129411109, 603714672, 564008356, 523901279, 216864213, 524434304, 182659511, 983267072, 644616701, 707181007, 618980658, 405751838, 571460922, 136629759, 744395053, 539608518, 963053644, 97893406, 866038338, 265757870, 944699732, 964525924, 892464175, 168006507, 562926324, 742708490, 132927348, 526909479, 79557205, 129052432, 157042523, 659309142, 834183171, 802572815, 517259737, 256356803, 353227137, 87135975, 224995979, 596580540, 402931204, 515099940, 793833445, 691900231, 589149123, 114327507, 887760880, 389703467, 830251700, 783657579, 433484966, 412892473, 432995349, 911076886, 112628181, 1, 32, 558, 6940, 68502, 567920, 4095058, 26291268, 152836946, 814626856, 19929138, 508014078, 3627542, 383619686, 178749032, 257695016, 714018516, 472708243, 782289684, 785010736, 673452130, 967313791, 416615851, 594708501, 823838568, 374885539, 520875465, 462873691, 866641568, 110422771, 371334024, 597629306, 954905318, 192386746, 711820060, 202869372, 886359460, 670157944, 884126969, 502946720, 582271977, 402610790, 343533084, 511648372, 517557636, 170605372, 597697292, 829559995, 983984749, 601678152, 265076525, 200313780, 586898347, 936910249, 473920775, 97417050, 844866738, 973357211, 106398807, 531568235, 220592830, 72245680, 709223174, 966562898, 364453034, 204299565, 516186616, 388239153, 70201813, 72763421, 794896998, 14537122, 759848271, 370782607, 723372604, 610938893, 161728308, 212501210, 376508968, 271352258, 323852567, 552136716, 801650724, 615740271, 208656790, 224034222, 747809272, 617340476, 153891047, 285642015, 901118362, 123777425, 16228193, 623027527, 937436377, 60747289, 714381298, 882770713, 15381170, 999192137, 197256049, 480638655, 953137460, 883599778, 148656904, 722191509, 39402136, 582147050, 757441169, 260428827, 253172482, 508174417, 834955862, 157349819, 261175551, 247577251, 264652493, 595186522, 812752039, 875384578, 747313263, 224431706, 462673707, 39074204, 237357876, 896371707, 361524710, 10299862, 761952483, 924315000, 304463541, 831385606, 228637562, 845205390, 599099308, 177524018, 209006125, 256908838, 355221513, 792061054, 713446694, 397486564, 756107839, 527866716, 337624854, 575430320, 456754471, 959728018, 921786900, 102983773, 936936381, 473475121, 131588049, 189268154, 863126769, 700571091, 871530822, 832046604, 609629520, 45186676, 853387560, 464311797, 368430192, 151536782, 691919878, 176735598, 972465597, 804610607, 50289062, 722819065, 20410813, 11987321, 648373171, 889715409, 778512390, 280809979, 767453391, 155472064, 275305459, 296611231, 377220752, 229158487, 259857310, 987705391, 873889855, 448418244, 657467052, 301028637, 400332864, 304525446, 853531448, 201469133, 757430782, 288842043, 292821474, 389580374, 148645279, 450672899, 404696472, 399758661, 549392647, 972607841, 459482261, 344863732, 405989209, 14412475, 913865943, 988039851, 302203080, 293916756, 28383491, 502818531, 791480646, 619991127, 151573496, 311251301, 362738947, 457688580, 884177111, 390413172, 889218635, 530910268, 818241216, 542232757, 765042883, 885001834, 10229128, 574524301, 836418812, 984923781, 235783687, 868003012, 379478756, 832878398, 751487743, 496700139, 587857943, 624473538, 510088706, 778144708, 214176553, 953029206, 646822434, 252787767, 281229254, 401166205, 434753895, 343430684, 941989547, 465870277, 861407908, 387687010, 216509894, 375279811, 453878600, 982073623, 677731113, 95924240, 198468867, 861679672, 204003039, 472066136, 228890861, 880462406, 133638984, 924365283, 274136081, 742318625, 898640542, 85174164, 775817726, 982947180, 716729952, 1, 33, 592, 7564, 76624, 651480, 4814916, 31671996, 188578368, 29248753, 200002145, 508415428, 442411092, 823607844, 339155380, 84465338, 814093820, 347929398, 722645092, 146033429, 312847170, 460125097, 915837300, 530134554, 683613860, 22911398, 950166343, 297700883, 874171812, 779302544, 705201416, 91735442, 764568060, 448540109, 794383951, 50664826, 501387621, 764478731, 392332791, 697065547, 136584719, 904822171, 811342153, 498086442, 66346910, 903864157, 648069920, 294527566, 68277872, 192952288, 465503414, 89641650, 342876181, 975687654, 849073744, 732768838, 299144725, 960087859, 432060633, 521050995, 669642411, 783220798, 964761936, 888496451, 578822675, 774117896, 595815330, 556187991, 328078421, 497539038, 461150544, 593197759, 454579240, 228665398, 675695769, 189021504, 506127036, 683711210, 767254008, 372876392, 950363733, 781425867, 518441353, 618578159, 210702480, 146366158, 211092828, 25645664, 252569415, 768287264, 315751220, 46304131, 875313001, 63062094, 41563387, 521548621, 882111752, 325592507, 674715724, 754661696, 386558110, 154963091, 238088464, 48050421, 639662963, 70331570, 315682289, 290604457, 553625701, 114470501, 286499320, 302628334, 934963054, 90280656, 946037777, 701374947, 21339121, 663053978, 944685826, 452543047, 117230904, 560747251, 199227363, 16627409, 318622953, 147892287, 924956445, 813803967, 785002825, 524657750, 94619872, 228326183, 399365341, 370689535, 675442405, 908504726, 873312142, 624281896, 910865167, 214431914, 356568789, 649815619, 48684312, 203060656, 723151845, 388405201, 798060040, 729614446, 977682164, 533436928, 146813819, 149571082, 895803037, 777214043, 552248021, 204656845, 982800841, 733286978, 63964308, 481147156, 389291330, 76639625, 311176854, 441157810, 671041225, 83215916, 462900391, 792922861, 933493638, 911064426, 640299582, 658369868, 816565473, 95242536, 385493380, 848295064, 737403618, 437312030, 117969370, 718173112, 995019578, 309321859, 756181744, 40101942, 426476878, 702396178, 795715493, 835764511, 743326504, 209546865, 430615231, 826070511, 334341237, 118979238, 371120144, 839568659, 676120384, 72519, 845333099, 357629799, 910834209, 593346831, 104377605, 380654497, 634970517, 115890735, 793059350, 887063630, 651636452, 507749972, 783577804, 143656503, 242083869, 911105370, 970085702, 524972130, 465698950, 325374351, 536364599, 196104291, 139239152, 633851401, 256158579, 919175466, 894613648, 315818683, 5141779, 876022828, 934709255, 681050535, 191918360, 662583345, 207316521, 848780031, 272975543, 702356884, 769886013, 961041057, 6500208, 70262300, 494310602, 739703998, 384177576, 343193798, 693062586, 969762392, 66952659, 685150241, 630304511, 413041585, 515441116, 191001103, 912006289, 473846745, 605301455, 795067847, 856671001, 508821454, 735406667, 258084054, 117733205, 780290039, 23367661, 593944851, 692132515, 4650353, 187487602, 151055135, 898863554, 673507355, 215091232, 603704193, 594167428, 682519378, 496434131, 965159536, 430378180, 248402836, 470772870, 307340881, 347656961, 749714755, 122062081, 558277910, 169666679, 941915597, 277380477, 270070849, 652088255, 549544085, 1, 34, 627, 8224, 85440, 744480, 5635892, 37957128, 231322416, 291965329, 678229698, 199102832, 733159273, 432255582, 825398987, 945721657, 530531857, 605903605, 198451639, 405128341, 881104650, 95712824, 87475937, 88052462, 854657880, 671362129, 345256719, 279913923, 405600244, 791623773, 184158289, 548244621, 559931899, 811302745, 822463013, 829884052, 612803610, 114370483, 717655175, 250670751, 158660853, 996989593, 922821653, 403693850, 640224917, 726696528, 558324649, 504260316, 457498775, 235424755, 214797729, 595578763, 703649058, 668639597, 273743575, 830864733, 8621856, 152359528, 351252345, 54682531, 631863641, 533130514, 548187372, 212107229, 690348600, 269650465, 644636821, 588449397, 716956418, 569059993, 571818753, 620732748, 238441683, 628780105, 73251606, 77232245, 265685085, 860541096, 181038883, 995121568, 787161997, 984175916, 994855981, 70309595, 279951259, 412871815, 881913054, 268261177, 575207129, 196951994, 610045829, 705950877, 200402175, 179100085, 912730914, 795237101, 264189519, 756871237, 840795855, 477498958, 568161700, 101820158, 478938140, 546807900, 824972458, 320572966, 375535061, 712736750, 146215080, 296045377, 892271196, 198915619, 973312163, 292266224, 766955048, 774760742, 724672108, 189810671, 590576941, 955913056, 705860403, 956268133, 120026477, 977289531, 897970234, 594373646, 802624855, 16139526, 294245189, 661099173, 505327457, 687552139, 570417673, 288750674, 928298666, 124243321, 103493234, 782666425, 810561902, 479140046, 567654010, 66398299, 87173858, 171094018, 401077961, 201022453, 649177770, 751032860, 458665510, 583069945, 3741921, 644139368, 777863779, 427938859, 574083500, 968708036, 5259009, 14753514, 566158894, 428971413, 29779639, 601893398, 934948155, 463945886, 442386091, 787098075, 294593703, 467511028, 998601384, 749411810, 495421040, 283658473, 287441865, 687819162, 964614928, 353638623, 648210867, 238886215, 893364457, 158958124, 29345292, 800368429, 595552294, 572640574, 913495958, 705720935, 850127566, 83220185, 799386246, 848828465, 335228800, 498492912, 819731260, 972790229, 191002130, 289923062, 997108332, 479589354, 13686350, 377632380, 915241611, 38445376, 115515812, 312111610, 862313776, 36444206, 491509332, 899038496, 494299749, 577210085, 925017398, 377889538, 129014425, 544007299, 134491550, 77644047, 150186363, 549177782, 243194000, 889811949, 476414356, 302027816, 934223010, 116351600, 936035078, 728736728, 99057293, 233685532, 715949090, 484999785, 527817757, 40017975, 403976200, 963752121, 230480821, 165554215, 501580240, 480519751, 374582722, 588438105, 13652788, 835399525, 909982574, 63720437, 165170490, 768431894, 385829327, 268804006, 950180874, 398363435, 512876602, 149304949, 858796870, 305796565, 80654592, 209088881, 365995652, 741417209, 580938286, 849913699, 209592153, 430983500, 292682916, 89781822, 346251985, 899920810, 490814818, 319818650, 865676138, 199552930, 49606030, 396988194, 289382805, 394082926, 680976370, 125444750, 312554820, 11884810, 730982055, 36906819, 144996838, 532313029, 339360681, 509568859, 763509787, 79118993, 930179491, 756170211, 627420026, 161269793, 542072728, 498021200, 392693531, 523036960, 919765468, 367278574, 755839168, 466305341, 613534367, 534169086, 166110829, 107021592, 280650539, 268761091, 590645300, 269909358, 234042842, 1, 35, 663, 8921, 94988, 847688, 6568888, 45268120, 282195928, 611807809, 518705216, 990050297, 271051698, 122408000, 405189613, 94926808, 864141322, 53735275, 24011733, 736554738, 929218491, 904644261, 780020466, 504939462, 734736582, 905177688, 612557341, 964587741, 714487014, 841745335, 939266470, 221175663, 553510265, 427922711, 816845808, 551876447, 104782423, 432788437, 75343637, 98990584, 780296494, 401590023, 184896774, 39759619, 46187357, 134251301, 342702573, 517720, 358976055, 583636644, 962541900, 167548822, 161325057, 550357824, 277594189, 165080443, 231182951, 735855208, 908711807, 571176463, 42569340, 237272417, 790920442, 624258522, 720842250, 768667158, 451444080, 122083868, 366641147, 308868590, 806102171, 616667978, 212552319, 508058403, 321794596, 570313528, 460066496, 737582233, 710064955, 691296552, 63281621, 675218599, 955697061, 110510427, 512018248, 153536802, 745040214, 175960352, 594730127, 864516601, 686994354, 671193730, 758082482, 651219990, 268055455, 209604272, 794711886, 922988292, 233697499, 855180879, 757331520, 952855529, 712373324, 501054908, 610479660, 988305583, 359797155, 981016202, 392046260, 222705767, 339379031, 255395660, 760704862, 824907580, 377018926, 100950434, 568292199, 345612839, 702169410, 76425882, 316244660, 633878521, 345805531, 43908232, 498746978, 171201976, 618174067, 828038701, 451921110, 452033897, 911744318, 64098066, 83924105, 595571257, 147937863, 948006101, 514496555, 77289879, 282007238, 421799065, 804334778, 765393189, 193008022, 263503242, 355816072, 278012511, 227861525, 902054870, 618486736, 979710805, 971590402, 61042704, 664850817, 113175896, 488535341, 617582794, 612947413, 45804546, 259073867, 263038734, 265569066, 162645795, 60875191, 359494871, 979749311, 139358127, 29529290, 309151363, 279422923, 345089768, 87598058, 700337527, 479652910, 994907927, 933976635, 324751070, 167729179, 810904540, 230096199, 33195878, 559883815, 674302503, 158162721, 997344757, 974400760, 476723636, 933671908, 372458552, 487353300, 603836216, 903251923, 461631785, 620155186, 664707969, 139328434, 135802315, 547850780, 544085832, 243757336, 714792500, 277247444, 736724545, 7257213, 104433298, 33077964, 133546300, 658470668, 407613385, 15549086, 409602732, 220607605, 154437658, 434924060, 212726357, 432662346, 953726155, 55947205, 221865215, 896738564, 702917595, 219549259, 784888336, 998968443, 737927890, 111474776, 479544893, 204531672, 722344756, 339644359, 296335713, 172390948, 145219000, 740849986, 175518952, 876047366, 775536223, 909308844, 333180421, 96764559, 528034987, 396799645, 413114766, 622993858, 563074288, 710510893, 900874806, 315196225, 993816000, 623166550, 642968249, 328645521, 844280596, 556521945, 272458659, 580772239, 284457451, 186994948, 909094031, 935768265, 319893231, 114481887, 109302906, 586737223, 466388545, 717893242, 342269015, 164207650, 394855609, 330099455, 836592042, 939058426, 541984626, 852636994, 524042858, 358495217, 921118657, 464191254, 284341637, 363378706, 679058686, 917272314, 562488937, 105215359, 614330571, 404183151, 365378837, 280141835, 594380252, 79371576, 739360814, 210010442, 10232401, 449147207, 97531383, 696215921, 900156881, 51327507, 224992261, 946786023, 685932368, 729503576, 741723150, 479111191, 872812474, 454570174, 217639787, 553029674, 745481673, 194164134, 241094015, 672191097, 520725696, 177728245, 485102929, 511421076, 349030122, 157631252, 431267952, 813510823, 604978728, 799539100, 871169236, 265066919, 191499414, 52282294, 1, 36, 700, 9656, 105307, 961912, 7625652, 53738944, 342470612, 999200441, 797070294, 375863958, 9523173, 166271514, 481765400, 879554808, 535680694, 467340394, 413500052, 692064693, 580959888, 369347871, 169821810, 621921924, 137911737, 940784828, 741570244, 905517670, 551817302, 657369119, 721648393, 536831850, 500879720, 726253305, 296162041, 891225164, 880747817, 182180719, 544050763, 654393489, 357200480, 356889637, 635049309, 374948412, 486169649, 407475615, 51228607, 535369936, 325305756, 74215114, 944988254, 919680639, 647644667, 526651696, 763479161, 278201627, 103508412, 387580497, 561661113, 38190290, 310583115, 569811056, 351262691, 985051203, 403138813, 643132429, 289980808, 570569544, 550559442, 934893929, 352045239, 810200946, 61218795, 42358563, 89293505, 506603831, 400595820, 117891860, 469015294, 166372283, 320554017, 155147268, 955469333, 896730515, 826039051, 931193995, 36098122, 893366407, 522834450, 917130400, 759016216, 23584371, 48884561, 844352920, 604253909, 886656394, 548946691, 688504947, 972899398, 721435398, 409845929, 399680456, 284950632, 796741351, 217452678, 611033399, 592790059, 219084711, 504058472, 277505825, 120276345, 694287126, 35416589, 305976723, 447309020, 969824889, 565684997, 62139306, 857693940, 901163636, 262850397, 927594387, 721909425, 958991660, 471789360, 260033992, 544270783, 877013007, 153311613, 85679796, 660447085, 213261352, 954007371, 8266647, 75417194, 28241545, 733410215, 579803150, 41901427, 876245480, 900022334, 813145019, 668096269, 73987267, 175135030, 724217744, 139403302, 77167168, 775504145, 397863476, 816272710, 221129133, 242347768, 885383757, 728565085, 947647994, 605379205, 598139075, 269419404, 178994132, 603450690, 652850980, 19254430, 182635911, 57268581, 239936865, 878358438, 515315850, 141611162, 665647032, 700517198, 807335907, 965806030, 897617342, 773532343, 924389029, 419741954, 420757062, 581633294, 179995348, 34733596, 923518220, 731757774, 573741822, 531242380, 813544540, 336821038, 442738016, 551572674, 470067223, 638102335, 989538200, 956007535, 613954394, 401563904, 103519975, 569290006, 144046622, 689996849, 638589501, 358099514, 725282594, 691632053, 702244532, 284031792, 473014945, 465414316, 116886234, 142777936, 342518645, 138051544, 347505254, 57716395, 939744642, 114873890, 359397343, 671360195, 724489266, 683013222, 345781236, 550104449, 877003874, 63443231, 224660360, 658626409, 133687251, 933261032, 273131705, 48202694, 144323990, 559827621, 779609382, 930553156, 35267489, 493151974, 645090534, 517431516, 368634145, 540405134, 215255527, 144656993, 549192120, 659960465, 217236722, 742258783, 538378955, 211409043, 760044403, 389330065, 692548510, 583181570, 627949137, 829194932, 234693932, 651493437, 707321269, 828284674, 652751037, 873736576, 267300299, 729754896, 429920674, 875733754, 60888792, 225478637, 39002446, 407176220, 761384762, 131879783, 661443680, 51638267, 568172852, 186052558, 637968267, 556455031, 313451921, 238551452, 644714578, 449541818, 640800540, 923965193, 38909678, 41940756, 338485997, 888949941, 526610135, 48150535, 778944981, 480892059, 874500608, 900322190, 973783674, 468787609, 618167632, 913754856, 327797543, 845404908, 752246622, 831422464, 484541178, 501948673, 647306990, 882577308, 771072569, 171273117, 620085552, 385025714, 126556571, 472404266, 664907284, 284895728, 860747643, 285481155, 480968189, 426457284, 579997870, 253315436, 264967992, 325506073, 407074927, 289125366, 710111895, 168902913, 39893459, 264014099, 335462311, 284068808, 624620216, 265346008, 330183605, 301153063, 136165951, 223572391, 416076696, 791322793, 440956632, 812128221, 56870528, 529001955, 157225171, 153110824, 659760559, 934444871, 1, 37, 738, 10430, 116437, 1088001, 8818820, 63517016, 413577336, 466132154, 602224077, 950429493, 571044537, 948550192, 759622519, 360792951, 40404471, 549575252, 331339348, 353289303, 642561133, 959520386, 811439523, 113998222, 306747368, 686402540, 608623079, 625536502, 102898449, 513583096, 310389938, 861964034, 144673299, 459932354, 368865341, 656127608, 909171212, 807159815, 446679967, 582385365, 827063804, 980667706, 264330272, 600794253, 740948802, 906942889, 945728377, 18846332, 985664112, 7701519, 115050801, 870345183, 606442987, 443069595, 817056595, 621418778, 690512206, 255049968, 161633922, 402904753, 372549674, 317848199, 779510849, 454579621, 366999138, 955388684, 940196190, 710141532, 289889641, 400266971, 473006189, 518001144, 203532149, 277752196, 73653399, 957077834, 580796815, 797359407, 33679102, 974181950, 229170666, 221016673, 753153481, 718492334, 480056326, 134801483, 829292600, 87160542, 624566954, 157188714, 912350324, 248797376, 864861712, 311625650, 564724833, 638897879, 211767349, 670618766, 182357348, 406247054, 335828971, 235855014, 766599169, 873180801, 943988159, 797515463, 949064434, 37355164, 366387587, 992037332, 39085136, 457008562, 710738441, 147115812, 245127944, 221285308, 44913339, 750687382, 166494925, 487773254, 2533400, 294773545, 964749926, 838352064, 354747747, 983055334, 906311260, 773970452, 136280712, 732037766, 304757958, 868694356, 9717274, 686595153, 845171773, 715645486, 457517675, 868876321, 257821804, 398717354, 952878758, 459394839, 735151005, 982831573, 597714383, 483469574, 396276440, 147004054, 275175512, 449695021, 280047682, 322443740, 657859781, 236891682, 338855034, 771308208, 208042945, 611383416, 470020781, 959351211, 871193372, 314812327, 417008584, 157794928, 30304137, 772193806, 92880268, 735754383, 725090032, 678769251, 695572650, 713627047, 220917673, 996272940, 711499227, 615337951, 732510553, 265860373, 10346269, 946167168, 327969286, 691646116, 588894836, 556718107, 891256057, 29035235, 193826291, 413628097, 951441661, 812044940, 432676044, 866499015, 139084375, 351784477, 900166473, 781089061, 914118385, 818686834, 857340116, 329139077, 237478891, 284468211, 215304591, 458481845, 227432873, 865995208, 554027168, 463893384, 221077016, 374577314, 119759917, 360383422, 704486222, 404678036, 137104816, 809074680, 755219457, 826569646, 867839827, 768754773, 89100960, 257194726, 724398193, 973188469, 858913715, 18463743, 680309520, 450458743, 140048366, 764912130, 371007014, 456635116, 735728421, 778688084, 152973997, 434969799, 574794869, 212648988, 728361716, 542931287, 302379989, 751579729, 92390154, 220181191, 407743441, 315151252, 520426045, 407908622, 679231575, 395003916, 794034847, 347654216, 68808817, 829211530, 81601558, 162714123, 30761100, 394951130, 268715057, 283612447, 241955302, 623210420, 275963878, 159211117, 252162685, 595441437, 529655660, 437222092, 841111836, 179960886, 135660761, 917237477, 768051317, 444580903, 506791801, 487181239, 875489229, 680194597, 205928376, 680445786, 683783933, 969592088, 132367844, 396994570, 832926454, 630581401, 505495558, 385734337, 641541057, 95095471, 989574773, 911275608, 518514268, 282262989, 419271827, 469001628, 420271862, 947083037, 407529572, 59976989, 434008630, 863717239, 945875935, 75676474, 215313835, 250745830, 87811894, 264747800, 37018493, 98597371, 710706515, 142785594, 391940962, 336466122, 341268838, 21508490, 413865364, 232101532, 92701632, 8053527, 412757119, 757312194, 403681966, 949009531, 880975038, 37050684, 272465075, 678404684, 193438246, 672480427, 700064004, 142628578, 802581416, 279140871, 973655892, 800905741, 598005728, 935768930, 668573394, 207197197, 649003003, 270174246, 76144766, 315632510, 875459369, 359185050, 528086919, 473525359, 758981160, 249109513, 189948776, 344668617, 795917722, 549344159, 348920520, 486734532, 302843834, 285724416, 810790165, 350603652, 574459989, 873908008, 1, 38, 777, 11244, 128419, 1226846, 10161959, 74764168, 497121432, 26344483, 38234873, 423642505, 376339808, 863392989, 917340710, 353019266, 355701734, 828153534, 204362640, 374924405, 607928554, 963790885, 940721850, 687219775, 764705852, 876861874, 763291630, 981930457, 551085656, 980270580, 505906881, 983294521, 135354674, 135665519, 630173290, 212355830, 143623144, 227056594, 817242891, 163435465, 418550307, 731605596, 289566443, 285968813, 433396374, 290335437, 260134359, 257166798, 296375223, 99595679, 459082068, 507135523, 972388714, 133158519, 975205558, 982374421, 644050428, 996778111, 162109063, 746906113, 514292299, 926426755, 356009260, 196659267, 409916170, 325494529, 655002543, 558511285, 36446396, 471095084, 174722764, 671116976, 160891233, 868903396, 304037581, 23612943, 337881011, 234387037, 370561646, 356075504, 698718914, 535181667, 514726084, 815242029, 608023573, 448544035, 835833664, 991058290, 399256230, 20531824, 669361826, 539724566, 760387110, 830813942, 547045707, 178050500, 929198630, 6813905, 110412371, 858816899, 809729618, 833864785, 232951975, 485491061, 613385270, 553071180, 627954610, 952757220, 692906182, 748961577, 662247263, 52513186, 149763764, 145530822, 33882391, 453364543, 997405166, 992558694, 759602854, 84367345, 100239977, 854081961, 858205595, 486024240, 91555639, 177882871, 949083392, 519037398, 556513157, 228484413, 492836072, 589348909, 196163508, 266626335, 11245627, 157404436, 270481031, 638406640, 490889097, 527976504, 370488458, 823400678, 322868722, 206357234, 647142926, 768625346, 265191551, 148038615, 363341916, 267722164, 893118504, 738977503, 565582757, 762106365, 849369394, 766495732, 13155357, 515888816, 523640060, 647203814, 437352666, 546684558, 961386555, 7614498, 893885274, 936701598, 428062192, 113231261, 402917050, 409965843, 165984892, 799921270, 659405770, 509144023, 774701607, 842603658, 487390464, 251731862, 581859608, 922860080, 258383681, 201597752, 292594441, 460903867, 638298912, 848020590, 765105850, 965506327, 844776867, 575276415, 85481014, 653985938, 197424999, 197600210, 989591463, 112466859, 918937916, 878289962, 30252094, 561367106, 701604983, 794157139, 205106586, 358551581, 218730442, 820317821, 718077344, 742273426, 343977802, 723940137, 91227055, 889419899, 835334285, 445942872, 874169472, 806494972, 841559090, 34902341, 936247116, 742348345, 932764662, 776531786, 136341990, 609226011, 962126351, 692609037, 492230872, 512261831, 61424189, 202712100, 557188069, 23267751, 10862209, 780311892, 698216821, 610626474, 445698906, 548927052, 791636623, 278469086, 802570473, 843652647, 214889050, 950325814, 545811188, 732525066, 799299048, 547938769, 119233118, 836166054, 515368215, 821018309, 703809789, 385697728, 474302192, 326687407, 701322950, 753939342, 860741461, 608860184, 481069405, 497217661, 107822505, 538149776, 65872865, 267685484, 630211463, 833714775, 127007356, 988488267, 704390393, 326686679, 330510067, 968474337, 860095258, 865223840, 3530159, 602833824, 943838253, 510792598, 862215682, 804647558, 57277705, 379631476, 611335785, 827032941, 500396827, 166974973, 950996383, 97277257, 336237474, 527425945, 836169765, 13569792, 45600126, 103702022, 589110361, 158793934, 917834123, 750227633, 450511448, 228174293, 380815071, 984828008, 35225572, 19924799, 316530723, 169463852, 11894443, 83625994, 27918722, 725825514, 510537357, 901592447, 560692763, 386943274, 409576331, 409681305, 19743037, 901841314, 504205848, 287987501, 95070522, 999713439, 52172335, 458657276, 716446234, 960325619, 967217606, 29400294, 323715881, 571473809, 542099425, 838958945, 826022366, 215456133, 111542899, 27057122, 264098733, 414451664, 367598279, 660361161, 317432327, 788309656, 482969647, 453723335, 307123116, 46250346, 156036134, 550671015, 501877998, 918162544, 672414507, 744250791, 519150731, 449335541, 717241257, 798831268, 772517138, 286300330, 910111510, 66350225, 850058429, 996528049, 454249733, 463645138, 33673728, 195487971, 700828817, 25012182, 447505308, 968790402, 312778627, 684898658, 698549052, 965513947, 825161447, 410399245, 428579579, 669192144, 82412074, 1, 39, 817, 12099, 141295, 1379381, 11669611, 87657665, 594899060, 695536795, 226472285, 640458905, 794561570, 378189352, 472728269, 218438573, 56516519, 255055733, 845027144, 588332091, 652544873, 575593478, 251899261, 421780632, 446749115, 397384403, 967249876, 562965804, 307548860, 910064219, 267557957, 532097834, 694036707, 378870548, 124206593, 109699395, 5415029, 722948552, 875697847, 694452268, 7553293, 132421363, 106964105, 391245927, 870340375, 243365738, 69805673, 199865008, 75486973, 171179760, 109991897, 220793643, 513746719, 106419838, 540171765, 580499245, 759007158, 982900537, 645687882, 590392656, 601803737, 221575615, 697448067, 153409333, 368742411, 593478736, 779784392, 983542304, 533669091, 167997680, 729893362, 841704349, 760614624, 47743042, 998724205, 972938209, 77600320, 536850090, 695359058, 769331095, 966134679, 528777379, 695035445, 387545073, 911151592, 242062595, 521446824, 889535341, 920252167, 112865832, 806555197, 118151259, 625842139, 701618487, 790273468, 694977537, 572862214, 473466414, 246109368, 48621359, 353657541, 554932622, 499105369, 867797665, 487345603, 842033962, 519557065, 245850790, 335288378, 782811146, 892240358, 338051309, 826545456, 41171254, 334148733, 152569170, 144665017, 941279118, 897754414, 89241104, 416864510, 41530804, 299074740, 73588196, 959211062, 109470038, 500259918, 366443802, 403320596, 183957534, 992196343, 652194487, 652679636, 980112362, 896443763, 694053263, 85474084, 793481845, 36502549, 113761902, 13660255, 295744749, 768030597, 559676644, 267907464, 329732897, 34721556, 481917917, 470669881, 496023609, 35319413, 426881953, 436183525, 539581676, 797395436, 949513087, 636400441, 684066319, 283217124, 456809507, 742722246, 708837224, 1825110, 845476655, 721485134, 509524702, 571748192, 313097600, 164720049, 83489702, 463694600, 122519767, 438333196, 350973050, 742760174, 292313656, 699166885, 733491013, 480543050, 245749577, 741817620, 207993307, 244579067, 622422144, 604751887, 899189402, 151409381, 217727618, 880477312, 214663719, 394263729, 196688383, 548030201, 726215545, 464673145, 261250632, 625458514, 838784252, 982491280, 700533618, 585918514, 160625577, 639912412, 329107337, 639996475, 820595096, 822718095, 278815123, 496262265, 918547360, 8027724, 726754416, 823448457, 260321413, 863184482, 650858805, 276099402, 685460415, 954079520, 733965175, 676833996, 368637623, 143549481, 304621819, 472579474, 749596748, 116386311, 410243381, 633945382, 411647917, 177570608, 616578162, 767744928, 61290651, 523112125, 276619822, 15151789, 253528389, 167816966, 891846580, 541892511, 341041750, 391023167, 293092921, 243156326, 622723871, 473135257, 726189187, 379573236, 555335821, 257038714, 482079083, 723871307, 606515981, 65251208, 632383753, 147352575, 594192641, 924833549, 483314326, 808069004, 770319259, 427864560, 25642674, 464671587, 569308215, 637300329, 923466624, 23057035, 86870702, 983746124, 846059215, 574808201, 554549209, 446310553, 959681948, 778636627, 211592095, 516682914, 291911580, 587928798, 427680003, 894209596, 866648165, 679666232, 460484096, 854394115, 982195268, 822495481, 835383529, 431162040, 830468499, 195346596, 57036658, 866149457, 860543178, 818146210, 279107618, 892401239, 225036974, 868558986, 685134666, 744469605, 156127522, 187537334, 788919638, 909025900, 672187019, 217419201, 384265406, 616374282, 378322214, 141913342, 501653295, 461070473, 25985020, 589549638, 109433868, 888240019, 931367280, 762349235, 234613827, 765084315, 611038359, 758764450, 286873014, 382512476, 382119459, 20294058, 943700532, 211933192, 58390954, 180966724, 929698288, 805610393, 509211182, 866583662, 775212548, 88368846, 726939816, 185342247, 229877142, 705155204, 200856219, 36832958, 610458570, 660966337, 749737121, 592806565, 894272325, 480779946, 649154472, 88597955, 74084666, 744113332, 528684751, 282107891, 100372245, 756922141, 58776739, 981772435, 924634098, 951039927, 397719622, 577729727, 762973087, 736969640, 674672356, 297937804, 986319572, 149411109, 496025335, 118765897, 173573997, 13186371, 696131467, 139811703, 497652080, 238358226, 252091863, 126575962, 416549513, 112043953, 769546766, 210139961, 218718185, 975953506, 930028805, 845629302, 57030776, 852433935, 836915594, 400219298, 622051773, 829969111, 114603161, 10751254, 909008878, 579282117, 214070865, 563200757, 1, 40, 858, 12996, 155108, 1546584, 13357338, 102391268, 708914679, 491589996, 307979410, 602522471, 317222127, 290284759, 54099411, 989042041, 349750818, 106531062, 706143382, 63807262, 819412921, 144007031, 937903432, 671633208, 144280187, 535961584, 391683158, 665684992, 173615217, 173957993, 353557533, 689224661, 70346145, 249590014, 418977958, 826283746, 394602103, 916349862, 513826761, 491750575, 183159109, 757685121, 418341803, 274891227, 642914114, 790796259, 588464975, 740365449, 551222753, 10565934, 35820801, 515689568, 211177017, 828019707, 68961130, 155306993, 295844962, 698696703, 264483577, 967049520, 615265667, 559761896, 719262960, 509462378, 575657367, 591920899, 676732702, 723371825, 327050158, 311506131, 94078284, 608080285, 992236405, 137506625, 399044419, 458634324, 553334522, 801149022, 685520978, 446537546, 993927587, 293142441, 349812890, 364132070, 129851348, 857298051, 877404263, 877505804, 63808796, 43779853, 597054006, 757518688, 847719064, 814336009, 295491019, 566317327, 427355879, 99632937, 271930495, 211594531, 907085661, 370381473, 40651392, 893659649, 363630034, 486697292, 957988008, 762036357, 927839193, 855832860, 336383816, 307639758, 266751066, 682795763, 757933830, 702637096, 416587519, 241670221, 803239702, 991067388, 753770489, 69318095, 379601638, 829408102, 918333643, 833524181, 647446668, 999853061, 600717076, 736359930, 166694847, 912637361, 883248816, 334184966, 360770954, 907814459, 571070899, 760625736, 543003305, 12232839, 27415041, 235755079, 155935992, 895456358, 299525687, 387663753, 430722193, 845849975, 389897647, 157165043, 232374231, 709459451, 819494807, 873294798, 982307907, 723241456, 529916420, 190269000, 832006535, 157577121, 119818595, 751958343, 818604698, 923214476, 455357809, 664208514, 204222119, 358021985, 507909159, 532713722, 447934290, 550255949, 9030523, 204809569, 704696131, 798537153, 779574805, 146334295, 422444856, 763243391, 968318292, 409596303, 730176788, 661449533, 145680243, 291092743, 406566554, 840725280, 859336604, 385485264, 540592314, 491573347, 430591599, 799102625, 349645352, 953856191, 685505744, 968883032, 548153198, 991972402, 298640488, 335784052, 560792641, 200482497, 534424478, 835919822, 256133832, 789502694, 815463653, 367192054, 711296060, 505894941, 749371649, 586599852, 478956964, 771301542, 936596369, 641013477, 895880622, 275251735, 709512313, 675062513, 900057226, 864601515, 604121575, 213439255, 718556713, 352300658, 293209273, 62461535, 212741657, 925233457, 601757735, 357273411, 900952265, 337965737, 654516053, 138964736, 683012438, 388413281, 151113816, 328964247, 191920444, 84786019, 179152386, 346561188, 643354711, 718267295, 169193229, 252223726, 887596939, 657097686, 142103925, 40078284, 150004901, 459569297, 459199105, 789641065, 6481222, 858687076, 375816137, 147145108, 520309635, 748217920, 667457550, 716254093, 186260954, 725808394, 626037945, 743543562, 764478177, 601933842, 797462265, 777370200, 654651513, 156072819, 707272486, 178868661, 27986290, 925976600, 457000898, 540704905, 843382395, 769084631, 760118502, 476552208, 749317409, 710185045, 964800796, 516878606, 266237510, 913933501, 813693982, 336046538, 762072594, 997287607, 756174558, 615699332, 325935068, 478725181, 294206110, 71125626, 862744505, 369229533, 687983312, 908265361, 496504119, 960935105, 69879109, 315010091, 778995602, 757128123, 249975621, 699329744, 984761141, 255696873, 966070938, 214893935, 551564463, 316442626, 532269369, 314110968, 128028415, 969165598, 561496103, 817486578, 282697706, 480617072, 509205119, 834540584, 277705122, 660874354, 778117470, 366056531, 831243822, 903068403, 672944646, 441340373, 340680954, 617276976, 849516577, 560088434, 230800586, 10428026, 372559113, 922230949, 889642650, 244184042, 533938488, 841639506, 817920213, 336934324, 44823033, 565545678, 701086145, 241957483, 114182239, 850726147, 526783422, 115816117, 835376982, 659266467, 815849396, 168028335, 255187925, 748491938, 622185783, 663040863, 743392515, 163408177, 383060357, 31556416, 794030948, 934245344, 258437764, 379321408, 40236316, 660469577, 655665845, 690942361, 375378322, 568352979, 602028119, 317437606, 657543398, 100015852, 252684947, 481051042, 964341166, 522946308, 280791483, 467949044, 475945690, 972019230, 462068105, 580258224, 819125286, 65219413, 675919204, 938373431, 246074242, 416112669, 990084376, 992206586, 174382581, 694468435, 670357482, 52707698, 430228891, 194064984, 374269653, 873105421, 89789806, 360326019, 422866288, 247972613, 990139142, 766813630, 25619403, 929658745, 91230876, 1, 41, 900, 13936, 169902, 1729478, 15241768, 119176344, 841399673, 434809990, 446105964, 492649140, 758977149, 206041682, 323715565, 660084286, 595902939, 912996958, 734408694, 639760787, 253066665, 208103163, 518638879, 141246298, 316067064, 932295902, 638352197, 835906694, 518593201, 772224592, 710767801, 155069328, 87760296, 888628863, 85616127, 159719113, 852745152, 116208329, 603162784, 598162586, 214665773, 928212607, 364268988, 422947444, 91651894, 294508512, 306449339, 29129368, 721764444, 23720919, 155935808, 134434641, 906918132, 581645037, 673925534, 656820458, 712140580, 940311261, 639783029, 193680127, 625191701, 485391283, 454129733, 912047676, 531795443, 151893083, 16212124, 506754047, 491882623, 143293012, 25311790, 265858487, 730580376, 281408346, 313354998, 904477185, 246774679, 76212745, 790588368, 952519623, 156839403, 194467618, 872887052, 91963369, 534129628, 238356180, 632320800, 58443419, 722943306, 618550091, 33518175, 519583410, 960079192, 538023159, 305123951, 486152058, 294482726, 518323725, 455607677, 182021187, 748135143, 512410493, 35362801, 719659644, 317014598, 528329960, 583008290, 443175574, 659178079, 174647583, 349497845, 577399146, 818913619, 271472027, 656817275, 494680790, 969710982, 229444476, 267631925, 175671131, 35511369, 58752774, 135202754, 944159958, 464206230, 475819996, 314325811, 754861491, 276808552, 810159244, 91192489, 626570800, 590621471, 514780234, 305537247, 801654104, 149383516, 787215362, 114530579, 859617326, 613074050, 468568467, 919259772, 617744284, 340905322, 985953212, 372028816, 217079653, 938494776, 284906842, 769978385, 515786223, 285120775, 375534381, 675385916, 665832700, 133450834, 3874364, 408375526, 770616302, 276273159, 413928636, 723794836, 198571707, 678091222, 296508406, 529916658, 588863591, 413257244, 498474249, 915935032, 120501359, 836927142, 230121084, 774509032, 870826787, 489996192, 917057075, 196187219, 383821852, 922336284, 22274995, 748507616, 607632780, 183109949, 339998525, 507933598, 698781318, 498085612, 803731847, 473820207, 901546035, 302928184, 865394080, 114078163, 2199878, 779942965, 594445523, 91527221, 272107811, 718335802, 365412741, 52329171, 414520032, 494974650, 300177708, 811610962, 146810674, 337728819, 506402762, 403329973, 694340600, 766854981, 757139989, 188368338, 788752320, 918847437, 928046733, 527551285, 479184799, 517252899, 712149490, 791491255, 238449676, 667119615, 757940899, 445679476, 734062646, 326185889, 40504124, 623294475, 807102585, 697275776, 960233124, 90479243, 277423126, 459856976, 523164613, 283246190, 353589088, 214300387, 783487356, 692462518, 267488040, 851918218, 799153667, 810257248, 109085516, 633189413, 670646041, 913414538, 526057886, 701571781, 823895555, 366072317, 141394361, 832809290, 464577360, 305577012, 512815120, 121404516, 195457318, 321946163, 309097012, 239601477, 94799504, 314416433, 43085740, 639634392, 892727867, 559091131, 668748148, 422889784, 711508368, 676630033, 634668710, 364293294, 844937242, 751071408, 322260215, 891789141, 187899827, 511558264, 521391391, 670781806, 509672700, 51147255, 62331255, 681097643, 668432081, 698715101, 46454740, 726474418, 934462337, 72103891, 408373632, 957100449, 670661469, 786800623, 834620545, 287400489, 490496888, 497846381, 189806313, 912940390, 809020495, 703284720, 835793884, 605744360, 923348658, 214377202, 697918809, 343995053, 445012242, 544883273, 475774494, 73159748, 664916820, 945806189, 388033609, 184443581, 891139166, 132967061, 662232592, 630310273, 296941879, 926467100, 732662520, 755030683, 373067237, 200501225, 132039597, 621016442, 864116597, 199168443, 229224627, 19895297, 392227721, 512572983, 888183257, 954225811, 362992884, 408318299, 664465052, 828120392, 703374891, 61248349, 16358204, 241119413, 30565637, 838212406, 921697699, 543334430, 89858526, 273185879, 355471309, 304528048, 507574008, 476038937, 789196651, 57644735, 932966132, 292240565, 284284800, 198355642, 844613937, 375170024, 881957600, 108981244, 644631978, 730251746, 563646094, 15703371, 891969119, 462467018, 842418885, 184776107, 20489508, 525173823, 93913531, 199936707, 49296883, 500271791, 9386940, 42793104, 102301079, 299925062, 242848544, 157270543, 567750735, 512260765, 540910896, 473863432, 123756576, 867793612, 940752336, 189701376, 338838501, 163690216, 120916067, 790468763, 680974009, 939542025, 299064055, 752326705, 668302564, 775312490, 929999123, 713601128, 593704708, 595301628, 539445680, 220384571, 492539730, 572951883, 264745653, 946510661, 751486844, 372815432, 445849920, 481560920, 887629330, 46438187, 433046906, 550746520, 68280122, 549536967, 98170304, 942092421, 657076175, 85959544, 736296914, 244774210, 196059783, 968298850, 183375217, 810099519, 413635020, 636120983, 396309504, 740465895, 371532101, 1, 42, 943, 14920, 185722, 1929132, 17340642, 138243024, 994832181, 548192008, 829424358, 702470585, 488681655, 275370643, 835638795, 810867407, 286977068, 950047225, 83539435, 44629372, 288790619, 507410843, 264046736, 483012816, 672138691, 875194556, 651203850, 66911617, 918075656, 674825734, 94581776, 415282344, 303997379, 819537616, 622429217, 698967413, 751254549, 420414807, 687830513, 601402264, 434289505, 724948167, 754889253, 808542135, 995391960, 178813332, 724416372, 177739106, 814105099, 753597104, 45856871, 272275296, 786414287, 511285559, 160720229, 317562390, 790336119, 868224061, 359611251, 78736463, 773457035, 927802445, 421722380, 116775238, 364696053, 502866895, 626441652, 490807991, 713262576, 797949369, 598695934, 260170588, 82830001, 494545919, 272206045, 443643728, 598266021, 33015507, 884148700, 307476402, 959867411, 216334812, 800291904, 985570368, 488188448, 107147695, 538136243, 662412600, 979298525, 134498654, 226734918, 727004323, 749341953, 119616289, 344235011, 179701806, 771727176, 867138213, 462181714, 886155872, 120844409, 637609736, 732957723, 950929297, 917858187, 787591285, 658307576, 752393246, 363474545, 410621001, 994736846, 177814531, 780475306, 862888709, 592093607, 579502147, 557845688, 288775481, 603183203, 577960148, 788283409, 673824051, 683888139, 877184660, 633236685, 114600324, 443874806, 243845462, 737247494, 816215602, 301818289, 678209727, 613605938, 858234475, 818583083, 638002191, 955539556, 166659792, 402119583, 136117938, 121601666, 755992562, 47984728, 295575049, 499852111, 307179145, 332974068, 315732357, 716712867, 640162541, 867854182, 934376752, 313718034, 59903781, 946384843, 119557570, 525136020, 151571916, 798992199, 641098837, 260839275, 993458171, 824535499, 355644177, 761912070, 816737774, 16159145, 269418274, 606453921, 360745230, 8968332, 697762673, 987763777, 660889863, 735951723, 644168107, 694447061, 112348183, 530007620, 3042837, 764274326, 848173528, 194620935, 635775962, 259196720, 713828904, 940082694, 457694335, 838811079, 742877821, 825043434, 999682813, 323541591, 50872352, 337477908, 513975090, 485543671, 991738379, 437900643, 771900426, 686428428, 563411325, 914169111, 935692665, 43568184, 490175371, 749564693, 101137943, 245839802, 603981104, 626386341, 386920859, 413292672, 913439917, 70347116, 434898910, 144090153, 824132212, 891175519, 132402569, 347193520, 969072546, 16729602, 608672301, 618817500, 911982521, 688615529, 732174336, 500282116, 497352932, 456415575, 878875953, 316115544, 915703538, 598465482, 596140294, 730305232, 164832432, 897815573, 166896959, 324516472, 764718824, 566396641, 914517008, 874306816, 779763109, 852306547, 611269114, 292511571, 915381300, 758955270, 257373679, 74625589, 121789415, 230596845, 205840454, 916544901, 23902587, 416402779, 293269031, 510816400, 975368660, 955188220, 72244504, 561311434, 137072009, 127537010, 860723336, 883260674, 394382836, 913512596, 497775666, 206616201, 483790701, 11643758, 543373789, 107216374, 536706614, 345207484, 197739695, 416959310, 802020491, 883579389, 155472766, 707726533, 878636875, 137339984, 387604391, 170286771, 862464509, 93116703, 698306089, 277231574, 157624181, 518482505, 545923209, 301838767, 429107456, 65466197, 400869145, 603396151, 201146053, 29560436, 908247428, 740900666, 645622178, 468181946, 182006817, 585006092, 39427009, 901513909, 575103140, 643739693, 969005418, 413112711, 121940507, 949419798, 274176335, 533655948, 73448571, 447893873, 303200166, 406062958, 327948494, 399154885, 680966803, 676784794, 346165530, 118434942, 634041854, 219847494, 927409557, 731595298, 204066166, 484721091, 397391612, 62697528, 613046235, 363210072, 588627148, 359818291, 176675393, 710790103, 31891420, 193284227, 13322649, 80677012, 364175866, 156203486, 303397217, 540753075, 969185318, 762928705, 479974322, 873609278, 714679223, 243389411, 893917661, 730412727, 540295939, 380888528, 199480073, 111615382, 501213077, 699982545, 83674978, 340471893, 589623231, 135448371, 354059110, 416125008, 490338358, 869847423, 644581498, 153365962, 261322947, 680966984, 400282844, 542955010, 604680600, 412088220, 680278649, 139286485, 860834305, 469429775, 280658323, 253030904, 2560916, 10309871, 297479762, 823144855, 871982081, 47058346, 963847165, 382927224, 356584190, 324565827, 306141977, 910279795, 453817674, 601981427, 979339306, 222338413, 904561649, 382529080, 408856660, 854658577, 411827225, 670817056, 827144476, 223389693, 471934610, 930635535, 587441381, 722797748, 95690794, 663628478, 287716698, 646651719, 701670514, 288321331, 90367689, 303151955, 540716833, 449495113, 614473847, 768187147, 779428778, 859329178, 317839203, 24311574, 208713726, 534909824, 569617669, 779723332, 951823587, 262620278, 508684571, 644816282, 124674019, 369884532, 146396384, 993989514, 828097325, 353947367, 356630001, 483119775, 36683277, 829372562, 480348153, 416969202, 237164413, 917166508, 673670902, 955993972, 550159722, 115253791, 571208381, 883450110, 234414978, 338605160, 465632072, 975880238, 1, 43, 987, 15949, 202614, 2146662, 19672862, 159841410, 171958174, 857707214, 674952199, 863564473, 694487987, 218927913, 150857334, 64522123, 242512102, 726888439, 233627107, 811786714, 114239005, 343074532, 372330107, 720689358, 467711835, 904517093, 48140523, 445520536, 151023837, 477389409, 167654505, 524330326, 826025786, 750662832, 873751815, 63739722, 191556854, 667326112, 50500515, 441625511, 782830742, 400734038, 564497630, 921910383, 845548941, 368028935, 749018447, 103585045, 796556849, 628596101, 868979841, 539520158, 627354569, 90231323, 417433082, 56768496, 355579497, 422451590, 886349503, 72956900, 803725461, 415871073, 683643384, 621063238, 193330057, 325926450, 277754812, 24871409, 448472012, 886190243, 823962291, 441987145, 894908057, 837390023, 862747763, 91512877, 722912649, 93349481, 545810047, 913016979, 515556016, 298546360, 734212089, 844284728, 136068973, 71028614, 122223407, 751306630, 44843394, 423748616, 386401231, 812571458, 811253207, 883210298, 108253088, 777750730, 94398075, 357510258, 341016668, 444595182, 421469474, 846006439, 697364303, 430219357, 145159, 329923811, 555736286, 145037472, 50858159, 758063180, 409311835, 199515197, 849732459, 429458586, 110831608, 601311986, 405029768, 899721594, 362036575, 3616348, 447767827, 718164293, 455022502, 154627334, 632024645, 923207902, 841801838, 418932384, 595460287, 460605434, 188513457, 767682601, 51793196, 194981425, 929803954, 504733978, 22197692, 870666331, 333136663, 819520200, 530915500, 599537526, 53266589, 48676597, 387019415, 413134249, 89916173, 988538195, 741237674, 580557472, 340811443, 13472882, 840030352, 781975641, 296220934, 702357371, 942050407, 935085214, 845987731, 799577627, 872670633, 692587304, 440284632, 702895036, 10589510, 109084537, 901549736, 680965380, 523560865, 14608855, 766098800, 955736031, 229070295, 918139336, 762087315, 15060087, 769624318, 210516326, 269537431, 932448778, 651446512, 367308406, 624037144, 927670291, 415521073, 854675140, 947034643, 395133007, 858104556, 792426709, 918444166, 282314711, 96653546, 423079321, 469451942, 792999037, 308400615, 330587501, 691818222, 53917678, 568461122, 362577365, 775464857, 904714011, 845440210, 795470521, 568880508, 666239878, 183860147, 125507811, 545400921, 401495311, 3467092, 430876347, 332849310, 96436924, 957680475, 836934713, 150232592, 891109199, 995835861, 145792868, 255284669, 853681633, 801676454, 45857933, 127560794, 137690320, 534209092, 436059291, 890838261, 134212816, 302504982, 936257832, 761720727, 269396963, 28197218, 59083210, 947207164, 442972791, 384169121, 488722025, 351406087, 443097712, 82956552, 698141640, 145942108, 188889308, 734290094, 387705377, 912805029, 973822420, 47485510, 507370861, 221674431, 786661915, 91335607, 856760661, 173031704, 864904090, 599152735, 495185408, 938099393, 556362344, 990758140, 995900803, 254599934, 462199704, 5008078, 665636661, 527028350, 642386127, 1829553, 551952980, 424017355, 108488740, 701380336, 806666866, 700141562, 59441909, 362171728, 894757457, 445400929, 773238426, 127546419, 723395394, 338826564, 332919619, 340737249, 850054615, 184058121, 13063831, 278558952, 698063140, 498777528, 72607237, 345269132, 902279995, 183690503, 772520236, 708689187, 233896476, 458831695, 230994551, 41124197, 206351350, 689101399, 262700029, 620939252, 892377787, 428085255, 694339277, 213848040, 916329377, 192795757, 474268014, 561285670, 220016093, 638297144, 193877561, 647642810, 64716523, 5417153, 709160560, 438820650, 471896153, 456049785, 424945489, 102312939, 179871925, 155527933, 66018018, 519349428, 575834851, 366155295, 196027859, 709388961, 444696414, 108229719, 111474967, 169464130, 765045351, 916818004, 674916990, 958919968, 932259128, 849009441, 829390390, 846317162, 253991616, 482990034, 163822353, 775754269, 532037321, 49173712, 212326050, 301906174, 678424573, 534302771, 375782334, 160287870, 855370313, 341617592, 25457804, 708941176, 246832732, 903916100, 546588049, 96029971, 706821232, 940560978, 101534792, 337492719, 856837601, 613769045, 707646199, 812028723, 616833643, 679800396, 535428679, 224426630, 413895724, 784683428, 431644219, 111092914, 661756720, 639659700, 41894591, 68359952, 43802473, 952730000, 823133424, 376059765, 707785553, 822330735, 771301262, 948220958, 908479296, 864547297, 515908783, 27167717, 175015260, 401476125, 721945851, 298498970, 707819205, 838011772, 889483594, 356594984, 693435347, 967781679, 401435494, 355846180, 333596320, 628919505, 303558980, 984974994, 113643042, 89409518, 612893129, 122412730, 114900098, 810658251, 247580260, 945287301, 609126629, 492005778, 772356444, 361927818, 440145503, 858752994, 174471327, 210890472, 769016792, 638211867, 546015263, 377533141, 892710683, 705066724, 412035898, 913706912, 989583745, 102815427, 296051463, 435828877, 627348761, 994079761, 369313875, 909339708, 172995194, 816793393, 474860389, 821690532, 962160124, 246051373, 970475428, 561698902, 165844443, 708639335, 918973613, 861542417, 207950600, 197794802, 563223285, 448456804, 787570186, 926930606, 566070711, 279041721, 162328562, 287318056, 191225488, 14318341, 585550504, 409974535, 697728497, 891226405, 200433586, 381575055, 638337683, 483277973, 755030264, 867834356, 962849947, 821535631, 1, 44, 1032, 17024, 220625, 2383232, 22258540, 184242832, 375813872, 392612893, 231706087, 882424931, 687132034, 689650073, 577977876, 303878988, 24310937, 406963663, 625468735, 582435950, 41660062, 421950986, 98962940, 938709884, 758565048, 969234571, 703952131, 900436492, 658647225, 285611947, 399326780, 419454732, 205387170, 983950227, 49990302, 189001672, 62673927, 586296391, 184361166, 506353667, 438069708, 256171907, 825943859, 951340167, 368115756, 522855639, 198647246, 263328246, 450011807, 434855284, 725807775, 648411666, 18383140, 128787399, 387148373, 905324825, 158891954, 656234845, 213026076, 490012707, 365468167, 200221292, 298615515, 290107567, 35072337, 317672326, 60118064, 676291945, 898619095, 494511021, 35193707, 681989460, 255539191, 6318676, 181981289, 309123618, 769843578, 942743189, 29734288, 954472400, 463236670, 747980714, 175643037, 260101113, 77874147, 589524374, 710018290, 567729062, 854908844, 767838566, 521233813, 535397022, 395450772, 519565978, 430844324, 691804767, 750969410, 915664434, 335442962, 327801393, 599337662, 151524696, 372580414, 756807473, 202845724, 578628778, 324772867, 495203100, 594805038, 176866440, 134364432, 797477913, 981614510, 128692174, 938852792, 42148884, 122641852, 370944239, 473851910, 935488807, 532851475, 689984371, 438315593, 696398812, 66001022, 428174065, 54501471, 80878480, 666016821, 47295976, 813797397, 317765605, 714997505, 258919731, 82884010, 661027522, 582655484, 361252385, 24311003, 432884688, 368733632, 23821090, 792526029, 846601436, 536812192, 29313630, 382435159, 426147993, 517181759, 645690342, 270896281, 775661220, 283600768, 240876557, 135665693, 104458079, 616729602, 497103691, 828815240, 86098789, 998656307, 754065783, 488969594, 91503702, 52278308, 883359011, 733253122, 448869387, 985543203, 116773170, 582006344, 860482711, 481797421, 498040658, 240829616, 836032529, 195942841, 508465042, 970760583, 262117458, 515914406, 802808161, 784332475, 374122343, 146224696, 841597534, 586439935, 244148601, 788204315, 767547799, 776362337, 510076278, 624681830, 364806405, 36907700, 539421266, 800828005, 512242954, 899834647, 163376162, 50294413, 18654970, 84289561, 55576943, 421249957, 34930346, 752291330, 162276973, 265235612, 648593820, 174309283, 472188614, 715911113, 367773012, 121970433, 269868616, 883985007, 980070897, 514347496, 412293057, 574601560, 116830355, 45453500, 562859501, 189078677, 827602581, 712444490, 316586780, 733065979, 840949184, 60074648, 135398686, 424428452, 321968689, 410040315, 273128858, 471407472, 574966766, 873880166, 875045586, 51088331, 163730111, 878321231, 726127318, 966070068, 992549896, 363335253, 89848987, 723352311, 66759579, 406269326, 227087300, 150259572, 36586234, 121181736, 671327424, 433664784, 948164313, 657988535, 451431758, 352880293, 341991927, 179834471, 17796695, 709446365, 576526708, 534876965, 620591563, 749402589, 628280366, 213414310, 982746106, 780180633, 458647121, 527146575, 210950823, 363805011, 571210392, 912463620, 153315485, 532024632, 427468951, 230879114, 869803861, 964025520, 480715223, 895116735, 766188327, 419338263, 475074013, 158183698, 899486620, 551866464, 830407504, 385674668, 305150124, 25769566, 438519248, 46473036, 427624180, 723264512, 651472006, 264633252, 457374493, 476392005, 982968243, 594462543, 141658727, 489344824, 433530156, 442633667, 193279091, 506366676, 618868695, 731227096, 902261819, 499005142, 38842574, 647293009, 470120821, 963932040, 826530559, 427769181, 52186234, 243569284, 806914289, 77294303, 605077946, 125786816, 193185124, 669741115, 146483601, 421911450, 244025223, 607708016, 920909811, 503255382, 458139691, 962827176, 614853461, 60315827, 350564197, 429760397, 252570002, 854719144, 336843776, 342192419, 596659989, 924243516, 172320579, 980212083, 387574794, 749118912, 796421442, 338721201, 731277700, 423355068, 842226704, 398877706, 643899462, 276311394, 413568057, 530987554, 558156380, 825270018, 71652153, 764304967, 575174245, 41877959, 189656159, 729954858, 472722511, 759829544, 285982254, 921037034, 543320666, 873711613, 829723375, 146980729, 88768980, 242470712, 9284436, 325379730, 426922557, 253585643, 473459335, 496125795, 212116723, 579959160, 525505189, 681915634, 797942363, 691505794, 454823298, 342255990, 994255712, 284908161, 275004161, 935102263, 472107098, 948357256, 856671615, 528973823, 649773881, 963952149, 308388016, 911396221, 251193820, 721175020, 199750213, 907595892, 491208059, 66513541, 911357998, 28185931, 408941602, 745821213, 601730782, 8869191, 260152446, 11616084, 492782894, 282010506, 115926945, 586669273, 760307966, 135350671, 730510115, 701832702, 230080848, 284697593, 182609947, 968668397, 822892958, 20031466, 582030222, 113170973, 44631330, 117449096, 742186715, 393019551, 475653487, 44400405, 854169605, 417464027, 638137059, 767027912, 156446839, 993857936, 340495049, 620457258, 138844665, 409760846, 178352112, 82788960, 388732194, 649306589, 798058368, 662337136, 564354859, 463324080, 651997437, 151329929, 798760314, 140393196, 82249686, 534814725, 624568021, 130746531, 950081340, 74895509, 582830295, 80288213, 896322580, 930247101, 961634195, 343840503, 151542664, 791653321, 891526646, 512046490, 292522561, 321986893, 483787584, 926080170, 410378864, 504638099, 532986681, 138953386, 701001827, 64586773, 800287681, 592917926, 845148767, 612516645, 103437292, 360749745, 802262044, 905182790, 741928176, 827192105, 608668686, 275550867, 759837767, 768468707, 652063776, 969103143, 1, 45, 1078, 18146, 239803, 2640055, 25119048, 211741156, 609749448, 185787670, 784612981, 979654374, 245960280, 15201333, 958496287, 21110097, 315107827, 742613444, 350112648, 551346765, 22689059, 646342016, 52427180, 113726997, 20972491, 531552248, 493279562, 92962089, 319571072, 658193556, 921146440, 975234478, 32484025, 175484024, 620442122, 566033382, 228886883, 301912152, 137109958, 37427138, 531183271, 684452057, 239066445, 806400806, 345167706, 766401402, 659593100, 342864185, 793254425, 754419464, 829307575, 253460669, 788296808, 455700810, 203460090, 299960617, 672027544, 662169751, 130171479, 226661975, 16040291, 641167104, 11608362, 92735361, 828424038, 151425031, 757058935, 838944903, 705030989, 271605017, 832315720, 525711262, 695893337, 524834613, 616761109, 89325780, 498691877, 390082387, 413410547, 86170624, 733987779, 857386717, 121183471, 378540433, 791481061, 602874536, 895775257, 706223069, 9499, 916233199, 610175789, 305910126, 402086898, 380865911, 987929263, 784720236, 752249361, 533065111, 750214951, 512527924, 120069833, 497034065, 691332267, 542878776, 324018841, 841280375, 368737196, 213532423, 972352910, 856518833, 695976280, 832491001, 482258020, 288928023, 37469870, 669147935, 728824530, 312167670, 98462828, 664815478, 37466991, 488559701, 805407681, 555656112, 449333572, 115257333, 422614443, 217564969, 709154128, 523463461, 73425486, 892488653, 72758100, 139084611, 245397266, 356349189, 258341975, 374070936, 726599734, 907199192, 145474167, 868900328, 80767170, 435742131, 604761267, 550372021, 238314098, 858506407, 406280874, 734533546, 294613351, 569709112, 578499728, 811514468, 971780315, 806793934, 105431100, 109183449, 48863833, 577768093, 679710969, 415227663, 41263734, 575857153, 381654592, 178237376, 962188807, 96401085, 816699360, 379978, 698529453, 815682387, 657011537, 324418972, 693645417, 573047105, 308103161, 882958960, 454854080, 319280881, 638681315, 366562235, 558670399, 767575020, 418970310, 599121706, 533764150, 589341596, 935247125, 342450103, 752510984, 17885861, 270962366, 936052758, 754048953, 578853463, 395299411, 975776432, 660809842, 714104917, 664542262, 888472526, 460099640, 981638523, 92874960, 177231620, 389704303, 815325394, 892076514, 810821143, 435904186, 382196425, 459031152, 355917826, 128881343, 657597142, 768648132, 489510758, 615223177, 785945817, 514595120, 566588750, 607013232, 187911920, 428934627, 690400146, 385480557, 274884476, 214574226, 202705516, 78809920, 768678876, 104566183, 54811645, 783466377, 78714677, 225394661, 571378521, 194681502, 425310485, 768219090, 304793231, 206900396, 615627160, 652872143, 605935098, 888495311, 608958308, 684600222, 150382009, 670451269, 632074742, 29926906, 676412361, 727588975, 541140282, 152873820, 396851079, 644404346, 44361987, 675992732, 795525664, 898044746, 408945421, 518637916, 428148139, 754863856, 398182352, 901207212, 713356422, 978366083, 314876385, 700685480, 450639991, 507197672, 750335365, 694787156, 659670168, 536065922, 58255852, 874808151, 601680063, 300562698, 308983506, 144763409, 291800793, 77526020, 485403753, 904665596, 240987930, 592380858, 131116194, 318805303, 40941643, 253699630, 655235690, 431599614, 508389196, 766960976, 64307752, 83604788, 642165815, 298107337, 143184667, 782909601, 97135064, 800759539, 594114128, 462420032, 946857620, 578998109, 847963761, 556321528, 57391815, 681855904, 181815656, 486333346, 837072759, 524567487, 328595763, 549915998, 810586503, 921107919, 625157836, 520890292, 832156974, 502972509, 844559735, 189855766, 821823028, 625190873, 310510259, 495827691, 683011136, 462720297, 218315456, 558392392, 789434995, 973556645, 730884239, 996176654, 617108310, 869866261, 672230385, 823462275, 454316955, 569646417, 836576125, 486906178, 189726176, 941091111, 447563926, 715506888, 259006307, 152570437, 178255829, 705545293, 756368978, 655390691, 445318929, 656847742, 582354283, 964611397, 757172000, 601301680, 424348696, 51484783, 19240319, 282677827, 308226295, 848392338, 155829926, 371112122, 224524783, 972970693, 890401898, 186586738, 229535528, 744395297, 436751188, 287103606, 767393594, 221149011, 725319915, 148703291, 142739608, 565503173, 66967587, 579759051, 568848401, 146971072, 400042251, 42796974, 930117091, 516575412, 958322295, 49672443, 25502320, 669481138, 837449618, 7837933, 569472200, 125364493, 253977071, 938687542, 347213905, 923213402, 374713215, 103889249, 423021360, 42560340, 446498368, 893011213, 263552847, 473020638, 594960497, 638188472, 306243047, 631678307, 460262893, 114330448, 196301356, 120279822, 408786998, 213927614, 687965452, 221650209, 761159253, 159653422, 237951119, 705996510, 183076481, 962207888, 939920456, 729428244, 527536009, 933629825, 48104537, 426892607, 222940406, 156477133, 294062878, 856995315, 562470362, 935041969, 210948751, 968306167, 842365144, 520781012, 542464204, 753086923, 742421303, 62000597, 644679235, 71406991, 633199433, 272647461, 452692051, 412108892, 971466694, 51102980, 982720545, 17172841, 800141833, 835541670, 112517201, 389287762, 451060806, 667438631, 372888210, 71363616, 925222882, 974951293, 516878304, 717488009, 957226897, 42671831, 558776576, 623171604, 305500795, 631070922, 102790598, 482941055, 578335399, 805101814, 173951677, 379242816, 368922629, 730730546, 873191134, 654555294, 282999571, 122452789, 92227034, 843713012, 807240125, 801145367, 399481174, 81195926, 292593849, 487745170, 77737545, 120468361, 275563695, 294725580, 329691567, 323060707, 128192468, 940264172, 278390124, 237020514, 693096287, 868976326, 357620751, 777387506, 600499325, 283061659, 552760619, 551343042, 374674126, 67456147, 355451755, 309520773, 188033652, 438124708, 963234900, 524570431, 966112342, 609641134, 592345761, 1, 46, 1125, 19316, 260197, 2918394, 28277069, 242654144, 877454212, 274093151, 658806941, 733787098, 12686768, 373279778, 972151771, 700803085, 323660829, 529034010, 15342046, 14519348, 617205005, 151932388, 986173050, 673700068, 544467810, 964286681, 515278420, 556139518, 340574896, 558301369, 203169010, 995039572, 456888812, 641435231, 165153057, 140522292, 660622205, 195293121, 536816710, 963078287, 7389104, 204944482, 754195920, 468292992, 782743724, 983001140, 866703245, 496885028, 44229335, 385957410, 278539952, 468949573, 420982388, 313452346, 869856814, 98935497, 204399132, 112520568, 660616311, 229799510, 228233497, 492491671, 631417681, 54933646, 149425728, 621332861, 339088208, 164640489, 629238436, 824895721, 154091091, 876001533, 408513031, 998443240, 581987593, 639413342, 564182232, 919538600, 946772636, 882410774, 972663920, 656083562, 92818, 266781815, 775781699, 746031288, 222736672, 245153398, 853395663, 612580130, 998160370, 644539418, 268757618, 522753001, 961290581, 775849265, 167666621, 207332842, 699178165, 754169098, 895892786, 110804927, 209717022, 224332021, 783584762, 168756823, 846734143, 820517435, 567375827, 214226237, 514413130, 94334242, 56417678, 452070622, 302779049, 643793464, 45275321, 465081583, 721848633, 905142006, 304646178, 594655979, 909007937, 734286949, 886228757, 175346016, 613908391, 543890160, 182181133, 880150750, 840065256, 833202286, 948664835, 99995047, 986587901, 143761895, 873393215, 472341142, 369663112, 813013714, 860504625, 731747262, 545041246, 583231233, 427381591, 37913038, 537312918, 219404202, 592801409, 727962123, 878247573, 121527391, 62101177, 856133295, 688561557, 4927109, 639161755, 216890863, 944378755, 396352437, 878653962, 905668778, 386987830, 935008847, 899701147, 100650401, 955831377, 336099358, 325599961, 655390214, 368725260, 410912881, 868037904, 255016544, 51552711, 320078126, 868474642, 332377928, 241406268, 35418479, 170587950, 775390874, 598922434, 616742075, 563583865, 362204509, 606438997, 894815935, 49721736, 43588534, 841088924, 703571407, 258771291, 525460849, 233015242, 491199815, 325653075, 858892862, 519655123, 115437087, 727491564, 149427446, 582972761, 204458210, 871579136, 737982490, 129452738, 424878982, 856725917, 336920826, 730532856, 841738688, 738232572, 913319995, 816486040, 235770118, 427698004, 930569686, 569011751, 212446463, 508105319, 803897811, 496189040, 948372030, 432798655, 784691260, 809769369, 691850475, 577558004, 62715847, 947764060, 196109904, 506172286, 447735266, 980867772, 417186123, 46557919, 986790130, 277584037, 822619391, 621076591, 388367593, 68342324, 236699370, 119970164, 657351210, 878868802, 794459312, 436412351, 290870119, 503296346, 564802634, 58773734, 218770767, 842309450, 694735121, 712067611, 605426442, 634737321, 598847809, 189964014, 104895974, 463967300, 12836011, 374171101, 422839429, 769990513, 562838372, 23465799, 935303296, 758855803, 832260567, 373886738, 362866660, 831747060, 745193763, 842521525, 971131364, 323409153, 328965945, 810807795, 987986960, 514599613, 697337301, 518676386, 255182547, 320862033, 438306682, 656059329, 246817307, 296427451, 518314128, 212813255, 401599307, 322632262, 651271379, 102975853, 978392574, 171788197, 425477753, 865141598, 200230496, 352371432, 128877128, 483645145, 487174027, 207964600, 565016864, 366179929, 769999162, 980709292, 279413092, 778963675, 322935221, 775556840, 152203885, 621120920, 754303914, 144652778, 603456104, 397495432, 911648885, 161631342, 183072379, 436197254, 410415743, 654211646, 998944149, 660332881, 659092994, 407158213, 993390015, 62237745, 342306369, 807083806, 460112259, 598009122, 34231667, 354435262, 237881432, 155417941, 495370397, 996923439, 566380833, 854227389, 702509945, 42544433, 284265702, 294553519, 149363293, 27077251, 84953964, 442875086, 52560456, 900402134, 145229989, 73758817, 191009440, 854994962, 638721915, 122661714, 185868970, 77283521, 869275152, 18655948, 313026284, 709600476, 473812539, 310414874, 881320952, 952459523, 248120422, 525865505, 878780555, 987277088, 840681160, 676792790, 412115993, 140030918, 974129475, 721196483, 656805079, 905290349, 47935904, 451920705, 209356056, 551066765, 377150442, 379611973, 957219941, 151470005, 815021467, 645207971, 427463516, 863082600, 325313522, 124436219, 624577057, 614877838, 455973640, 851822937, 25478672, 694724523, 841056623, 311625157, 733217559, 234679922, 488590424, 672460808, 393534712, 496209755, 929085969, 673429468, 675205481, 477828672, 541309112, 421475544, 478494486, 773959869, 620756099, 817295158, 343366608, 474968096, 138789669, 1261477, 581929663, 193727536, 890932863, 10823177, 566850894, 774883564, 16714666, 326523886, 969386350, 297903394, 330603328, 602435368, 640131734, 422205271, 722651837, 536164302, 931111157, 119137488, 728875089, 985577117, 985476890, 17918009, 917723365, 472997173, 89115107, 916366434, 502538821, 230961609, 303908854, 617061492, 736625515, 131713887, 339453221, 738950163, 633262610, 426758031, 238112917, 779917917, 838020550, 66019448, 650675847, 778117049, 610691432, 213274580, 385410347, 146924004, 364868172, 467790003, 719723336, 134820272, 752419541, 477278067, 249134595, 704095466, 475445405, 736299900, 879265925, 152926089, 845846141, 495967193, 279498385, 571884448, 188818617, 160584873, 477296264, 718325160, 376134972, 29944771, 994040918, 900529668, 502667072, 63109761, 493032874, 781301515, 461834757, 82343644, 481132313, 514447042, 33858163, 779555233, 748165656, 15592733, 72424287, 572256728, 868353288, 210902382, 873738113, 462082508, 116372507, 317994063, 320661573, 43412947, 698165915, 782179405, 544478699, 376533191, 591100852, 669522818, 718785967, 689856669, 868867194, 692259782, 326169003, 372530014, 278822874, 245059471, 536750832, 337386716, 351509954, 600150419, 771930319, 812137400, 268506281, 52663290, 576040882, 250206016, 182636529, 238498760, 83748189, 556944302, 408365242, 877381661, 687598532, 206936328, 93325077, 375585930, 311118119, 840250578, 1, 47, 1173, 20535, 281857, 3219563, 31756649, 277324867, 182983217, 698763572, 224340727, 130185913, 938338213, 457596872, 500667258, 726272186, 242531386, 490324006, 697265581, 186365736, 123707347, 149163288, 89978475, 985283339, 584841356, 785509005, 693590689, 256394211, 919078587, 671307265, 271140497, 146527772, 508423202, 678732983, 767147115, 418422439, 470469749, 411147184, 246424306, 580998273, 228726677, 964726100, 955513349, 444565758, 668191949, 622619432, 792082487, 929348032, 601983375, 875985614, 424117930, 730694027, 740975250, 920167707, 500437835, 690210005, 493329701, 913508192, 695611331, 515433292, 682059417, 760833644, 299135864, 144219873, 937695856, 872711671, 176916492, 348891212, 334587033, 49595521, 749704350, 806067034, 773327860, 183297942, 590517602, 642228939, 275941227, 305722242, 165986509, 644370063, 71211109, 994092320, 193064301, 728492690, 76982066, 397536959, 240992716, 459846893, 745186728, 715105963, 864528752, 8495685, 753272988, 61740216, 691254120, 133693721, 536597663, 806042634, 964981978, 37162518, 164112239, 637759779, 841824460, 829311498, 573961610, 622092127, 856298148, 23010232, 90428839, 608194623, 46765621, 381935126, 362962166, 452925715, 585602790, 768818647, 88708532, 942042803, 418311021, 521378251, 499003594, 126819649, 281499536, 951375086, 146412815, 883657287, 598780576, 163659546, 959278876, 560517421, 665346319, 929162776, 164983787, 77699826, 451232846, 342897676, 483260356, 399557298, 954841649, 593150358, 617703430, 292815034, 3827776, 631211917, 629217856, 387782790, 117795063, 964508694, 824603912, 347867132, 217932218, 808071571, 466159291, 919428338, 306867765, 310085680, 347929669, 103137973, 445637697, 645585557, 573817817, 596387955, 672995733, 578127218, 402908135, 115353766, 244018895, 365778204, 555835033, 188328988, 247770780, 214263457, 844226086, 575129810, 998900133, 642186262, 886066131, 9933705, 609621463, 398319031, 223920768, 209742125, 519163806, 74615456, 814536291, 217678251, 205417278, 306418059, 464475526, 330591049, 614947407, 841330174, 17421893, 462387593, 572435987, 550253368, 393354277, 125715312, 124567536, 533400012, 599797708, 528236566, 670562226, 867851657, 488086533, 312725786, 238592338, 37063455, 385067665, 487783197, 118051898, 700641656, 71282753, 435781034, 103306472, 894876554, 845215295, 848516, 105817111, 455104275, 971250603, 659938256, 173306291, 702024160, 716038595, 487118454, 170680030, 880373959, 881689085, 153725278, 74926408, 143593976, 537712434, 635112688, 530810156, 750175992, 211491335, 495469862, 938874667, 906814766, 530322450, 654580872, 345961757, 642596517, 63791230, 944154048, 670877958, 937127089, 186748489, 915912734, 209561832, 276486399, 229476817, 558761321, 226557040, 227364465, 312169979, 745218623, 741668605, 732242764, 141121784, 862165956, 612899824, 26577011, 945385273, 251793938, 946782241, 731260038, 244678083, 406380914, 904932224, 539791264, 681567161, 903979395, 522313639, 307479666, 592336384, 274405785, 808155145, 116439879, 610551965, 466693001, 783212908, 356926408, 441684284, 460337698, 929744044, 6376955, 718008169, 946348344, 771828366, 973818233, 895371075, 977137826, 380169268, 772257849, 31334848, 472603919, 411133545, 814229722, 268412684, 269984826, 925865608, 465876593, 90547760, 192297128, 107314233, 564985934, 624177562, 939350415, 164843750, 127698384, 375467125, 733175906, 272735725, 449176665, 148653187, 981408173, 518395662, 539465581, 376426572, 523018009, 244326749, 117372211, 788925566, 998562683, 66998700, 958836224, 912519308, 243826028, 372775429, 817271079, 249393258, 980817911, 290157076, 803249202, 54296904, 967950499, 259586185, 891527285, 197070576, 229312354, 227197980, 799697366, 938796541, 780082061, 90937344, 484280959, 41280132, 365255061, 357940368, 463355056, 931322797, 484716584, 549219150, 927360223, 836260928, 974511964, 168938341, 138740543, 617041490, 552137623, 940491117, 311751083, 797191757, 581186247, 747525174, 464341615, 45074367, 877273095, 118604361, 820377975, 651223472, 330450797, 299712101, 798402816, 155978336, 76119913, 279749437, 94544299, 576902970, 337821847, 762491092, 205421212, 628488971, 912880168, 293200919, 74345429, 106904237, 117214135, 997309646, 440117215, 601730010, 44099662, 275878624, 579837056, 734358196, 740396992, 105320711, 497734455, 593389397, 892951024, 375888233, 469355971, 904918031, 759963217, 159920933, 656339936, 82028185, 635763012, 494109863, 887577439, 747214684, 51704021, 870514178, 310168296, 344440919, 671389360, 63636271, 867520663, 253359253, 809561479, 515218518, 735486509, 595414813, 855063768, 809133514, 296905455, 403829884, 13706060, 521945271, 406722813, 508410711, 177195219, 735377028, 927006199, 631467156, 561281245, 747357347, 2938426, 465345595, 461810717, 851331500, 936133185, 709629669, 764183492, 336958888, 999734612, 886346709, 929391292, 283117585, 489898780, 493902211, 377860665, 233672406, 313970515, 130449778, 925311516, 829665465, 27964512, 47478431, 502231137, 77997958, 450616449, 231073347, 922519036, 577962078, 74763491, 840109600, 825429573, 325716083, 462423227, 684091307, 610980133, 146344297, 230702558, 840583842, 568780809, 837872774, 467777629, 918753619, 868791683, 692922864, 937076083, 487643358, 553595896, 717484731, 882361644, 739294901, 547711612, 781629368, 821302751, 368923697, 499416921, 374122329, 146178192, 867117817, 743635071, 435195107, 43377741, 23687167, 878990481, 99110158, 262344925, 137035868, 292609610, 625408058, 171070693, 281506530, 350758492, 515834894, 237732608, 828774443, 840832942, 431386878, 857791323, 291378943, 894741249, 559570546, 881728336, 216217018, 497590589, 210577047, 706853900, 528807154, 595327246, 243687205, 679896105, 276389715, 520651743, 981854062, 782051052, 628779694, 482906971, 308000266, 98460224, 329039027, 663453182, 866909422, 358447817, 756042580, 103701857, 530184673, 82157052, 864831037, 833622836, 129557279, 680891914, 903510655, 223117879, 584910098, 872789802, 683398377, 818673921, 424793316, 162530200, 461191009, 233747923, 764377859, 866276050, 20068038, 599500015, 419525268, 504837656, 702339633, 161478719, 731429464, 9977417, 955013204, 944736389, 868359658, 303235910, 570685307, 762022093, 973456873, 491776893, 191155949, 1, 48, 1222, 21804, 304834, 3544928, 35583250, 316123172, 530785426, 505824986, 901343166, 615485588, 789348648, 698747334, 657848248, 964586458, 476943547, 698458295, 801769019, 257736525, 542576587, 933572174, 9542546, 488292838, 779820677, 404677231, 568188493, 931045218, 340825658, 205993974, 185959269, 78058729, 445883053, 431770274, 625502333, 180277174, 804167964, 894493650, 995189957, 934651928, 779076648, 286076285, 196236261, 433504295, 796345349, 46608071, 262327913, 615865530, 569486410, 232121371, 86175778, 154003167, 455565337, 592635041, 449778081, 946011559, 315342730, 523152035, 660192808, 984322053, 918448908, 362530845, 976500024, 826353996, 979299043, 20455239, 106430716, 169990095, 856925551, 339927417, 872925000, 454748405, 844111855, 778706572, 953334777, 367875579, 54603227, 952723870, 746089521, 114899675, 378338080, 515017450, 901556480, 75514717, 118586517, 750778341, 164215503, 398032943, 932771419, 175973529, 371281707, 414155738, 136305212, 176477492, 529591042, 473449712, 104580388, 917944592, 711611694, 275529831, 657391663, 618370464, 182199238, 863262145, 671572410, 926093081, 964697471, 20599847, 886336884, 976845790, 332330830, 936899217, 469444206, 333826539, 382006323, 404644652, 86283892, 711449573, 711524895, 240243757, 137744674, 52585102, 502954368, 568353873, 424768720, 673699213, 453807002, 277591996, 614231800, 858886730, 933633627, 855960053, 795294602, 320736325, 160050137, 741837408, 875372187, 933116510, 439299086, 339530899, 998809886, 988163112, 414204450, 626581582, 425958595, 547450689, 257877182, 25212376, 487090639, 693248108, 736165691, 261048117, 530252319, 667332870, 224234420, 283256778, 493030047, 381167115, 959191937, 567700201, 408470930, 456733167, 877572444, 640070139, 177231251, 53889209, 630925282, 764167042, 903138510, 822950867, 161878067, 741376139, 620673064, 828400388, 989198090, 398235498, 335164252, 650259410, 895482301, 288920533, 986020511, 960531109, 692510577, 743863232, 159848129, 639142915, 658806616, 286815941, 569150064, 996156909, 474086872, 377428234, 108191201, 968576455, 934066962, 520785392, 648351310, 322768543, 500047228, 717012630, 366640002, 617370336, 747113890, 647615517, 420668064, 485924194, 28548015, 242698362, 20265134, 481161073, 780894508, 716872330, 925052871, 809234518, 209608950, 454869307, 42621234, 266915957, 548835092, 11648368, 200676498, 803279760, 609790836, 522043768, 787672824, 264643232, 571421826, 762085826, 854807719, 119023111, 660310435, 945098645, 838260736, 592383406, 728604232, 586121308, 18945549, 62079587, 8000021, 137221342, 936745518, 867913927, 937623778, 183088542, 624248829, 606106136, 815005922, 728188591, 164502140, 885086995, 646575964, 60630781, 250914884, 619961376, 835493684, 1794097, 350786557, 222634027, 605402916, 871984975, 140157610, 784428245, 701028584, 784157139, 199990301, 49282014, 806191394, 544636448, 696393844, 625422532, 306981977, 200109353, 819880255, 622554727, 966234587, 1715755, 884432882, 186517679, 414057470, 559202957, 356291776, 440462056, 76496043, 54502936, 82793754, 693820485, 333532789, 139408482, 538301356, 908601203, 663844984, 277481039, 494620179, 126148065, 101563902, 543304970, 40138848, 255494176, 250466774, 181548534, 183041503, 553027506, 468172977, 571880068, 685135214, 70030015, 431414252, 965377675, 285528459, 577690235, 3039911, 424468115, 149219671, 315258608, 442938842, 340124780, 620577523, 697442435, 606981307, 195766252, 513624332, 160814831, 144529981, 626344971, 929525101, 167384034, 985564306, 757660450, 674490248, 404160553, 218780132, 253152109, 588527766, 276135385, 293545669, 229980166, 406532593, 544661736, 944987368, 74067610, 979465423, 367319108, 691015763, 308068787, 270297211, 892899529, 571121326, 682341094, 508186314, 992592910, 570463576, 551864557, 443417375, 102996223, 180706669, 66278518, 547390018, 97982020, 377733797, 642211092, 809569594, 442856622, 912786312, 563198351, 549331531, 576357131, 891027263, 77805689, 816522985, 731749256, 313952972, 411776160, 795006290, 22615421, 348238413, 716260746, 223962550, 78670864, 47765882, 267128253, 587371111, 927656165, 192469863, 806624234, 136996971, 759497678, 646978177, 833527505, 472805550, 754214240, 960030895, 232746388, 490616131, 420542303, 904038549, 210637836, 74285318, 144447351, 742135765, 244372617, 87595635, 852731251, 594678505, 794681848, 228154101, 363702627, 673985808, 239196945, 836249623, 602064792, 462168907, 430511049, 331217937, 84426505, 529390112, 953694258, 768941491, 296949641, 617567965, 759210871, 554347066, 314959464, 855978152, 459336095, 416019714, 554419893, 643616814, 307318600, 193723511, 342506504, 737708842, 961578294, 644413804, 283651295, 449519877, 262823100, 438065978, 195660179, 15479674, 929627357, 712657286, 867475048, 618979059, 615899609, 290553872, 46585860, 675146342, 899293157, 138576244, 932939832, 413352510, 228638502, 577046541, 52412367, 271101119, 704058715, 716195674, 113738084, 976781966, 417637854, 201849275, 137988263, 703452509, 833173534, 774723430, 98520292, 647910333, 702073064, 101667724, 93613248, 4773372, 993672667, 598539625, 298728331, 547262186, 609550837, 42278975, 203431476, 764589375, 791435299, 273439277, 15186943, 247517820, 332116413, 672582410, 88991345, 573172714, 370502342, 495515460, 486357723, 529038430, 112617630, 9655079, 54905538, 630913486, 94540925, 694069860, 101033114, 601510215, 405093272, 877399916, 606786230, 712700446, 365826653, 440611748, 222502187, 628732942, 260127071, 415183336, 331627148, 603111841, 484627861, 252203062, 603610758, 918118836, 775502591, 558836403, 458735214, 903545723, 229008632, 239177179, 70767308, 751925156, 652119146, 980361868, 450630793, 63075950, 714904102, 795480239, 196855664, 446357279, 343343138, 751184330, 353543327, 265335039, 291055365, 141693974, 952501609, 772988967, 982806649, 295006336, 142133453, 389243658, 551050114, 837354729, 288032982, 926886748, 940810321, 996269340, 544323652, 123254721, 449847916, 164321665, 408440169, 540527971, 235735087, 384560805, 888470688, 711171300, 414716347, 219479361, 559050803, 610845133, 321258507, 296543705, 253557800, 771631909, 466270561, 966519146, 100544233, 474799959, 147649345, 956135303, 808272257, 279282920, 472357219, 422709994, 530025514, 999788009, 64593897, 709199531, 479060735, 311654131, 943520011, 427742758, 799287390, 782392773, 191335024, 830990096, 336010037, 237942831, 237453992, 695887098, 398366572, 529644737, 344086296, 862051533, 684436865, 317549101, 968659087, 366641438, 1, 49, 1272, 23124, 329180, 3895908, 39783804, 359447204, 925733384, 746545659, 165655001, 158091124, 719304162, 111160209, 171158550, 935012406, 874008903, 988755604, 608336289, 351327718, 211049418, 970686245, 441380023, 920727544, 396494781, 218114186, 934368772, 753990221, 203263446, 488226646, 946324350, 642441651, 816607227, 122420091, 629716118, 498106515, 488881569, 100763230, 814241373, 430998026, 986590664, 188596813, 238499794, 887765759, 719310391, 819612870, 840885905, 584773429, 811468143, 396065785, 368868801, 299761844, 617462619, 308704442, 206242421, 833439007, 106715469, 970135543, 972244832, 66232618, 207050932, 577078708, 955731123, 103929249, 632790957, 297717977, 280927805, 856143814, 140717794, 889342899, 570959166, 553036683, 311778062, 833874032, 321035571, 629235909, 60666525, 19636232, 889773198, 837811568, 283828621, 499062871, 459250525, 468391935, 389843786, 80632526, 462481073, 859711240, 66143264, 831825780, 518914304, 998480225, 496960804, 480385724, 483317701, 923742113, 771054094, 630267330, 478946945, 527928962, 674723787, 882998613, 123711144, 324674723, 964132061, 961988031, 65215295, 858250635, 924300325, 577545014, 241841560, 172586320, 726876085, 210684082, 897202470, 742850020, 161301259, 120853804, 344539574, 836860211, 667275920, 72688787, 930704832, 179668299, 861726583, 168665810, 834696469, 672920894, 419563732, 302874180, 454615268, 934181182, 119694911, 779976833, 216225187, 244379028, 586838513, 942544272, 397970796, 155525782, 435250288, 609294947, 697035870, 790138207, 313089121, 451259481, 904475234, 15500998, 428233316, 352796372, 805867626, 355791012, 191743365, 390372515, 86113794, 224579645, 34292553, 472538607, 244805809, 799547326, 350596592, 550928379, 248605526, 858957317, 809083222, 418025439, 717379009, 843111164, 748566980, 795763411, 344249103, 246799165, 468081584, 533360568, 97839725, 814208152, 370784820, 149643652, 648814350, 586462723, 179226570, 323415874, 413399345, 830824722, 901264775, 785155020, 673315179, 883230707, 320461657, 209574161, 896187167, 641537195, 580708044, 615201169, 907420567, 226969633, 44823693, 653925850, 618905940, 556249274, 683808190, 595045606, 406684866, 817926872, 498013040, 741888764, 255307898, 750076370, 226664326, 45791371, 138249186, 182084615, 925519009, 32002450, 507648904, 36302093, 164244320, 134446595, 176304234, 443232913, 204696272, 377207389, 330407781, 317016375, 255990328, 346121343, 776903928, 865285835, 180645765, 94169320, 523805568, 66571932, 958229276, 706032441, 157122799, 174128102, 265560802, 960871567, 814597354, 840895548, 702037, 848074074, 17426708, 276377856, 55696613, 206160180, 32721003, 453495162, 587538197, 204676036, 610254246, 936113705, 842825687, 202272844, 145230437, 624393323, 739106533, 700708897, 523328161, 691038973, 656087189, 213848962, 927815456, 921255504, 609475698, 113463094, 529085932, 807792149, 579407091, 163833313, 694176222, 471399591, 346973697, 718259544, 297359882, 892552532, 451373341, 120883534, 8029910, 624607649, 606649877, 815313728, 231664869, 673443919, 615486405, 94571095, 110823650, 950289120, 646876432, 928906934, 684469503, 297251947, 919054473, 285157267, 967739040, 274416446, 465229888, 656873003, 825576691, 53305194, 539107135, 609069516, 669008004, 585520763, 526072937, 91836656, 101778461, 538228891, 424599066, 719851020, 234795290, 701214554, 914481398, 497763115, 504286064, 212679726, 409710596, 134500525, 154608785, 554889670, 267547678, 851784437, 749366191, 681515762, 587313005, 604179607, 297539881, 51380469, 30897443, 988568867, 430543091, 168358864, 325894509, 131217074, 122226126, 289735266, 2541560, 697428098, 339809826, 339814711, 568813016, 256466301, 865405619, 710940331, 7424767, 660900037, 729644940, 444, 450105203, 690939247, 459755659, 92556107, 42398758, 782901298, 483436309, 73995240, 784415989, 602791285, 655683750, 744368335, 684929720, 939318197, 1937536, 94209990, 544006669, 195169186, 297173575, 151918090, 559870646, 425964491, 818978660, 571568643, 60393204, 415731654, 547756555, 991386612, 383053326, 997830526, 963081859, 107336308, 898219937, 906988404, 550036125, 981857264, 691293427, 481189647, 501756531, 316529056, 476096058, 168221459, 165690115, 553028411, 960794528, 453386272, 963889156, 71983103, 494867184, 462967097, 635240847, 989817132, 23786457, 968645733, 163475174, 884798755, 971346358, 8231228, 947835970, 751371876, 21594745, 702982989, 997528759, 30899466, 874470660, 839706683, 64336797, 183002010, 415355406, 851375333, 802315034, 662347966, 459017349, 83113197, 807783874, 686211775, 665742332, 548408223, 38712773, 947065654, 224142524, 544199777, 554457822, 161813447, 59932464, 324817969, 826816639, 159675767, 610260222, 802832692, 962264291, 230527850, 654881259, 493134625, 56109407, 491401533, 163680598, 892934948, 889185132, 78662275, 741528574, 616484511, 204394884, 120980232, 4959172, 884202370, 468625389, 987185268, 797914336, 292935354, 542176515, 965256954, 25044127, 701524209, 669825969, 264620823, 983915826, 463815578, 325409981, 142164710, 946513145, 626025918, 890502327, 456729879, 921471703, 889764153, 10834930, 550258959, 888111963, 456661896, 560525119, 254574198, 379302005, 359197537, 748972811, 432885247, 174603143, 495215302, 304225805, 499574, 89067439, 956588800, 479903186, 900293862, 918419160, 874312513, 779518268, 750190343, 34999197, 204187488, 29703716, 310295240, 212734818, 705461990, 880565621, 542764103, 578132976, 871657196, 920555643, 635330221, 603836039, 905337022, 446003049, 531829391, 914627500, 109964459, 793773872, 883594493, 588890899, 761763418, 850946563, 47045637, 406265955, 398330580, 175033998, 98562597, 74022406, 109783010, 888406279, 62923507, 851720727, 920064661, 659715101, 731241623, 740764931, 68490942, 26861674, 832409630, 156628069, 65837301, 277330611, 504531610, 621094682, 513712789, 824543274, 863846088, 522929299, 50674845, 205053841, 391074024, 703020653, 598865065, 977680558, 126857946, 571772915, 596794646, 195429545, 328266420, 36051456, 451216030, 522276964, 948367998, 561406981, 389510759, 585943971, 108053297, 459413669, 288907310, 136029766, 802792879, 520247265, 414339912, 337619243, 597859489, 40005835, 350918, 321070418, 199829979, 141119131, 515535428, 350920730, 314377413, 808898947, 900198037, 799762368, 570476717, 244997759, 402733111, 626061442, 103647198, 938528989, 898060580, 652361018, 641847472, 149112119, 134262079, 887185896, 606038263, 859408453, 950373236, 692335861, 405660442, 565431386, 959094106, 393940636, 423632434, 612413824, 143336067, 663257107, 9730523, 471491852, 112828340, 936303905, 998673093, 55233966, 416039620, 144081002, 565258672, 539355694, 202448366, 14002378, 539019751, 307827209, 288622328, 788194350, 570120788, 965430343, 472467292}; int main() { while (cin >> n >> k) { if (k % 2 == 1 || k > n * n / 2) { cout << 0 << endl; } else { int x = 0; // rep(N, 60) { for (int N = 1; N < 60; ++N) { for (int K = 0; K <= N * N / 2; K += 2) { if (N == n && K == k) { N = 100; break; } ++x; } } // cout << x << endl; cout << dat[x] << endl; } } rep(n, 20) { // reP(k, n*n / 2) { for (int k = 0; k <= n * n / 2; k += 2) { int N = n; int K = k; ll s = solve(N, K); // cout << "" << s << endl; printf("[%d, %d]: %lld\n", N, K, s); } } while (cin >> n >> k) { int N = n; int K = k; ll s = solve(N, K); // cout << "" << s << endl; printf("[%d, %d]: %lld\n", N, K, s); } while (cin >> n >> k) { int N = n; int K = k; k /= 2; FILL1(memo); ll d = dfs(1, k); cout << "# " << d << endl; ll s = solve(N, K); cout << "$ " << s << endl; } } /* 1 2 3 4 1 2 4 3 2 (+2) 1 4 2 3 4 (+2) 4 1 2 3 6 (+2) ///// 1 2 3 ... 48 49 50 50 49 48 ... 3 2 1 49 47 45 Sum : 1250 */ /* # -*- coding: utf-8 -*- # 整数の入力 while 1: b, c = map(int, input().split()) # 出力 print("{}".format(c%1000000007)) */
#define _USE_MATH_DEFINES #define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING #define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS #define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <immintrin.h> #include <mmintrin.h> #include <nmmintrin.h> using namespace std; #define dprint(Exp, ...) \ if (Exp) { \ fprintf(stderr, __VA_ARGS__); \ } #define printe(...) fprintf(stderr, __VA_ARGS__); #define PrtExp(_Exp) cerr << #_Exp << " = " << (_Exp) #define PrtExpN(_Exp) cerr << #_Exp << " = " << (_Exp) << "\n" #define SINT(n) scanf("%d", &n) #define SINT2(n, m) scanf("%d %d", &n, &m) #define SINT3(n, m, o) scanf("%d %d %d", &n, &m, &o) #define SINT4(n, m, o, P) scanf("%d %d %d %d", &n, &m, &o, &P) #define SINT5(n, m, o, P, q) scanf("%d %d %d %d %d", &n, &m, &o, &P, &q) #define SLL(n) scanf("%lld", &n) #define SLL2(n, m) scanf("%lld %lld", &n, &m) #define SLL3(n, m, o) scanf("%lld %lld %lld", &n, &m, &o) #define SST(s) scanf("%s", s) #define SCH(c) scanf("%c", &c) #define GC() getchar() #define PINT(n) printf("%d", (int)(n)) #define PINT2(n, m) printf("%d %d", (int)(n), (int)(m)) #define PINT3(n, m, l) printf("%d %d %d", (int)(n), (int)(m), (int)(l)) #define PLL(n) printf("%lld", (long long)(n)) #define PST(s) printf("%s", (s)) #define PCH(s) printf("%c", (s)) #define PINTN(n) printf("%d\n", (int)(n)) #define PINT2N(n, m) printf("%d %d\n", (int)(n), (int)(m)) #define PINT3N(n, m, l) printf("%d %d %d\n", (int)(n), (int)(m), (int)(l)) #define PLLN(n) printf("%lld\n", (long long)(n)) #define PSTN(s) printf("%s\n", (s)) #define PCHN(s) printf("%c\n", (s)) #define PSP() printf(" ") #define PN() printf("\n") #define PC(c) putchar(c) #define CSP (' ') #define SN ("\n") #define rep(i, a) for (int i = 0; i < a; i++) #define reP(i, a) for (int i = 0; i <= a; i++) #define Rep(i, a) for (int i = a - 1; i >= 0; i--) #define ReP(i, a) for (int i = a; i >= 0; i--) #define rEp(i, a) for (i = 0; i < a; i++) #define rEP(i, a) for (i = 0; i <= a; i++) #define REp(i, a) for (i = a - 1; i >= 0; i--) #define REP(i, a) for (i = a; i >= 0; i--) #define repft(i, a, b) for (int i = a; i < b; i++) #define repfT(i, a, b) for (int i = a; i <= b; i++) #define Repft(i, a, b) for (int i = a - 1; i >= b; i--) #define RepfT(i, a, b) for (int i = a; i >= b; i--) #define foreach(a, it) for (auto it = a.begin(); it != a.end(); ++it) #define FILL(a, v) fill(begin(a), end(a), v) #define FILL0(a) memset(a, 0, sizeof(a)) #define FILL1(a) memset(a, -1, sizeof(a)) typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> Pi; typedef pair<ll, ll> Pll; const int INF = 1'010'000'000; // 0x3C33'6080 const ll INFLL = 0x1f1f1f1f1f1f1f1fLL; // 2,242,545,357,980,376,863 template <class A, class B> inline ostream &operator<<(ostream &st, const pair<A, B> &P) { return st << "(" << P.first << "," << P.second << ")"; }; template <class A, class B> inline pair<A, B> operator+(const pair<A, B> &P, const pair<A, B> &Q) { return pair<A, B>(P.first + Q.first, P.second + Q.second); }; template <class A, class B> inline pair<A, B> operator-(const pair<A, B> &P, const pair<A, B> &Q) { return pair<A, B>(P.first - Q.first, P.second - Q.second); }; #define fs first #define sc second const ll M = 1000000007; int solve(int n, int k) { int a[50]; rep(i, n) a[i] = i; int ret = 0; do { int b = 0; rep(i, n) { b += abs(a[i] - i); } if (b == k) { // cout << "| "; rep(i, n) cout << a[i] + 1 << " "; cout << endl; if (++ret >= M) ret = 0; } } while (next_permutation(a, a + n)); return ret; } int n, k; ll memo[64][4096]; ll dfs(int i, int r) { if (r == 0) return 1; if (i == n) { /* if (r <= n) return 1; return 0; */ return 0; } if (memo[i][r] >= 0) return memo[i][r]; ll ret = 0; reP(w, n - i + 1) { if (r < w) break; ret += dfs(i + 1, r - w); ret %= M; } printf("dsf(%d, %d) : %lld\n", i, r, ret); return memo[i][r] = ret; } /* 1; 1, 1; 1, 2, 3; 1, 3, 7, 9, 4; 1, 4, 12, 24, 35, 24, 20 */ int dat[] = { 1, 1, 1, 1, 2, 3, 1, 3, 7, 9, 4, 1, 4, 12, 24, 35, 24, 20, 1, 5, 18, 46, 93, 137, 148, 136, 100, 36, 1, 6, 25, 76, 187, 366, 591, 744, 884, 832, 716, 360, 252, 1, 7, 33, 115, 327, 765, 1523, 2553, 3696, 4852, 5708, 5892, 5452, 4212, 2844, 1764, 576, 1, 8, 42, 164, 524, 1400, 3226, 6436, 11323, 17640, 25472, 33280, 40520, 44240, 45512, 40608, 35496, 25632, 18108, 8064, 5184, 1, 9, 52, 224, 790, 2350, 6072, 13768, 27821, 50461, 83420, 127840, 182256, 242272, 301648, 350864, 382576, 389232, 373536, 332640, 273060, 208548, 136512, 81792, 46656, 14400, 1, 10, 63, 296, 1138, 3708, 10538, 26480, 59673, 121626, 226787, 390144, 628744, 949472, 1355952, 1826464, 2341600, 2833632, 3282464, 3584160, 3765600, 3719664, 3531924, 3093336, 2642364, 2010240, 1508544, 963072, 621504, 259200, 158400, 1, 11, 75, 381, 1582, 5582, 17222, 47194, 116457, 261163, 537459, 1022981, 1817652, 3040352, 4810720, 7230928, 10360160, 14178912, 18577792, 23327872, 28132048, 32571504, 36310464, 38903904, 40028724, 39552156, 37457388, 33941412, 29314944, 24179904, 18835776, 13777344, 9452736, 5716800, 3211200, 1742400, 518400, 1, 12, 88, 480, 2137, 8096, 26860, 79376, 211811, 515308, 1153268, 2391936, 4633331, 8438664, 14557048, 23874176, 37407760, 56117824, 80906752, 112162240, 150052400, 193572736, 241706624, 291576384, 341323776, 386160048, 424359540, 450394992, 464545584, 461528208, 446428476, 413557632, 373573440, 321120000, 268449408, 210332160, 162330624, 112550400, 77788800, 46540800, 28497600, 11404800, 6739200, 1, 13, 102, 594, 2819, 11391, 40344, 127508, 364587, 952559, 2293742, 5126898, 10710633, 21042989, 39117852, 69175664, 116857024, 189256368, 294745440, 442503456, 641759376, 900689616, 225195321, 617201401, 74227554, 586823330, 140227131, 711888699, 274217080, 795069832, 242715461, 585116357, 796764497, 861974465, 769155485, 525176285, 146566301, 650715556, 73773796, 455145195, 828946802, 226153586, 685663993, 216281593, 828705600, 536385600, 309484800, 166924800, 87609600, 25401600, 1, 14, 117, 724, 3645, 15626, 58741, 197280, 600215, 1671266, 4295107, 10259436, 22922995, 48184950, 95816051, 181136304, 327071752, 566117888, 942525072, 513281017, 349163810, 532145419, 154557773, 309226767, 88509354, 563257605, 789064441, 766807654, 474675580, 795689314, 599134613, 627066840, 658988947, 307608398, 337632800, 295701193, 44870369, 150212311, 705302359, 336038622, 452522163, 797367958, 62674553, 57993322, 777736994, 845298906, 452367755, 90655804, 810196653, 976943895, 564798323, 582118351, 994783972, 869862386, 697759993, 660441600, 381024000, 1, 15, 133, 871, 4633, 20979, 83313, 295803, 952299, 2809009, 7656027, 19414457, 46086247, 102967901, 217634463, 437195525, 838372452, 540635289, 722168530, 638311860, 640827391, 196046908, 898688562, 478199884, 793020369, 808862771, 562236075, 94791602, 385333320, 237794527, 197694759, 398043392, 504456766, 579736664, 78137089, 793367253, 961295251, 280517488, 179779783, 947563092, 901772777, 859566930, 199212409, 920781370, 362900807, 735004334, 297264154, 482748036, 653703312, 140400674, 623159781, 320434095, 373194802, 13313867, 205909676, 360223815, 570584277, 68075848, 372652149, 961247580, 23084534, 261139053, 151302323, 715359965, 625702393, 1, 16, 150, 1036, 5802, 27648, 115538, 431844, 1464468, 4554040, 13096378, 35069940, 87969166, 207781760, 464351910, 986188668, 998611836, 879505923, 237509223, 15110629, 621334822, 88677622, 257578542, 963016850, 235638961, 442107823, 429101453, 483004748, 329733855, 718448185, 266304376, 413950543, 256286771, 626720357, 318467482, 59069608, 81901162, 352730851, 104241055, 503595237, 956355036, 534522134, 457799859, 108929893, 887297322, 424614770, 265024591, 876853471, 515703045, 692038809, 210906163, 20070317, 468291405, 145357835, 797577421, 232358134, 747771239, 343859985, 833879609, 78548665, 289896769, 449285934, 313197004, 379603290, 397630660, 609910102, 442642726, 627950853, 722186028, 705163253, 998661511, 771071664, 636940611, 1, 17, 168, 1220, 7172, 35852, 157132, 616084, 2192506, 7159090, 21631676, 60902460, 160707468, 399489140, 939796228, 101060910, 481320121, 151453550, 952463061, 931694473, 957528293, 554162053, 990142499, 644946993, 651797781, 791594351, 556120466, 271969917, 107619398, 710253075, 280526462, 615698879, 99748930, 775178221, 257586036, 645364809, 806795120, 340635512, 801741075, 790520661, 68328385, 331513794, 351728404, 931812262, 91105169, 176869824, 445724501, 370449983, 359815736, 918724628, 869062973, 659791249, 657727222, 395793733, 32692523, 78858425, 151369211, 628504487, 842750087, 152091477, 889718876, 908002421, 944598446, 656459208, 712920845, 47550280, 92244967, 110652620, 951703750, 217822851, 901098263, 655149074, 861896271, 859184013, 992613245, 768042116, 807916959, 335381553, 909568095, 153171069, 827990317, 681893483, 1, 18, 187, 1424, 8764, 45832, 210072, 861400, 3206786, 10957868, 34666130, 102239488, 282743580, 736889224, 817936097, 262532028, 534038590, 412279142, 965109380, 86702267, 846482566, 945052509, 644517943, 548776024, 679330947, 152291502, 882910517, 188127435, 636778925, 902059202, 132531208, 193904122, 893705022, 246193070, 652079051, 958060250, 148697872, 504141990, 371410212, 807466717, 514477363, 565424570, 560794838, 11419155, 215137208, 665710713, 791504234, 359367396, 224050172, 509091270, 125989128, 782600310, 957126038, 667219607, 386301613, 605448653, 296557741, 618019404, 194294675, 222923480, 765962783, 743934970, 24324611, 512643153, 214242880, 286900578, 228877964, 91240846, 430467141, 533029377, 904804693, 373207899, 916503101, 83598539, 560288494, 363356684, 68282446, 152683809, 284461190, 124425011, 167972327, 428909487, 373215034, 420008537, 513304383, 874743039, 487193257, 97337408, 532639641, 184378261, 955976093, 1, 19, 207, 1649, 10600, 57852, 276620, 1183172, 4595034, 16384606, 54107670, 166643130, 481442164, 311240781, 381378831, 288429444, 380463632, 370477330, 171662912, 688513797, 626045604, 789881798, 844990830, 70546834, 230422087, 267733218, 970080423, 75064762, 104073936, 888990608, 393490487, 819401315, 362017415, 197941501, 97730360, 491049732, 790022455, 142301163, 381999002, 81566974, 255547256, 500580164, 503785886, 874661360, 953064009, 357278689, 416715628, 656421867, 311332859, 849655408, 575613107, 850236831, 533549113, 255339339, 611845477, 501164398, 135987981, 672393680, 678611757, 552403430, 470027818, 333312311, 203812034, 929380798, 133842121, 497262544, 839881753, 29703780, 133717366, 249364505, 959337844, 632980495, 72879056, 356819838, 662140760, 182352973, 260787823, 329159184, 423643610, 488600943, 164109163, 8143787, 184454683, 684285006, 693158498, 382122550, 488552031, 777204359, 564238497, 598675373, 603916585, 720234840, 93182262, 238936257, 486420235, 352604922, 958291193, 880928218, 736558676, 163545641, 189347824, 1, 20, 228, 1896, 12703, 72200, 359348, 1599616, 6465450, 23997032, 82508708, 264654080, 796563486, 260832418, 76986106, 528774007, 854313906, 307546108, 722735109, 61004626, 805619536, 18191861, 511411798, 993782454, 401030744, 633897378, 70862649, 96855526, 314416445, 92910833, 135520920, 492052755, 24334887, 643976444, 574388511, 317610455, 122930943, 637889505, 255461238, 950861369, 48876234, 149504663, 198682481, 942670278, 866921314, 563621302, 960474580, 980132644, 624295523, 399490883, 351714973, 945626033, 827908349, 157456205, 481861323, 472454109, 343580291, 683697065, 95059407, 841332348, 464714941, 596887160, 38681949, 757883329, 590303711, 64921694, 730086270, 15240461, 714742087, 32874447, 175996750, 277466516, 788882909, 11880203, 95097385, 778398376, 531252352, 479554466, 557013590, 609738833, 798714176, 859324339, 721484640, 268442938, 861267595, 806087188, 31691029, 950412807, 580575404, 849451646, 691790951, 264837637, 967322620, 365040170, 622467624, 456436788, 658680316, 60575186, 387550026, 215002020, 31349904, 449373833, 559514745, 640364153, 807042078, 450172023, 562637973, 109112418, 545193132, 195217263, 976304283, 1, 21, 250, 2166, 15097, 89189, 461164, 2132144, 8950214, 34503182, 123236828, 410729140, 284813823, 790835929, 594736274, 153822108, 374418504, 157537842, 147846917, 133568389, 483576696, 508616649, 656867821, 84463125, 640047601, 955370715, 182167616, 49108700, 229345632, 795610484, 502493987, 857101031, 142485158, 996679960, 742503997, 723858587, 317526153, 365342533, 250775491, 442738912, 408346120, 881242865, 135363327, 231979623, 347291745, 824934645, 995772018, 164592917, 354883487, 450805745, 963969802, 171006181, 92161176, 169883419, 961669090, 26844445, 393784092, 571606470, 464707158, 34144520, 652396373, 745405475, 202923498, 135935314, 703695236, 776259115, 48310283, 874186699, 219390686, 510394758, 751965065, 418424556, 8781061, 736058807, 674014147, 674780706, 590530540, 4352977, 803825827, 167292329, 541083402, 260679638, 665083995, 939990721, 816665296, 886017767, 669822229, 694816125, 643235536, 937314556, 115942268, 261159535, 687177905, 12245758, 694615643, 977706180, 217949106, 118952653, 898868241, 856650616, 42954342, 330321980, 535121720, 982503521, 719423135, 714354007, 18745970, 333448882, 302037622, 935654015, 778423936, 317991952, 284756555, 504736970, 155871365, 118263505, 797065125, 640838446, 258037348, 34344762, 502389803, 911086550, 1, 22, 273, 2460, 17807, 109158, 585339, 2805752, 12209406, 48792492, 180680070, 624410736, 25734764, 199973794, 977710523, 571365953, 412869707, 328237414, 214863466, 633048751, 257394955, 317735309, 673309005, 193600985, 704135816, 514918834, 650479735, 33606857, 490034801, 698396427, 67986999, 220797055, 218864611, 931163713, 940790978, 675674698, 85542051, 543018292, 61247584, 910803604, 831296179, 923943160, 89478028, 104500393, 161998091, 254912705, 539249258, 547749719, 357852173, 690014841, 206926249, 893887199, 747112232, 382059625, 148865046, 301618706, 260333115, 442306036, 247371284, 782005651, 233300621, 920894203, 317455792, 678639547, 427050277, 482884001, 854060466, 980543322, 860769666, 701293636, 771136168, 670745480, 486701027, 168461356, 848787800, 289825171, 498776317, 33320170, 430165721, 821516580, 115533370, 398776967, 333310602, 563097053, 553134182, 219816464, 216637272, 206027601, 933677337, 925510467, 267639197, 43693887, 486722546, 270929495, 877730912, 261947307, 375318068, 692508932, 989184491, 226696206, 288508969, 739837562, 849035543, 782296408, 273955665, 801085382, 431898190, 935043965, 202752072, 867866169, 151133676, 67940990, 78118516, 742654574, 165553271, 254022475, 668960857, 929973305, 656759571, 877339826, 925206924, 133648890, 623964326, 796176354, 256442424, 844384225, 955053908, 35821657, 33969824, 328610099, 171474448, 265634834, 954990510, 1, 23, 297, 2779, 20859, 132473, 735535, 3649437, 16435370, 67971642, 260491974, 931772466, 129241853, 915880695, 773220207, 21124907, 663657824, 89235883, 562087424, 395633225, 79602143, 818737728, 503346111, 923762587, 810187543, 71950684, 872552891, 722894374, 788701216, 792043650, 839896539, 577542972, 345484502, 350106805, 159630680, 594479078, 806985602, 451202244, 562057157, 345406448, 404888318, 371479292, 122121086, 196184273, 855722413, 625056343, 209132008, 580725504, 234791519, 683270249, 879431955, 820639155, 890517789, 877206124, 780147370, 943542736, 532169988, 134361777, 389279830, 486085405, 212150153, 60309713, 36144061, 220641769, 167907687, 433032241, 672669299, 4840381, 543970499, 860603358, 920463673, 899153827, 269139419, 99866794, 833550296, 732963165, 649634036, 220976898, 948879986, 81746947, 249278044, 943429751, 227240067, 617290217, 857759442, 317672542, 702411387, 392102340, 598392406, 771484657, 20769431, 772211314, 777981688, 103043307, 336611982, 922346108, 46010568, 620920750, 740298345, 143296430, 127113300, 229361025, 452883985, 298773134, 583669967, 430943791, 878469881, 498554889, 377075156, 399618101, 518539100, 610655946, 762624102, 339746521, 193491143, 582788075, 58498274, 139175929, 439487543, 659039143, 969039085, 205473123, 149794944, 735361805, 144310487, 952281582, 885994682, 290034640, 449859219, 870975475, 717604104, 930837761, 466542500, 510501275, 368063612, 61813298, 959329905, 938922014, 660077190, 12025968, 335011033, 657136343, 351072920, 964781583, 196462283, 1, 24, 322, 3124, 24280, 159528, 915834, 4696644, 21857553, 93405656, 369882084, 367190881, 745178532, 541448535, 237690972, 408537702, 191376116, 678513161, 493570976, 397907192, 9101765, 658714208, 122356973, 514532531, 911169029, 6916896, 782796, 910119724, 942560918, 62371227, 773940129, 523667340, 669757203, 42568262, 891666384, 467022993, 486796667, 727294526, 413613585, 787453753, 599953158, 417187968, 359849625, 117069116, 879478181, 12380000, 910899870, 838986319, 102687453, 103327364, 376800830, 429223538, 780159138, 706916356, 587575355, 971169352, 36010810, 483798044, 344462034, 787276711, 359714668, 737585540, 514856433, 506547585, 7966248, 935961, 931790046, 725219981, 437246235, 737823353, 539625329, 101294921, 998345360, 158678756, 14552916, 434899855, 58679632, 771567929, 908041362, 370603042, 958461645, 473954165, 329932246, 645017860, 950250115, 632956030, 39737256, 308287817, 593859369, 848980890, 73354610, 67983312, 794665532, 744501399, 571146358, 79777328, 768540650, 301591668, 87146707, 749547055, 542914952, 113807115, 981646049, 443442346, 689844336, 226785366, 664441023, 644644459, 65534356, 186334852, 433121661, 818953887, 687026114, 344822747, 464015963, 110899493, 294091084, 65199948, 37449794, 719226153, 501099656, 413337315, 725255533, 799293560, 259962068, 954615054, 373654234, 764439094, 914044890, 22085466, 539035590, 698634111, 313016212, 98993468, 941478268, 955683335, 902077766, 420565422, 767959775, 128648986, 355285226, 534029655, 104714136, 932643222, 778200211, 56428536, 225880543, 792355687, 449940761, 181471652, 529937629, 325235521, 6575392, 94094707, 441392085, 37264955, 911557047, 1, 25, 348, 3496, 28098, 190746, 1130768, 5985744, 28747851, 126764795, 517958180, 975500521, 75313899, 914923483, 611051644, 458281681, 932346365, 712529240, 185024083, 463834094, 950836649, 286357381, 871292163, 434939852, 58330077, 629835295, 27932676, 66354549, 10923173, 590226200, 526183672, 176005584, 809584977, 222348292, 260397896, 396327746, 178971085, 774808076, 78650222, 507195902, 144802453, 299847298, 581537053, 724817078, 350425193, 503589319, 654904119, 595937600, 992781673, 82554146, 868891604, 769490422, 119334199, 287573489, 85347169, 118147346, 949694675, 540939467, 927324362, 545027201, 610310429, 769058023, 21423, 262519735, 786795808, 240407039, 428554518, 447092428, 788617633, 367724192, 374279457, 343082569, 856162651, 150954733, 962857235, 700751807, 895999415, 533537747, 537990547, 268357366, 869434038, 633081543, 603452058, 947934680, 987367826, 743179254, 710352935, 835787228, 706586787, 845202323, 238777269, 405136472, 480736674, 155194042, 871452828, 677921910, 616952227, 984554304, 602482844, 894952109, 161534829, 782737895, 850072208, 670793244, 828100052, 222399146, 284700626, 231919567, 306545173, 673216888, 772842480, 314744315, 347738200, 25002680, 730048408, 649455506, 745857274, 196252843, 529935260, 419302767, 276709210, 732855171, 343508231, 624945362, 861002432, 484757974, 367927715, 209929226, 661865936, 531107025, 413469524, 479519565, 741904536, 610072165, 606639245, 934344602, 716197790, 587584177, 185414563, 306822687, 841034662, 971868532, 919896238, 158358640, 773475266, 936203252, 665923149, 911486615, 197651366, 774528535, 82937079, 883806524, 130206852, 774201811, 995994000, 245370199, 842572718, 793423605, 740588350, 687616120, 657690139, 857790226, 37323118, 88399209, 523321086, 117621631, 71036645, 222192424, 788926021, 202125596, 1, 26, 375, 3896, 32342, 226580, 1385350, 7560544, 37426495, 170077814, 716127109, 814596482, 388283574, 187079164, 480126707, 290089727, 38629756, 54115650, 64891257, 901599546, 718222041, 911275669, 323565019, 817912019, 805459451, 803612364, 201797073, 732830955, 80380678, 23464457, 701195891, 272214917, 913862649, 132026200, 669751010, 759341231, 973676755, 794065196, 967438659, 308299894, 10712690, 949669597, 781686555, 88559004, 727530543, 318751597, 278470531, 434911202, 804701133, 324324750, 981099143, 232682614, 987104568, 776649739, 786487389, 442468777, 569068005, 663709268, 881510700, 203686642, 57967683, 568729400, 236001193, 623959074, 703861418, 908672716, 70204475, 867825588, 827103298, 241630317, 362696969, 415618616, 805038660, 598704556, 10082872, 643477587, 415164213, 703084166, 477367476, 20036406, 629980785, 802614294, 952521645, 17601466, 311433959, 830294700, 548394039, 535645146, 521413012, 929141249, 283365227, 727229980, 443388093, 410708269, 286618040, 319768543, 938841603, 93475597, 394693465, 931196821, 495806189, 902879580, 707905623, 303901454, 576396872, 484544924, 486011674, 564305854, 311518869, 856442237, 372745088, 366968335, 813470622, 720542245, 551543931, 596748971, 778551123, 354920979, 984250497, 691689872, 327423759, 52302396, 920309409, 457393341, 162758194, 401889329, 760192486, 361045291, 58998809, 845800809, 8575285, 649668894, 501939170, 542308042, 574502757, 192463535, 690505425, 204738512, 689813836, 483570629, 525148782, 216925832, 952334594, 68584858, 946061868, 229986068, 113082103, 705545851, 563504064, 430610853, 209937938, 608555345, 578039088, 750439353, 944169681, 417934823, 74422181, 960090808, 568355902, 435674968, 894299009, 15861008, 618713868, 509911155, 168869978, 339481775, 369451744, 600513141, 71634326, 781507214, 857107917, 106564183, 736233715, 362800524, 615467708, 519437498, 342065337, 206666492, 505918934, 308299385, 20927738, 106279730, 457391057, 1, 27, 403, 4325, 37042, 267514, 1685106, 9470830, 48268511, 225792189, 978561725, 958557158, 38052071, 919433401, 254995547, 546697380, 704487939, 32839999, 508901654, 551556389, 663564198, 695178769, 814009554, 547143595, 371559020, 945387943, 670094820, 616330760, 976064124, 607380120, 8699769, 998280938, 580008436, 958036252, 912203574, 544195790, 396609897, 954428754, 708902921, 801338681, 431017191, 381717232, 344144422, 131861617, 874277396, 830300192, 596462835, 318671397, 244894238, 904557382, 834593756, 283869037, 697514761, 969250693, 509524190, 913260759, 384371901, 692021356, 509945770, 32685910, 505430483, 907189201, 193340383, 693205397, 603006308, 305262013, 925218957, 968092842, 27052064, 47727228, 477199307, 293774777, 98292616, 663047137, 995897620, 288543890, 998081856, 524487172, 892499155, 556044593, 972323813, 578208602, 933674462, 509188659, 985492681, 986901126, 628028841, 519717277, 311965185, 897395442, 829761538, 9680527, 161715155, 343759581, 402616197, 861303980, 911400557, 358697993, 515548395, 553147014, 892738525, 205604013, 762111690, 442223169, 7841804, 517369986, 84729818, 152655938, 700957258, 898706126, 75157861, 271201265, 543855670, 440588279, 204308612, 236683234, 208667572, 404506592, 809547310, 853106482, 518815458, 16491026, 491832633, 360120645, 923872102, 602086347, 641452842, 18221609, 229080666, 428455406, 569262655, 856993308, 230900297, 490066099, 367669571, 96292417, 52365382, 469261002, 374633464, 900617667, 182287939, 49700390, 796588976, 949085023, 222503562, 658471212, 94278399, 66098044, 72459139, 603916441, 257635815, 234793049, 951525459, 549173423, 938321308, 13662267, 288258509, 65326301, 11071916, 364716823, 929353581, 839483911, 199241395, 29486252, 482468148, 829994735, 370892643, 687560607, 531658704, 568187724, 486108828, 475403750, 227529481, 124500798, 228110006, 56292488, 958873404, 963718586, 481659835, 183136868, 593123751, 622015148, 469053734, 211587807, 928091671, 481375722, 612130911, 134707706, 334981252, 784422204, 712253942, 698883770, 390222722, 25478322, 28778175, 349558455, 616616543, 1, 28, 432, 4784, 42229, 314064, 2036108, 11772944, 61710789, 296841956, 322742117, 501368237, 486564198, 208215103, 787564548, 236938424, 301578523, 866593178, 461034739, 153403692, 741061604, 268366308, 41671958, 999969805, 820629183, 540097933, 348143198, 290585123, 709901036, 830657214, 397773343, 205345230, 80836479, 744283025, 767371096, 13280133, 166091858, 688213267, 405245759, 999129285, 957885801, 125598090, 229197648, 232621259, 771781842, 15692966, 623498734, 209019752, 451480479, 405116698, 905232949, 522429827, 160392239, 911337480, 463779522, 870625842, 997849245, 364479050, 834828, 300785526, 10186705, 265101999, 566806573, 614983712, 685595755, 48653250, 344390997, 673637797, 896886255, 108856368, 31386606, 486989879, 489263782, 517653845, 976993581, 117774221, 829510874, 294191687, 233225993, 831800739, 448583977, 657291524, 649603801, 456575978, 536862581, 855051723, 994222346, 302476269, 502749737, 322446053, 790323255, 357338908, 887312147, 181428924, 536100952, 55330164, 160205355, 190454705, 365581727, 201998030, 826748536, 400273437, 624522779, 849319472, 800147953, 80982274, 447705256, 168185200, 97822479, 309878269, 678607548, 912097410, 927785144, 334246635, 662138658, 715198385, 260363473, 461374975, 89468114, 651175074, 575096135, 130470890, 71518840, 879845193, 486812125, 128678982, 647847215, 49005945, 59417027, 550597313, 85275582, 589669875, 488581288, 579391253, 238935007, 307933774, 801626662, 991248834, 831660242, 2289249, 939337934, 170802252, 112167473, 712496239, 45742853, 482400666, 341362938, 957391891, 147812751, 376451585, 832724562, 418101830, 38563919, 274362964, 819817184, 400041713, 313141267, 806456583, 999307614, 670677205, 585839782, 845991536, 831623045, 109161241, 554327240, 822718306, 173814042, 363700239, 22366070, 479904205, 190929878, 554951008, 774006606, 279182950, 109357938, 401823952, 575672540, 860574847, 593910748, 547825741, 217594637, 989467389, 184852185, 331539318, 325720467, 383229710, 654245987, 146654996, 209385163, 560462909, 965812836, 65583448, 508391947, 709539829, 955465325, 214525022, 394005813, 531700924, 773028650, 417539579, 326670161, 406612199, 165245, 699092510, 550837077, 14964582, 527720684, 440459594, 268905155, 297293091, 881879628, 1, 29, 462, 5274, 47935, 366779, 2445008, 14530396, 78259797, 386723841, 770080067, 561338901, 331351593, 839635833, 167817400, 497149119, 881282118, 352201610, 471630724, 181160121, 88806794, 987377178, 289689361, 946592969, 656979867, 594487341, 196240769, 948508749, 810784209, 709855728, 576276359, 518417791, 87667236, 667014934, 181628700, 79050911, 337053925, 373883684, 560120551, 458872893, 815731972, 827954345, 771964062, 380463298, 190074568, 335845313, 308369049, 297128477, 730684746, 742600059, 263592454, 96421517, 206168581, 306386280, 238588046, 136275025, 509837233, 285349782, 467079296, 44733505, 132275281, 829959933, 391862643, 62600608, 253168338, 426879146, 365435454, 91732486, 471304236, 543190875, 798110387, 894371900, 696428631, 750022470, 726550236, 936549828, 542410178, 939184541, 791578453, 983635297, 823881369, 150676558, 585328209, 653882077, 963087655, 950795211, 936066317, 71868369, 440124326, 965151462, 175368387, 40663323, 699428294, 108367130, 332044307, 970432796, 572024201, 885659377, 539317691, 132218646, 139253073, 467726930, 45351751, 297376822, 508633325, 703469419, 746467332, 503668629, 112630766, 930570931, 962347630, 576196343, 698904389, 167199167, 333129737, 608922442, 222067115, 688206452, 802821275, 954540394, 911151138, 906746447, 902608727, 890863920, 307268385, 54404696, 104370759, 495676754, 441341576, 829087999, 88911607, 975336543, 381836343, 298727399, 758323163, 709721214, 146811076, 322114121, 909574264, 955852236, 803216000, 511491931, 157225317, 671670053, 367885171, 612666342, 842261160, 508147005, 345029386, 809990068, 981225972, 241279545, 458275632, 172983843, 48836190, 961296645, 538132589, 271432367, 877708377, 386417805, 815731556, 463571419, 404450924, 113136747, 549319603, 219464194, 220054123, 907114544, 328856175, 265047793, 589592614, 328159953, 809008569, 510434161, 420313068, 107873733, 868895119, 895337042, 156863206, 48004547, 666506430, 727609186, 85858741, 59205240, 78940637, 545962715, 139572749, 421355881, 858507471, 952603331, 401020118, 942925111, 296295597, 997986384, 115737481, 677010850, 282276283, 274892540, 163700485, 118592549, 846472792, 136765224, 236032397, 179431589, 539549211, 214067143, 923131121, 999465547, 232088789, 610013691, 896204760, 478686995, 218989077, 91096939, 221616643, 243944261, 454787573, 542927414, 355318220, 147354818, 482630, 675619041, 634351197, 478341164, 574509037, 738721209, 1, 30, 493, 5796, 54193, 426242, 2919073, 17814512, 98499977, 499582398, 346636279, 286311246, 338970899, 482987014, 740494022, 522312682, 389124982, 438269373, 295660905, 384589942, 269003911, 190728878, 21841107, 394443500, 159301748, 885681179, 869073529, 396029106, 969827087, 16747334, 474716791, 259235367, 753984455, 365768194, 423375006, 957390875, 407261764, 592999097, 928039310, 529328158, 133251022, 533719572, 434981329, 779487889, 212784950, 467080112, 287628298, 91658981, 576061624, 322787361, 682746649, 234833733, 676878118, 220869554, 982232103, 879428014, 742840902, 65876039, 230084790, 68776407, 988541480, 113769367, 288661011, 898604342, 790158821, 811679832, 416532461, 643426286, 357304561, 904850873, 143689492, 643378934, 217587561, 816799579, 741653213, 950522177, 519192837, 195766899, 875531753, 913462122, 931740864, 147485151, 73473743, 881407231, 943949423, 19375017, 95185407, 658198820, 654223830, 78841384, 487272636, 810454297, 156111172, 108214345, 594083015, 721613382, 413639222, 199581479, 219296986, 983776208, 50034813, 434669652, 336761553, 553659069, 443256837, 867959007, 649693919, 829394710, 511124003, 801382432, 809258820, 440312724, 549557631, 57091967, 619973166, 38255131, 989252595, 296849831, 126449228, 992478958, 948085171, 398912012, 308493194, 585304989, 581850817, 704472537, 457658359, 706849064, 974235300, 322942033, 801441410, 806760539, 930211369, 674605925, 140615032, 804334982, 654022727, 747554604, 304695097, 670935186, 973200118, 899755340, 43016718, 33443894, 486649937, 183173093, 28680647, 612676891, 17478829, 208078434, 467131016, 651933212, 464433186, 3993644, 959280435, 310671435, 524438940, 540166082, 143663989, 984026973, 596317769, 299039541, 925611762, 115137245, 238184581, 798462400, 902062936, 499673997, 696053154, 121959061, 376644235, 378356623, 996412950, 115590297, 517087995, 817795384, 731733847, 61225249, 930096903, 292653780, 149516053, 503527083, 233497811, 781589564, 87992011, 514696635, 495015483, 151617728, 478098704, 773499685, 621536652, 787266199, 440325002, 249898342, 747360642, 671517137, 216648293, 686506084, 544204132, 949750238, 249236969, 319054830, 756596931, 233403453, 594672369, 158463779, 809106181, 249481644, 610711719, 262167344, 179138909, 270160113, 278492510, 490828032, 946977816, 803242084, 541036271, 624688984, 204404014, 881539240, 779609382, 561095932, 524976628, 888316278, 139701497, 712146362, 413036824, 810411985, 241441787, 247390036, 695355554, 122993697, 227371919, 399947791, 833892197, 899399938, 781528108, 656359733, 551706967, 845829828, 900357325, 1, 31, 525, 6351, 61037, 493071, 3466221, 21705119, 123102861, 640304911, 83941000, 859775332, 485271727, 929183599, 393442380, 976105677, 287805815, 238271867, 74391877, 765979021, 335546599, 709265303, 808915958, 907593582, 463983041, 147572225, 888153362, 391439968, 221443415, 801779213, 245226914, 866175931, 810047153, 267980729, 805674759, 955321032, 906824500, 367243333, 486256638, 145115859, 530769671, 290945081, 932311137, 51068986, 807551107, 185085629, 261181005, 959829857, 118218336, 295880881, 506261294, 848742193, 936582961, 153400705, 578662225, 341741810, 161659811, 816049772, 839223846, 559301757, 400427189, 216771109, 207016492, 505237766, 795055758, 945605740, 555992642, 907845643, 982951177, 401043526, 597396374, 84431994, 362552441, 746539639, 303946121, 357484364, 893505269, 526515449, 560103044, 121894895, 445706213, 592793631, 713670463, 810676671, 143889731, 392244416, 73126772, 488568958, 542583029, 752584772, 7383345, 155007498, 994039957, 804821801, 379264833, 525210782, 239847467, 126254398, 219331239, 753237922, 434345445, 635807399, 872366121, 133933893, 590603804, 32230684, 70841222, 840236255, 909722819, 689521789, 529248821, 178846494, 980363222, 548654005, 434479841, 697553680, 35011089, 544881135, 260563063, 695816358, 44173506, 726085055, 671716390, 781464159, 450226987, 146813053, 877951734, 991641337, 221699230, 419417817, 794832550, 810418558, 969705412, 219055178, 274301546, 503413612, 695160244, 74090275, 26176299, 695070748, 341801549, 897892431, 470380437, 3467372, 448525308, 439337134, 724845391, 9187155, 585558376, 372261444, 277930003, 34819054, 431482585, 279947765, 492267585, 818516372, 484582901, 390623889, 856573701, 179325546, 611189228, 688765384, 847931848, 534263758, 557397045, 116495491, 85868985, 610969731, 478650084, 585159686, 14772190, 776211983, 474268574, 460744792, 134988124, 912707317, 105964987, 809266690, 785401545, 161419686, 653370610, 499797235, 534961655, 323936668, 802659551, 370287438, 326963010, 342959476, 313044094, 148582386, 976795271, 120954501, 724957759, 860215558, 270001726, 640931921, 833230238, 701256342, 242231076, 286286219, 13632467, 253663042, 129411109, 603714672, 564008356, 523901279, 216864213, 524434304, 182659511, 983267072, 644616701, 707181007, 618980658, 405751838, 571460922, 136629759, 744395053, 539608518, 963053644, 97893406, 866038338, 265757870, 944699732, 964525924, 892464175, 168006507, 562926324, 742708490, 132927348, 526909479, 79557205, 129052432, 157042523, 659309142, 834183171, 802572815, 517259737, 256356803, 353227137, 87135975, 224995979, 596580540, 402931204, 515099940, 793833445, 691900231, 589149123, 114327507, 887760880, 389703467, 830251700, 783657579, 433484966, 412892473, 432995349, 911076886, 112628181, 1, 32, 558, 6940, 68502, 567920, 4095058, 26291268, 152836946, 814626856, 19929138, 508014078, 3627542, 383619686, 178749032, 257695016, 714018516, 472708243, 782289684, 785010736, 673452130, 967313791, 416615851, 594708501, 823838568, 374885539, 520875465, 462873691, 866641568, 110422771, 371334024, 597629306, 954905318, 192386746, 711820060, 202869372, 886359460, 670157944, 884126969, 502946720, 582271977, 402610790, 343533084, 511648372, 517557636, 170605372, 597697292, 829559995, 983984749, 601678152, 265076525, 200313780, 586898347, 936910249, 473920775, 97417050, 844866738, 973357211, 106398807, 531568235, 220592830, 72245680, 709223174, 966562898, 364453034, 204299565, 516186616, 388239153, 70201813, 72763421, 794896998, 14537122, 759848271, 370782607, 723372604, 610938893, 161728308, 212501210, 376508968, 271352258, 323852567, 552136716, 801650724, 615740271, 208656790, 224034222, 747809272, 617340476, 153891047, 285642015, 901118362, 123777425, 16228193, 623027527, 937436377, 60747289, 714381298, 882770713, 15381170, 999192137, 197256049, 480638655, 953137460, 883599778, 148656904, 722191509, 39402136, 582147050, 757441169, 260428827, 253172482, 508174417, 834955862, 157349819, 261175551, 247577251, 264652493, 595186522, 812752039, 875384578, 747313263, 224431706, 462673707, 39074204, 237357876, 896371707, 361524710, 10299862, 761952483, 924315000, 304463541, 831385606, 228637562, 845205390, 599099308, 177524018, 209006125, 256908838, 355221513, 792061054, 713446694, 397486564, 756107839, 527866716, 337624854, 575430320, 456754471, 959728018, 921786900, 102983773, 936936381, 473475121, 131588049, 189268154, 863126769, 700571091, 871530822, 832046604, 609629520, 45186676, 853387560, 464311797, 368430192, 151536782, 691919878, 176735598, 972465597, 804610607, 50289062, 722819065, 20410813, 11987321, 648373171, 889715409, 778512390, 280809979, 767453391, 155472064, 275305459, 296611231, 377220752, 229158487, 259857310, 987705391, 873889855, 448418244, 657467052, 301028637, 400332864, 304525446, 853531448, 201469133, 757430782, 288842043, 292821474, 389580374, 148645279, 450672899, 404696472, 399758661, 549392647, 972607841, 459482261, 344863732, 405989209, 14412475, 913865943, 988039851, 302203080, 293916756, 28383491, 502818531, 791480646, 619991127, 151573496, 311251301, 362738947, 457688580, 884177111, 390413172, 889218635, 530910268, 818241216, 542232757, 765042883, 885001834, 10229128, 574524301, 836418812, 984923781, 235783687, 868003012, 379478756, 832878398, 751487743, 496700139, 587857943, 624473538, 510088706, 778144708, 214176553, 953029206, 646822434, 252787767, 281229254, 401166205, 434753895, 343430684, 941989547, 465870277, 861407908, 387687010, 216509894, 375279811, 453878600, 982073623, 677731113, 95924240, 198468867, 861679672, 204003039, 472066136, 228890861, 880462406, 133638984, 924365283, 274136081, 742318625, 898640542, 85174164, 775817726, 982947180, 716729952, 1, 33, 592, 7564, 76624, 651480, 4814916, 31671996, 188578368, 29248753, 200002145, 508415428, 442411092, 823607844, 339155380, 84465338, 814093820, 347929398, 722645092, 146033429, 312847170, 460125097, 915837300, 530134554, 683613860, 22911398, 950166343, 297700883, 874171812, 779302544, 705201416, 91735442, 764568060, 448540109, 794383951, 50664826, 501387621, 764478731, 392332791, 697065547, 136584719, 904822171, 811342153, 498086442, 66346910, 903864157, 648069920, 294527566, 68277872, 192952288, 465503414, 89641650, 342876181, 975687654, 849073744, 732768838, 299144725, 960087859, 432060633, 521050995, 669642411, 783220798, 964761936, 888496451, 578822675, 774117896, 595815330, 556187991, 328078421, 497539038, 461150544, 593197759, 454579240, 228665398, 675695769, 189021504, 506127036, 683711210, 767254008, 372876392, 950363733, 781425867, 518441353, 618578159, 210702480, 146366158, 211092828, 25645664, 252569415, 768287264, 315751220, 46304131, 875313001, 63062094, 41563387, 521548621, 882111752, 325592507, 674715724, 754661696, 386558110, 154963091, 238088464, 48050421, 639662963, 70331570, 315682289, 290604457, 553625701, 114470501, 286499320, 302628334, 934963054, 90280656, 946037777, 701374947, 21339121, 663053978, 944685826, 452543047, 117230904, 560747251, 199227363, 16627409, 318622953, 147892287, 924956445, 813803967, 785002825, 524657750, 94619872, 228326183, 399365341, 370689535, 675442405, 908504726, 873312142, 624281896, 910865167, 214431914, 356568789, 649815619, 48684312, 203060656, 723151845, 388405201, 798060040, 729614446, 977682164, 533436928, 146813819, 149571082, 895803037, 777214043, 552248021, 204656845, 982800841, 733286978, 63964308, 481147156, 389291330, 76639625, 311176854, 441157810, 671041225, 83215916, 462900391, 792922861, 933493638, 911064426, 640299582, 658369868, 816565473, 95242536, 385493380, 848295064, 737403618, 437312030, 117969370, 718173112, 995019578, 309321859, 756181744, 40101942, 426476878, 702396178, 795715493, 835764511, 743326504, 209546865, 430615231, 826070511, 334341237, 118979238, 371120144, 839568659, 676120384, 72519, 845333099, 357629799, 910834209, 593346831, 104377605, 380654497, 634970517, 115890735, 793059350, 887063630, 651636452, 507749972, 783577804, 143656503, 242083869, 911105370, 970085702, 524972130, 465698950, 325374351, 536364599, 196104291, 139239152, 633851401, 256158579, 919175466, 894613648, 315818683, 5141779, 876022828, 934709255, 681050535, 191918360, 662583345, 207316521, 848780031, 272975543, 702356884, 769886013, 961041057, 6500208, 70262300, 494310602, 739703998, 384177576, 343193798, 693062586, 969762392, 66952659, 685150241, 630304511, 413041585, 515441116, 191001103, 912006289, 473846745, 605301455, 795067847, 856671001, 508821454, 735406667, 258084054, 117733205, 780290039, 23367661, 593944851, 692132515, 4650353, 187487602, 151055135, 898863554, 673507355, 215091232, 603704193, 594167428, 682519378, 496434131, 965159536, 430378180, 248402836, 470772870, 307340881, 347656961, 749714755, 122062081, 558277910, 169666679, 941915597, 277380477, 270070849, 652088255, 549544085, 1, 34, 627, 8224, 85440, 744480, 5635892, 37957128, 231322416, 291965329, 678229698, 199102832, 733159273, 432255582, 825398987, 945721657, 530531857, 605903605, 198451639, 405128341, 881104650, 95712824, 87475937, 88052462, 854657880, 671362129, 345256719, 279913923, 405600244, 791623773, 184158289, 548244621, 559931899, 811302745, 822463013, 829884052, 612803610, 114370483, 717655175, 250670751, 158660853, 996989593, 922821653, 403693850, 640224917, 726696528, 558324649, 504260316, 457498775, 235424755, 214797729, 595578763, 703649058, 668639597, 273743575, 830864733, 8621856, 152359528, 351252345, 54682531, 631863641, 533130514, 548187372, 212107229, 690348600, 269650465, 644636821, 588449397, 716956418, 569059993, 571818753, 620732748, 238441683, 628780105, 73251606, 77232245, 265685085, 860541096, 181038883, 995121568, 787161997, 984175916, 994855981, 70309595, 279951259, 412871815, 881913054, 268261177, 575207129, 196951994, 610045829, 705950877, 200402175, 179100085, 912730914, 795237101, 264189519, 756871237, 840795855, 477498958, 568161700, 101820158, 478938140, 546807900, 824972458, 320572966, 375535061, 712736750, 146215080, 296045377, 892271196, 198915619, 973312163, 292266224, 766955048, 774760742, 724672108, 189810671, 590576941, 955913056, 705860403, 956268133, 120026477, 977289531, 897970234, 594373646, 802624855, 16139526, 294245189, 661099173, 505327457, 687552139, 570417673, 288750674, 928298666, 124243321, 103493234, 782666425, 810561902, 479140046, 567654010, 66398299, 87173858, 171094018, 401077961, 201022453, 649177770, 751032860, 458665510, 583069945, 3741921, 644139368, 777863779, 427938859, 574083500, 968708036, 5259009, 14753514, 566158894, 428971413, 29779639, 601893398, 934948155, 463945886, 442386091, 787098075, 294593703, 467511028, 998601384, 749411810, 495421040, 283658473, 287441865, 687819162, 964614928, 353638623, 648210867, 238886215, 893364457, 158958124, 29345292, 800368429, 595552294, 572640574, 913495958, 705720935, 850127566, 83220185, 799386246, 848828465, 335228800, 498492912, 819731260, 972790229, 191002130, 289923062, 997108332, 479589354, 13686350, 377632380, 915241611, 38445376, 115515812, 312111610, 862313776, 36444206, 491509332, 899038496, 494299749, 577210085, 925017398, 377889538, 129014425, 544007299, 134491550, 77644047, 150186363, 549177782, 243194000, 889811949, 476414356, 302027816, 934223010, 116351600, 936035078, 728736728, 99057293, 233685532, 715949090, 484999785, 527817757, 40017975, 403976200, 963752121, 230480821, 165554215, 501580240, 480519751, 374582722, 588438105, 13652788, 835399525, 909982574, 63720437, 165170490, 768431894, 385829327, 268804006, 950180874, 398363435, 512876602, 149304949, 858796870, 305796565, 80654592, 209088881, 365995652, 741417209, 580938286, 849913699, 209592153, 430983500, 292682916, 89781822, 346251985, 899920810, 490814818, 319818650, 865676138, 199552930, 49606030, 396988194, 289382805, 394082926, 680976370, 125444750, 312554820, 11884810, 730982055, 36906819, 144996838, 532313029, 339360681, 509568859, 763509787, 79118993, 930179491, 756170211, 627420026, 161269793, 542072728, 498021200, 392693531, 523036960, 919765468, 367278574, 755839168, 466305341, 613534367, 534169086, 166110829, 107021592, 280650539, 268761091, 590645300, 269909358, 234042842, 1, 35, 663, 8921, 94988, 847688, 6568888, 45268120, 282195928, 611807809, 518705216, 990050297, 271051698, 122408000, 405189613, 94926808, 864141322, 53735275, 24011733, 736554738, 929218491, 904644261, 780020466, 504939462, 734736582, 905177688, 612557341, 964587741, 714487014, 841745335, 939266470, 221175663, 553510265, 427922711, 816845808, 551876447, 104782423, 432788437, 75343637, 98990584, 780296494, 401590023, 184896774, 39759619, 46187357, 134251301, 342702573, 517720, 358976055, 583636644, 962541900, 167548822, 161325057, 550357824, 277594189, 165080443, 231182951, 735855208, 908711807, 571176463, 42569340, 237272417, 790920442, 624258522, 720842250, 768667158, 451444080, 122083868, 366641147, 308868590, 806102171, 616667978, 212552319, 508058403, 321794596, 570313528, 460066496, 737582233, 710064955, 691296552, 63281621, 675218599, 955697061, 110510427, 512018248, 153536802, 745040214, 175960352, 594730127, 864516601, 686994354, 671193730, 758082482, 651219990, 268055455, 209604272, 794711886, 922988292, 233697499, 855180879, 757331520, 952855529, 712373324, 501054908, 610479660, 988305583, 359797155, 981016202, 392046260, 222705767, 339379031, 255395660, 760704862, 824907580, 377018926, 100950434, 568292199, 345612839, 702169410, 76425882, 316244660, 633878521, 345805531, 43908232, 498746978, 171201976, 618174067, 828038701, 451921110, 452033897, 911744318, 64098066, 83924105, 595571257, 147937863, 948006101, 514496555, 77289879, 282007238, 421799065, 804334778, 765393189, 193008022, 263503242, 355816072, 278012511, 227861525, 902054870, 618486736, 979710805, 971590402, 61042704, 664850817, 113175896, 488535341, 617582794, 612947413, 45804546, 259073867, 263038734, 265569066, 162645795, 60875191, 359494871, 979749311, 139358127, 29529290, 309151363, 279422923, 345089768, 87598058, 700337527, 479652910, 994907927, 933976635, 324751070, 167729179, 810904540, 230096199, 33195878, 559883815, 674302503, 158162721, 997344757, 974400760, 476723636, 933671908, 372458552, 487353300, 603836216, 903251923, 461631785, 620155186, 664707969, 139328434, 135802315, 547850780, 544085832, 243757336, 714792500, 277247444, 736724545, 7257213, 104433298, 33077964, 133546300, 658470668, 407613385, 15549086, 409602732, 220607605, 154437658, 434924060, 212726357, 432662346, 953726155, 55947205, 221865215, 896738564, 702917595, 219549259, 784888336, 998968443, 737927890, 111474776, 479544893, 204531672, 722344756, 339644359, 296335713, 172390948, 145219000, 740849986, 175518952, 876047366, 775536223, 909308844, 333180421, 96764559, 528034987, 396799645, 413114766, 622993858, 563074288, 710510893, 900874806, 315196225, 993816000, 623166550, 642968249, 328645521, 844280596, 556521945, 272458659, 580772239, 284457451, 186994948, 909094031, 935768265, 319893231, 114481887, 109302906, 586737223, 466388545, 717893242, 342269015, 164207650, 394855609, 330099455, 836592042, 939058426, 541984626, 852636994, 524042858, 358495217, 921118657, 464191254, 284341637, 363378706, 679058686, 917272314, 562488937, 105215359, 614330571, 404183151, 365378837, 280141835, 594380252, 79371576, 739360814, 210010442, 10232401, 449147207, 97531383, 696215921, 900156881, 51327507, 224992261, 946786023, 685932368, 729503576, 741723150, 479111191, 872812474, 454570174, 217639787, 553029674, 745481673, 194164134, 241094015, 672191097, 520725696, 177728245, 485102929, 511421076, 349030122, 157631252, 431267952, 813510823, 604978728, 799539100, 871169236, 265066919, 191499414, 52282294, 1, 36, 700, 9656, 105307, 961912, 7625652, 53738944, 342470612, 999200441, 797070294, 375863958, 9523173, 166271514, 481765400, 879554808, 535680694, 467340394, 413500052, 692064693, 580959888, 369347871, 169821810, 621921924, 137911737, 940784828, 741570244, 905517670, 551817302, 657369119, 721648393, 536831850, 500879720, 726253305, 296162041, 891225164, 880747817, 182180719, 544050763, 654393489, 357200480, 356889637, 635049309, 374948412, 486169649, 407475615, 51228607, 535369936, 325305756, 74215114, 944988254, 919680639, 647644667, 526651696, 763479161, 278201627, 103508412, 387580497, 561661113, 38190290, 310583115, 569811056, 351262691, 985051203, 403138813, 643132429, 289980808, 570569544, 550559442, 934893929, 352045239, 810200946, 61218795, 42358563, 89293505, 506603831, 400595820, 117891860, 469015294, 166372283, 320554017, 155147268, 955469333, 896730515, 826039051, 931193995, 36098122, 893366407, 522834450, 917130400, 759016216, 23584371, 48884561, 844352920, 604253909, 886656394, 548946691, 688504947, 972899398, 721435398, 409845929, 399680456, 284950632, 796741351, 217452678, 611033399, 592790059, 219084711, 504058472, 277505825, 120276345, 694287126, 35416589, 305976723, 447309020, 969824889, 565684997, 62139306, 857693940, 901163636, 262850397, 927594387, 721909425, 958991660, 471789360, 260033992, 544270783, 877013007, 153311613, 85679796, 660447085, 213261352, 954007371, 8266647, 75417194, 28241545, 733410215, 579803150, 41901427, 876245480, 900022334, 813145019, 668096269, 73987267, 175135030, 724217744, 139403302, 77167168, 775504145, 397863476, 816272710, 221129133, 242347768, 885383757, 728565085, 947647994, 605379205, 598139075, 269419404, 178994132, 603450690, 652850980, 19254430, 182635911, 57268581, 239936865, 878358438, 515315850, 141611162, 665647032, 700517198, 807335907, 965806030, 897617342, 773532343, 924389029, 419741954, 420757062, 581633294, 179995348, 34733596, 923518220, 731757774, 573741822, 531242380, 813544540, 336821038, 442738016, 551572674, 470067223, 638102335, 989538200, 956007535, 613954394, 401563904, 103519975, 569290006, 144046622, 689996849, 638589501, 358099514, 725282594, 691632053, 702244532, 284031792, 473014945, 465414316, 116886234, 142777936, 342518645, 138051544, 347505254, 57716395, 939744642, 114873890, 359397343, 671360195, 724489266, 683013222, 345781236, 550104449, 877003874, 63443231, 224660360, 658626409, 133687251, 933261032, 273131705, 48202694, 144323990, 559827621, 779609382, 930553156, 35267489, 493151974, 645090534, 517431516, 368634145, 540405134, 215255527, 144656993, 549192120, 659960465, 217236722, 742258783, 538378955, 211409043, 760044403, 389330065, 692548510, 583181570, 627949137, 829194932, 234693932, 651493437, 707321269, 828284674, 652751037, 873736576, 267300299, 729754896, 429920674, 875733754, 60888792, 225478637, 39002446, 407176220, 761384762, 131879783, 661443680, 51638267, 568172852, 186052558, 637968267, 556455031, 313451921, 238551452, 644714578, 449541818, 640800540, 923965193, 38909678, 41940756, 338485997, 888949941, 526610135, 48150535, 778944981, 480892059, 874500608, 900322190, 973783674, 468787609, 618167632, 913754856, 327797543, 845404908, 752246622, 831422464, 484541178, 501948673, 647306990, 882577308, 771072569, 171273117, 620085552, 385025714, 126556571, 472404266, 664907284, 284895728, 860747643, 285481155, 480968189, 426457284, 579997870, 253315436, 264967992, 325506073, 407074927, 289125366, 710111895, 168902913, 39893459, 264014099, 335462311, 284068808, 624620216, 265346008, 330183605, 301153063, 136165951, 223572391, 416076696, 791322793, 440956632, 812128221, 56870528, 529001955, 157225171, 153110824, 659760559, 934444871, 1, 37, 738, 10430, 116437, 1088001, 8818820, 63517016, 413577336, 466132154, 602224077, 950429493, 571044537, 948550192, 759622519, 360792951, 40404471, 549575252, 331339348, 353289303, 642561133, 959520386, 811439523, 113998222, 306747368, 686402540, 608623079, 625536502, 102898449, 513583096, 310389938, 861964034, 144673299, 459932354, 368865341, 656127608, 909171212, 807159815, 446679967, 582385365, 827063804, 980667706, 264330272, 600794253, 740948802, 906942889, 945728377, 18846332, 985664112, 7701519, 115050801, 870345183, 606442987, 443069595, 817056595, 621418778, 690512206, 255049968, 161633922, 402904753, 372549674, 317848199, 779510849, 454579621, 366999138, 955388684, 940196190, 710141532, 289889641, 400266971, 473006189, 518001144, 203532149, 277752196, 73653399, 957077834, 580796815, 797359407, 33679102, 974181950, 229170666, 221016673, 753153481, 718492334, 480056326, 134801483, 829292600, 87160542, 624566954, 157188714, 912350324, 248797376, 864861712, 311625650, 564724833, 638897879, 211767349, 670618766, 182357348, 406247054, 335828971, 235855014, 766599169, 873180801, 943988159, 797515463, 949064434, 37355164, 366387587, 992037332, 39085136, 457008562, 710738441, 147115812, 245127944, 221285308, 44913339, 750687382, 166494925, 487773254, 2533400, 294773545, 964749926, 838352064, 354747747, 983055334, 906311260, 773970452, 136280712, 732037766, 304757958, 868694356, 9717274, 686595153, 845171773, 715645486, 457517675, 868876321, 257821804, 398717354, 952878758, 459394839, 735151005, 982831573, 597714383, 483469574, 396276440, 147004054, 275175512, 449695021, 280047682, 322443740, 657859781, 236891682, 338855034, 771308208, 208042945, 611383416, 470020781, 959351211, 871193372, 314812327, 417008584, 157794928, 30304137, 772193806, 92880268, 735754383, 725090032, 678769251, 695572650, 713627047, 220917673, 996272940, 711499227, 615337951, 732510553, 265860373, 10346269, 946167168, 327969286, 691646116, 588894836, 556718107, 891256057, 29035235, 193826291, 413628097, 951441661, 812044940, 432676044, 866499015, 139084375, 351784477, 900166473, 781089061, 914118385, 818686834, 857340116, 329139077, 237478891, 284468211, 215304591, 458481845, 227432873, 865995208, 554027168, 463893384, 221077016, 374577314, 119759917, 360383422, 704486222, 404678036, 137104816, 809074680, 755219457, 826569646, 867839827, 768754773, 89100960, 257194726, 724398193, 973188469, 858913715, 18463743, 680309520, 450458743, 140048366, 764912130, 371007014, 456635116, 735728421, 778688084, 152973997, 434969799, 574794869, 212648988, 728361716, 542931287, 302379989, 751579729, 92390154, 220181191, 407743441, 315151252, 520426045, 407908622, 679231575, 395003916, 794034847, 347654216, 68808817, 829211530, 81601558, 162714123, 30761100, 394951130, 268715057, 283612447, 241955302, 623210420, 275963878, 159211117, 252162685, 595441437, 529655660, 437222092, 841111836, 179960886, 135660761, 917237477, 768051317, 444580903, 506791801, 487181239, 875489229, 680194597, 205928376, 680445786, 683783933, 969592088, 132367844, 396994570, 832926454, 630581401, 505495558, 385734337, 641541057, 95095471, 989574773, 911275608, 518514268, 282262989, 419271827, 469001628, 420271862, 947083037, 407529572, 59976989, 434008630, 863717239, 945875935, 75676474, 215313835, 250745830, 87811894, 264747800, 37018493, 98597371, 710706515, 142785594, 391940962, 336466122, 341268838, 21508490, 413865364, 232101532, 92701632, 8053527, 412757119, 757312194, 403681966, 949009531, 880975038, 37050684, 272465075, 678404684, 193438246, 672480427, 700064004, 142628578, 802581416, 279140871, 973655892, 800905741, 598005728, 935768930, 668573394, 207197197, 649003003, 270174246, 76144766, 315632510, 875459369, 359185050, 528086919, 473525359, 758981160, 249109513, 189948776, 344668617, 795917722, 549344159, 348920520, 486734532, 302843834, 285724416, 810790165, 350603652, 574459989, 873908008, 1, 38, 777, 11244, 128419, 1226846, 10161959, 74764168, 497121432, 26344483, 38234873, 423642505, 376339808, 863392989, 917340710, 353019266, 355701734, 828153534, 204362640, 374924405, 607928554, 963790885, 940721850, 687219775, 764705852, 876861874, 763291630, 981930457, 551085656, 980270580, 505906881, 983294521, 135354674, 135665519, 630173290, 212355830, 143623144, 227056594, 817242891, 163435465, 418550307, 731605596, 289566443, 285968813, 433396374, 290335437, 260134359, 257166798, 296375223, 99595679, 459082068, 507135523, 972388714, 133158519, 975205558, 982374421, 644050428, 996778111, 162109063, 746906113, 514292299, 926426755, 356009260, 196659267, 409916170, 325494529, 655002543, 558511285, 36446396, 471095084, 174722764, 671116976, 160891233, 868903396, 304037581, 23612943, 337881011, 234387037, 370561646, 356075504, 698718914, 535181667, 514726084, 815242029, 608023573, 448544035, 835833664, 991058290, 399256230, 20531824, 669361826, 539724566, 760387110, 830813942, 547045707, 178050500, 929198630, 6813905, 110412371, 858816899, 809729618, 833864785, 232951975, 485491061, 613385270, 553071180, 627954610, 952757220, 692906182, 748961577, 662247263, 52513186, 149763764, 145530822, 33882391, 453364543, 997405166, 992558694, 759602854, 84367345, 100239977, 854081961, 858205595, 486024240, 91555639, 177882871, 949083392, 519037398, 556513157, 228484413, 492836072, 589348909, 196163508, 266626335, 11245627, 157404436, 270481031, 638406640, 490889097, 527976504, 370488458, 823400678, 322868722, 206357234, 647142926, 768625346, 265191551, 148038615, 363341916, 267722164, 893118504, 738977503, 565582757, 762106365, 849369394, 766495732, 13155357, 515888816, 523640060, 647203814, 437352666, 546684558, 961386555, 7614498, 893885274, 936701598, 428062192, 113231261, 402917050, 409965843, 165984892, 799921270, 659405770, 509144023, 774701607, 842603658, 487390464, 251731862, 581859608, 922860080, 258383681, 201597752, 292594441, 460903867, 638298912, 848020590, 765105850, 965506327, 844776867, 575276415, 85481014, 653985938, 197424999, 197600210, 989591463, 112466859, 918937916, 878289962, 30252094, 561367106, 701604983, 794157139, 205106586, 358551581, 218730442, 820317821, 718077344, 742273426, 343977802, 723940137, 91227055, 889419899, 835334285, 445942872, 874169472, 806494972, 841559090, 34902341, 936247116, 742348345, 932764662, 776531786, 136341990, 609226011, 962126351, 692609037, 492230872, 512261831, 61424189, 202712100, 557188069, 23267751, 10862209, 780311892, 698216821, 610626474, 445698906, 548927052, 791636623, 278469086, 802570473, 843652647, 214889050, 950325814, 545811188, 732525066, 799299048, 547938769, 119233118, 836166054, 515368215, 821018309, 703809789, 385697728, 474302192, 326687407, 701322950, 753939342, 860741461, 608860184, 481069405, 497217661, 107822505, 538149776, 65872865, 267685484, 630211463, 833714775, 127007356, 988488267, 704390393, 326686679, 330510067, 968474337, 860095258, 865223840, 3530159, 602833824, 943838253, 510792598, 862215682, 804647558, 57277705, 379631476, 611335785, 827032941, 500396827, 166974973, 950996383, 97277257, 336237474, 527425945, 836169765, 13569792, 45600126, 103702022, 589110361, 158793934, 917834123, 750227633, 450511448, 228174293, 380815071, 984828008, 35225572, 19924799, 316530723, 169463852, 11894443, 83625994, 27918722, 725825514, 510537357, 901592447, 560692763, 386943274, 409576331, 409681305, 19743037, 901841314, 504205848, 287987501, 95070522, 999713439, 52172335, 458657276, 716446234, 960325619, 967217606, 29400294, 323715881, 571473809, 542099425, 838958945, 826022366, 215456133, 111542899, 27057122, 264098733, 414451664, 367598279, 660361161, 317432327, 788309656, 482969647, 453723335, 307123116, 46250346, 156036134, 550671015, 501877998, 918162544, 672414507, 744250791, 519150731, 449335541, 717241257, 798831268, 772517138, 286300330, 910111510, 66350225, 850058429, 996528049, 454249733, 463645138, 33673728, 195487971, 700828817, 25012182, 447505308, 968790402, 312778627, 684898658, 698549052, 965513947, 825161447, 410399245, 428579579, 669192144, 82412074, 1, 39, 817, 12099, 141295, 1379381, 11669611, 87657665, 594899060, 695536795, 226472285, 640458905, 794561570, 378189352, 472728269, 218438573, 56516519, 255055733, 845027144, 588332091, 652544873, 575593478, 251899261, 421780632, 446749115, 397384403, 967249876, 562965804, 307548860, 910064219, 267557957, 532097834, 694036707, 378870548, 124206593, 109699395, 5415029, 722948552, 875697847, 694452268, 7553293, 132421363, 106964105, 391245927, 870340375, 243365738, 69805673, 199865008, 75486973, 171179760, 109991897, 220793643, 513746719, 106419838, 540171765, 580499245, 759007158, 982900537, 645687882, 590392656, 601803737, 221575615, 697448067, 153409333, 368742411, 593478736, 779784392, 983542304, 533669091, 167997680, 729893362, 841704349, 760614624, 47743042, 998724205, 972938209, 77600320, 536850090, 695359058, 769331095, 966134679, 528777379, 695035445, 387545073, 911151592, 242062595, 521446824, 889535341, 920252167, 112865832, 806555197, 118151259, 625842139, 701618487, 790273468, 694977537, 572862214, 473466414, 246109368, 48621359, 353657541, 554932622, 499105369, 867797665, 487345603, 842033962, 519557065, 245850790, 335288378, 782811146, 892240358, 338051309, 826545456, 41171254, 334148733, 152569170, 144665017, 941279118, 897754414, 89241104, 416864510, 41530804, 299074740, 73588196, 959211062, 109470038, 500259918, 366443802, 403320596, 183957534, 992196343, 652194487, 652679636, 980112362, 896443763, 694053263, 85474084, 793481845, 36502549, 113761902, 13660255, 295744749, 768030597, 559676644, 267907464, 329732897, 34721556, 481917917, 470669881, 496023609, 35319413, 426881953, 436183525, 539581676, 797395436, 949513087, 636400441, 684066319, 283217124, 456809507, 742722246, 708837224, 1825110, 845476655, 721485134, 509524702, 571748192, 313097600, 164720049, 83489702, 463694600, 122519767, 438333196, 350973050, 742760174, 292313656, 699166885, 733491013, 480543050, 245749577, 741817620, 207993307, 244579067, 622422144, 604751887, 899189402, 151409381, 217727618, 880477312, 214663719, 394263729, 196688383, 548030201, 726215545, 464673145, 261250632, 625458514, 838784252, 982491280, 700533618, 585918514, 160625577, 639912412, 329107337, 639996475, 820595096, 822718095, 278815123, 496262265, 918547360, 8027724, 726754416, 823448457, 260321413, 863184482, 650858805, 276099402, 685460415, 954079520, 733965175, 676833996, 368637623, 143549481, 304621819, 472579474, 749596748, 116386311, 410243381, 633945382, 411647917, 177570608, 616578162, 767744928, 61290651, 523112125, 276619822, 15151789, 253528389, 167816966, 891846580, 541892511, 341041750, 391023167, 293092921, 243156326, 622723871, 473135257, 726189187, 379573236, 555335821, 257038714, 482079083, 723871307, 606515981, 65251208, 632383753, 147352575, 594192641, 924833549, 483314326, 808069004, 770319259, 427864560, 25642674, 464671587, 569308215, 637300329, 923466624, 23057035, 86870702, 983746124, 846059215, 574808201, 554549209, 446310553, 959681948, 778636627, 211592095, 516682914, 291911580, 587928798, 427680003, 894209596, 866648165, 679666232, 460484096, 854394115, 982195268, 822495481, 835383529, 431162040, 830468499, 195346596, 57036658, 866149457, 860543178, 818146210, 279107618, 892401239, 225036974, 868558986, 685134666, 744469605, 156127522, 187537334, 788919638, 909025900, 672187019, 217419201, 384265406, 616374282, 378322214, 141913342, 501653295, 461070473, 25985020, 589549638, 109433868, 888240019, 931367280, 762349235, 234613827, 765084315, 611038359, 758764450, 286873014, 382512476, 382119459, 20294058, 943700532, 211933192, 58390954, 180966724, 929698288, 805610393, 509211182, 866583662, 775212548, 88368846, 726939816, 185342247, 229877142, 705155204, 200856219, 36832958, 610458570, 660966337, 749737121, 592806565, 894272325, 480779946, 649154472, 88597955, 74084666, 744113332, 528684751, 282107891, 100372245, 756922141, 58776739, 981772435, 924634098, 951039927, 397719622, 577729727, 762973087, 736969640, 674672356, 297937804, 986319572, 149411109, 496025335, 118765897, 173573997, 13186371, 696131467, 139811703, 497652080, 238358226, 252091863, 126575962, 416549513, 112043953, 769546766, 210139961, 218718185, 975953506, 930028805, 845629302, 57030776, 852433935, 836915594, 400219298, 622051773, 829969111, 114603161, 10751254, 909008878, 579282117, 214070865, 563200757, 1, 40, 858, 12996, 155108, 1546584, 13357338, 102391268, 708914679, 491589996, 307979410, 602522471, 317222127, 290284759, 54099411, 989042041, 349750818, 106531062, 706143382, 63807262, 819412921, 144007031, 937903432, 671633208, 144280187, 535961584, 391683158, 665684992, 173615217, 173957993, 353557533, 689224661, 70346145, 249590014, 418977958, 826283746, 394602103, 916349862, 513826761, 491750575, 183159109, 757685121, 418341803, 274891227, 642914114, 790796259, 588464975, 740365449, 551222753, 10565934, 35820801, 515689568, 211177017, 828019707, 68961130, 155306993, 295844962, 698696703, 264483577, 967049520, 615265667, 559761896, 719262960, 509462378, 575657367, 591920899, 676732702, 723371825, 327050158, 311506131, 94078284, 608080285, 992236405, 137506625, 399044419, 458634324, 553334522, 801149022, 685520978, 446537546, 993927587, 293142441, 349812890, 364132070, 129851348, 857298051, 877404263, 877505804, 63808796, 43779853, 597054006, 757518688, 847719064, 814336009, 295491019, 566317327, 427355879, 99632937, 271930495, 211594531, 907085661, 370381473, 40651392, 893659649, 363630034, 486697292, 957988008, 762036357, 927839193, 855832860, 336383816, 307639758, 266751066, 682795763, 757933830, 702637096, 416587519, 241670221, 803239702, 991067388, 753770489, 69318095, 379601638, 829408102, 918333643, 833524181, 647446668, 999853061, 600717076, 736359930, 166694847, 912637361, 883248816, 334184966, 360770954, 907814459, 571070899, 760625736, 543003305, 12232839, 27415041, 235755079, 155935992, 895456358, 299525687, 387663753, 430722193, 845849975, 389897647, 157165043, 232374231, 709459451, 819494807, 873294798, 982307907, 723241456, 529916420, 190269000, 832006535, 157577121, 119818595, 751958343, 818604698, 923214476, 455357809, 664208514, 204222119, 358021985, 507909159, 532713722, 447934290, 550255949, 9030523, 204809569, 704696131, 798537153, 779574805, 146334295, 422444856, 763243391, 968318292, 409596303, 730176788, 661449533, 145680243, 291092743, 406566554, 840725280, 859336604, 385485264, 540592314, 491573347, 430591599, 799102625, 349645352, 953856191, 685505744, 968883032, 548153198, 991972402, 298640488, 335784052, 560792641, 200482497, 534424478, 835919822, 256133832, 789502694, 815463653, 367192054, 711296060, 505894941, 749371649, 586599852, 478956964, 771301542, 936596369, 641013477, 895880622, 275251735, 709512313, 675062513, 900057226, 864601515, 604121575, 213439255, 718556713, 352300658, 293209273, 62461535, 212741657, 925233457, 601757735, 357273411, 900952265, 337965737, 654516053, 138964736, 683012438, 388413281, 151113816, 328964247, 191920444, 84786019, 179152386, 346561188, 643354711, 718267295, 169193229, 252223726, 887596939, 657097686, 142103925, 40078284, 150004901, 459569297, 459199105, 789641065, 6481222, 858687076, 375816137, 147145108, 520309635, 748217920, 667457550, 716254093, 186260954, 725808394, 626037945, 743543562, 764478177, 601933842, 797462265, 777370200, 654651513, 156072819, 707272486, 178868661, 27986290, 925976600, 457000898, 540704905, 843382395, 769084631, 760118502, 476552208, 749317409, 710185045, 964800796, 516878606, 266237510, 913933501, 813693982, 336046538, 762072594, 997287607, 756174558, 615699332, 325935068, 478725181, 294206110, 71125626, 862744505, 369229533, 687983312, 908265361, 496504119, 960935105, 69879109, 315010091, 778995602, 757128123, 249975621, 699329744, 984761141, 255696873, 966070938, 214893935, 551564463, 316442626, 532269369, 314110968, 128028415, 969165598, 561496103, 817486578, 282697706, 480617072, 509205119, 834540584, 277705122, 660874354, 778117470, 366056531, 831243822, 903068403, 672944646, 441340373, 340680954, 617276976, 849516577, 560088434, 230800586, 10428026, 372559113, 922230949, 889642650, 244184042, 533938488, 841639506, 817920213, 336934324, 44823033, 565545678, 701086145, 241957483, 114182239, 850726147, 526783422, 115816117, 835376982, 659266467, 815849396, 168028335, 255187925, 748491938, 622185783, 663040863, 743392515, 163408177, 383060357, 31556416, 794030948, 934245344, 258437764, 379321408, 40236316, 660469577, 655665845, 690942361, 375378322, 568352979, 602028119, 317437606, 657543398, 100015852, 252684947, 481051042, 964341166, 522946308, 280791483, 467949044, 475945690, 972019230, 462068105, 580258224, 819125286, 65219413, 675919204, 938373431, 246074242, 416112669, 990084376, 992206586, 174382581, 694468435, 670357482, 52707698, 430228891, 194064984, 374269653, 873105421, 89789806, 360326019, 422866288, 247972613, 990139142, 766813630, 25619403, 929658745, 91230876, 1, 41, 900, 13936, 169902, 1729478, 15241768, 119176344, 841399673, 434809990, 446105964, 492649140, 758977149, 206041682, 323715565, 660084286, 595902939, 912996958, 734408694, 639760787, 253066665, 208103163, 518638879, 141246298, 316067064, 932295902, 638352197, 835906694, 518593201, 772224592, 710767801, 155069328, 87760296, 888628863, 85616127, 159719113, 852745152, 116208329, 603162784, 598162586, 214665773, 928212607, 364268988, 422947444, 91651894, 294508512, 306449339, 29129368, 721764444, 23720919, 155935808, 134434641, 906918132, 581645037, 673925534, 656820458, 712140580, 940311261, 639783029, 193680127, 625191701, 485391283, 454129733, 912047676, 531795443, 151893083, 16212124, 506754047, 491882623, 143293012, 25311790, 265858487, 730580376, 281408346, 313354998, 904477185, 246774679, 76212745, 790588368, 952519623, 156839403, 194467618, 872887052, 91963369, 534129628, 238356180, 632320800, 58443419, 722943306, 618550091, 33518175, 519583410, 960079192, 538023159, 305123951, 486152058, 294482726, 518323725, 455607677, 182021187, 748135143, 512410493, 35362801, 719659644, 317014598, 528329960, 583008290, 443175574, 659178079, 174647583, 349497845, 577399146, 818913619, 271472027, 656817275, 494680790, 969710982, 229444476, 267631925, 175671131, 35511369, 58752774, 135202754, 944159958, 464206230, 475819996, 314325811, 754861491, 276808552, 810159244, 91192489, 626570800, 590621471, 514780234, 305537247, 801654104, 149383516, 787215362, 114530579, 859617326, 613074050, 468568467, 919259772, 617744284, 340905322, 985953212, 372028816, 217079653, 938494776, 284906842, 769978385, 515786223, 285120775, 375534381, 675385916, 665832700, 133450834, 3874364, 408375526, 770616302, 276273159, 413928636, 723794836, 198571707, 678091222, 296508406, 529916658, 588863591, 413257244, 498474249, 915935032, 120501359, 836927142, 230121084, 774509032, 870826787, 489996192, 917057075, 196187219, 383821852, 922336284, 22274995, 748507616, 607632780, 183109949, 339998525, 507933598, 698781318, 498085612, 803731847, 473820207, 901546035, 302928184, 865394080, 114078163, 2199878, 779942965, 594445523, 91527221, 272107811, 718335802, 365412741, 52329171, 414520032, 494974650, 300177708, 811610962, 146810674, 337728819, 506402762, 403329973, 694340600, 766854981, 757139989, 188368338, 788752320, 918847437, 928046733, 527551285, 479184799, 517252899, 712149490, 791491255, 238449676, 667119615, 757940899, 445679476, 734062646, 326185889, 40504124, 623294475, 807102585, 697275776, 960233124, 90479243, 277423126, 459856976, 523164613, 283246190, 353589088, 214300387, 783487356, 692462518, 267488040, 851918218, 799153667, 810257248, 109085516, 633189413, 670646041, 913414538, 526057886, 701571781, 823895555, 366072317, 141394361, 832809290, 464577360, 305577012, 512815120, 121404516, 195457318, 321946163, 309097012, 239601477, 94799504, 314416433, 43085740, 639634392, 892727867, 559091131, 668748148, 422889784, 711508368, 676630033, 634668710, 364293294, 844937242, 751071408, 322260215, 891789141, 187899827, 511558264, 521391391, 670781806, 509672700, 51147255, 62331255, 681097643, 668432081, 698715101, 46454740, 726474418, 934462337, 72103891, 408373632, 957100449, 670661469, 786800623, 834620545, 287400489, 490496888, 497846381, 189806313, 912940390, 809020495, 703284720, 835793884, 605744360, 923348658, 214377202, 697918809, 343995053, 445012242, 544883273, 475774494, 73159748, 664916820, 945806189, 388033609, 184443581, 891139166, 132967061, 662232592, 630310273, 296941879, 926467100, 732662520, 755030683, 373067237, 200501225, 132039597, 621016442, 864116597, 199168443, 229224627, 19895297, 392227721, 512572983, 888183257, 954225811, 362992884, 408318299, 664465052, 828120392, 703374891, 61248349, 16358204, 241119413, 30565637, 838212406, 921697699, 543334430, 89858526, 273185879, 355471309, 304528048, 507574008, 476038937, 789196651, 57644735, 932966132, 292240565, 284284800, 198355642, 844613937, 375170024, 881957600, 108981244, 644631978, 730251746, 563646094, 15703371, 891969119, 462467018, 842418885, 184776107, 20489508, 525173823, 93913531, 199936707, 49296883, 500271791, 9386940, 42793104, 102301079, 299925062, 242848544, 157270543, 567750735, 512260765, 540910896, 473863432, 123756576, 867793612, 940752336, 189701376, 338838501, 163690216, 120916067, 790468763, 680974009, 939542025, 299064055, 752326705, 668302564, 775312490, 929999123, 713601128, 593704708, 595301628, 539445680, 220384571, 492539730, 572951883, 264745653, 946510661, 751486844, 372815432, 445849920, 481560920, 887629330, 46438187, 433046906, 550746520, 68280122, 549536967, 98170304, 942092421, 657076175, 85959544, 736296914, 244774210, 196059783, 968298850, 183375217, 810099519, 413635020, 636120983, 396309504, 740465895, 371532101, 1, 42, 943, 14920, 185722, 1929132, 17340642, 138243024, 994832181, 548192008, 829424358, 702470585, 488681655, 275370643, 835638795, 810867407, 286977068, 950047225, 83539435, 44629372, 288790619, 507410843, 264046736, 483012816, 672138691, 875194556, 651203850, 66911617, 918075656, 674825734, 94581776, 415282344, 303997379, 819537616, 622429217, 698967413, 751254549, 420414807, 687830513, 601402264, 434289505, 724948167, 754889253, 808542135, 995391960, 178813332, 724416372, 177739106, 814105099, 753597104, 45856871, 272275296, 786414287, 511285559, 160720229, 317562390, 790336119, 868224061, 359611251, 78736463, 773457035, 927802445, 421722380, 116775238, 364696053, 502866895, 626441652, 490807991, 713262576, 797949369, 598695934, 260170588, 82830001, 494545919, 272206045, 443643728, 598266021, 33015507, 884148700, 307476402, 959867411, 216334812, 800291904, 985570368, 488188448, 107147695, 538136243, 662412600, 979298525, 134498654, 226734918, 727004323, 749341953, 119616289, 344235011, 179701806, 771727176, 867138213, 462181714, 886155872, 120844409, 637609736, 732957723, 950929297, 917858187, 787591285, 658307576, 752393246, 363474545, 410621001, 994736846, 177814531, 780475306, 862888709, 592093607, 579502147, 557845688, 288775481, 603183203, 577960148, 788283409, 673824051, 683888139, 877184660, 633236685, 114600324, 443874806, 243845462, 737247494, 816215602, 301818289, 678209727, 613605938, 858234475, 818583083, 638002191, 955539556, 166659792, 402119583, 136117938, 121601666, 755992562, 47984728, 295575049, 499852111, 307179145, 332974068, 315732357, 716712867, 640162541, 867854182, 934376752, 313718034, 59903781, 946384843, 119557570, 525136020, 151571916, 798992199, 641098837, 260839275, 993458171, 824535499, 355644177, 761912070, 816737774, 16159145, 269418274, 606453921, 360745230, 8968332, 697762673, 987763777, 660889863, 735951723, 644168107, 694447061, 112348183, 530007620, 3042837, 764274326, 848173528, 194620935, 635775962, 259196720, 713828904, 940082694, 457694335, 838811079, 742877821, 825043434, 999682813, 323541591, 50872352, 337477908, 513975090, 485543671, 991738379, 437900643, 771900426, 686428428, 563411325, 914169111, 935692665, 43568184, 490175371, 749564693, 101137943, 245839802, 603981104, 626386341, 386920859, 413292672, 913439917, 70347116, 434898910, 144090153, 824132212, 891175519, 132402569, 347193520, 969072546, 16729602, 608672301, 618817500, 911982521, 688615529, 732174336, 500282116, 497352932, 456415575, 878875953, 316115544, 915703538, 598465482, 596140294, 730305232, 164832432, 897815573, 166896959, 324516472, 764718824, 566396641, 914517008, 874306816, 779763109, 852306547, 611269114, 292511571, 915381300, 758955270, 257373679, 74625589, 121789415, 230596845, 205840454, 916544901, 23902587, 416402779, 293269031, 510816400, 975368660, 955188220, 72244504, 561311434, 137072009, 127537010, 860723336, 883260674, 394382836, 913512596, 497775666, 206616201, 483790701, 11643758, 543373789, 107216374, 536706614, 345207484, 197739695, 416959310, 802020491, 883579389, 155472766, 707726533, 878636875, 137339984, 387604391, 170286771, 862464509, 93116703, 698306089, 277231574, 157624181, 518482505, 545923209, 301838767, 429107456, 65466197, 400869145, 603396151, 201146053, 29560436, 908247428, 740900666, 645622178, 468181946, 182006817, 585006092, 39427009, 901513909, 575103140, 643739693, 969005418, 413112711, 121940507, 949419798, 274176335, 533655948, 73448571, 447893873, 303200166, 406062958, 327948494, 399154885, 680966803, 676784794, 346165530, 118434942, 634041854, 219847494, 927409557, 731595298, 204066166, 484721091, 397391612, 62697528, 613046235, 363210072, 588627148, 359818291, 176675393, 710790103, 31891420, 193284227, 13322649, 80677012, 364175866, 156203486, 303397217, 540753075, 969185318, 762928705, 479974322, 873609278, 714679223, 243389411, 893917661, 730412727, 540295939, 380888528, 199480073, 111615382, 501213077, 699982545, 83674978, 340471893, 589623231, 135448371, 354059110, 416125008, 490338358, 869847423, 644581498, 153365962, 261322947, 680966984, 400282844, 542955010, 604680600, 412088220, 680278649, 139286485, 860834305, 469429775, 280658323, 253030904, 2560916, 10309871, 297479762, 823144855, 871982081, 47058346, 963847165, 382927224, 356584190, 324565827, 306141977, 910279795, 453817674, 601981427, 979339306, 222338413, 904561649, 382529080, 408856660, 854658577, 411827225, 670817056, 827144476, 223389693, 471934610, 930635535, 587441381, 722797748, 95690794, 663628478, 287716698, 646651719, 701670514, 288321331, 90367689, 303151955, 540716833, 449495113, 614473847, 768187147, 779428778, 859329178, 317839203, 24311574, 208713726, 534909824, 569617669, 779723332, 951823587, 262620278, 508684571, 644816282, 124674019, 369884532, 146396384, 993989514, 828097325, 353947367, 356630001, 483119775, 36683277, 829372562, 480348153, 416969202, 237164413, 917166508, 673670902, 955993972, 550159722, 115253791, 571208381, 883450110, 234414978, 338605160, 465632072, 975880238, 1, 43, 987, 15949, 202614, 2146662, 19672862, 159841410, 171958174, 857707214, 674952199, 863564473, 694487987, 218927913, 150857334, 64522123, 242512102, 726888439, 233627107, 811786714, 114239005, 343074532, 372330107, 720689358, 467711835, 904517093, 48140523, 445520536, 151023837, 477389409, 167654505, 524330326, 826025786, 750662832, 873751815, 63739722, 191556854, 667326112, 50500515, 441625511, 782830742, 400734038, 564497630, 921910383, 845548941, 368028935, 749018447, 103585045, 796556849, 628596101, 868979841, 539520158, 627354569, 90231323, 417433082, 56768496, 355579497, 422451590, 886349503, 72956900, 803725461, 415871073, 683643384, 621063238, 193330057, 325926450, 277754812, 24871409, 448472012, 886190243, 823962291, 441987145, 894908057, 837390023, 862747763, 91512877, 722912649, 93349481, 545810047, 913016979, 515556016, 298546360, 734212089, 844284728, 136068973, 71028614, 122223407, 751306630, 44843394, 423748616, 386401231, 812571458, 811253207, 883210298, 108253088, 777750730, 94398075, 357510258, 341016668, 444595182, 421469474, 846006439, 697364303, 430219357, 145159, 329923811, 555736286, 145037472, 50858159, 758063180, 409311835, 199515197, 849732459, 429458586, 110831608, 601311986, 405029768, 899721594, 362036575, 3616348, 447767827, 718164293, 455022502, 154627334, 632024645, 923207902, 841801838, 418932384, 595460287, 460605434, 188513457, 767682601, 51793196, 194981425, 929803954, 504733978, 22197692, 870666331, 333136663, 819520200, 530915500, 599537526, 53266589, 48676597, 387019415, 413134249, 89916173, 988538195, 741237674, 580557472, 340811443, 13472882, 840030352, 781975641, 296220934, 702357371, 942050407, 935085214, 845987731, 799577627, 872670633, 692587304, 440284632, 702895036, 10589510, 109084537, 901549736, 680965380, 523560865, 14608855, 766098800, 955736031, 229070295, 918139336, 762087315, 15060087, 769624318, 210516326, 269537431, 932448778, 651446512, 367308406, 624037144, 927670291, 415521073, 854675140, 947034643, 395133007, 858104556, 792426709, 918444166, 282314711, 96653546, 423079321, 469451942, 792999037, 308400615, 330587501, 691818222, 53917678, 568461122, 362577365, 775464857, 904714011, 845440210, 795470521, 568880508, 666239878, 183860147, 125507811, 545400921, 401495311, 3467092, 430876347, 332849310, 96436924, 957680475, 836934713, 150232592, 891109199, 995835861, 145792868, 255284669, 853681633, 801676454, 45857933, 127560794, 137690320, 534209092, 436059291, 890838261, 134212816, 302504982, 936257832, 761720727, 269396963, 28197218, 59083210, 947207164, 442972791, 384169121, 488722025, 351406087, 443097712, 82956552, 698141640, 145942108, 188889308, 734290094, 387705377, 912805029, 973822420, 47485510, 507370861, 221674431, 786661915, 91335607, 856760661, 173031704, 864904090, 599152735, 495185408, 938099393, 556362344, 990758140, 995900803, 254599934, 462199704, 5008078, 665636661, 527028350, 642386127, 1829553, 551952980, 424017355, 108488740, 701380336, 806666866, 700141562, 59441909, 362171728, 894757457, 445400929, 773238426, 127546419, 723395394, 338826564, 332919619, 340737249, 850054615, 184058121, 13063831, 278558952, 698063140, 498777528, 72607237, 345269132, 902279995, 183690503, 772520236, 708689187, 233896476, 458831695, 230994551, 41124197, 206351350, 689101399, 262700029, 620939252, 892377787, 428085255, 694339277, 213848040, 916329377, 192795757, 474268014, 561285670, 220016093, 638297144, 193877561, 647642810, 64716523, 5417153, 709160560, 438820650, 471896153, 456049785, 424945489, 102312939, 179871925, 155527933, 66018018, 519349428, 575834851, 366155295, 196027859, 709388961, 444696414, 108229719, 111474967, 169464130, 765045351, 916818004, 674916990, 958919968, 932259128, 849009441, 829390390, 846317162, 253991616, 482990034, 163822353, 775754269, 532037321, 49173712, 212326050, 301906174, 678424573, 534302771, 375782334, 160287870, 855370313, 341617592, 25457804, 708941176, 246832732, 903916100, 546588049, 96029971, 706821232, 940560978, 101534792, 337492719, 856837601, 613769045, 707646199, 812028723, 616833643, 679800396, 535428679, 224426630, 413895724, 784683428, 431644219, 111092914, 661756720, 639659700, 41894591, 68359952, 43802473, 952730000, 823133424, 376059765, 707785553, 822330735, 771301262, 948220958, 908479296, 864547297, 515908783, 27167717, 175015260, 401476125, 721945851, 298498970, 707819205, 838011772, 889483594, 356594984, 693435347, 967781679, 401435494, 355846180, 333596320, 628919505, 303558980, 984974994, 113643042, 89409518, 612893129, 122412730, 114900098, 810658251, 247580260, 945287301, 609126629, 492005778, 772356444, 361927818, 440145503, 858752994, 174471327, 210890472, 769016792, 638211867, 546015263, 377533141, 892710683, 705066724, 412035898, 913706912, 989583745, 102815427, 296051463, 435828877, 627348761, 994079761, 369313875, 909339708, 172995194, 816793393, 474860389, 821690532, 962160124, 246051373, 970475428, 561698902, 165844443, 708639335, 918973613, 861542417, 207950600, 197794802, 563223285, 448456804, 787570186, 926930606, 566070711, 279041721, 162328562, 287318056, 191225488, 14318341, 585550504, 409974535, 697728497, 891226405, 200433586, 381575055, 638337683, 483277973, 755030264, 867834356, 962849947, 821535631, 1, 44, 1032, 17024, 220625, 2383232, 22258540, 184242832, 375813872, 392612893, 231706087, 882424931, 687132034, 689650073, 577977876, 303878988, 24310937, 406963663, 625468735, 582435950, 41660062, 421950986, 98962940, 938709884, 758565048, 969234571, 703952131, 900436492, 658647225, 285611947, 399326780, 419454732, 205387170, 983950227, 49990302, 189001672, 62673927, 586296391, 184361166, 506353667, 438069708, 256171907, 825943859, 951340167, 368115756, 522855639, 198647246, 263328246, 450011807, 434855284, 725807775, 648411666, 18383140, 128787399, 387148373, 905324825, 158891954, 656234845, 213026076, 490012707, 365468167, 200221292, 298615515, 290107567, 35072337, 317672326, 60118064, 676291945, 898619095, 494511021, 35193707, 681989460, 255539191, 6318676, 181981289, 309123618, 769843578, 942743189, 29734288, 954472400, 463236670, 747980714, 175643037, 260101113, 77874147, 589524374, 710018290, 567729062, 854908844, 767838566, 521233813, 535397022, 395450772, 519565978, 430844324, 691804767, 750969410, 915664434, 335442962, 327801393, 599337662, 151524696, 372580414, 756807473, 202845724, 578628778, 324772867, 495203100, 594805038, 176866440, 134364432, 797477913, 981614510, 128692174, 938852792, 42148884, 122641852, 370944239, 473851910, 935488807, 532851475, 689984371, 438315593, 696398812, 66001022, 428174065, 54501471, 80878480, 666016821, 47295976, 813797397, 317765605, 714997505, 258919731, 82884010, 661027522, 582655484, 361252385, 24311003, 432884688, 368733632, 23821090, 792526029, 846601436, 536812192, 29313630, 382435159, 426147993, 517181759, 645690342, 270896281, 775661220, 283600768, 240876557, 135665693, 104458079, 616729602, 497103691, 828815240, 86098789, 998656307, 754065783, 488969594, 91503702, 52278308, 883359011, 733253122, 448869387, 985543203, 116773170, 582006344, 860482711, 481797421, 498040658, 240829616, 836032529, 195942841, 508465042, 970760583, 262117458, 515914406, 802808161, 784332475, 374122343, 146224696, 841597534, 586439935, 244148601, 788204315, 767547799, 776362337, 510076278, 624681830, 364806405, 36907700, 539421266, 800828005, 512242954, 899834647, 163376162, 50294413, 18654970, 84289561, 55576943, 421249957, 34930346, 752291330, 162276973, 265235612, 648593820, 174309283, 472188614, 715911113, 367773012, 121970433, 269868616, 883985007, 980070897, 514347496, 412293057, 574601560, 116830355, 45453500, 562859501, 189078677, 827602581, 712444490, 316586780, 733065979, 840949184, 60074648, 135398686, 424428452, 321968689, 410040315, 273128858, 471407472, 574966766, 873880166, 875045586, 51088331, 163730111, 878321231, 726127318, 966070068, 992549896, 363335253, 89848987, 723352311, 66759579, 406269326, 227087300, 150259572, 36586234, 121181736, 671327424, 433664784, 948164313, 657988535, 451431758, 352880293, 341991927, 179834471, 17796695, 709446365, 576526708, 534876965, 620591563, 749402589, 628280366, 213414310, 982746106, 780180633, 458647121, 527146575, 210950823, 363805011, 571210392, 912463620, 153315485, 532024632, 427468951, 230879114, 869803861, 964025520, 480715223, 895116735, 766188327, 419338263, 475074013, 158183698, 899486620, 551866464, 830407504, 385674668, 305150124, 25769566, 438519248, 46473036, 427624180, 723264512, 651472006, 264633252, 457374493, 476392005, 982968243, 594462543, 141658727, 489344824, 433530156, 442633667, 193279091, 506366676, 618868695, 731227096, 902261819, 499005142, 38842574, 647293009, 470120821, 963932040, 826530559, 427769181, 52186234, 243569284, 806914289, 77294303, 605077946, 125786816, 193185124, 669741115, 146483601, 421911450, 244025223, 607708016, 920909811, 503255382, 458139691, 962827176, 614853461, 60315827, 350564197, 429760397, 252570002, 854719144, 336843776, 342192419, 596659989, 924243516, 172320579, 980212083, 387574794, 749118912, 796421442, 338721201, 731277700, 423355068, 842226704, 398877706, 643899462, 276311394, 413568057, 530987554, 558156380, 825270018, 71652153, 764304967, 575174245, 41877959, 189656159, 729954858, 472722511, 759829544, 285982254, 921037034, 543320666, 873711613, 829723375, 146980729, 88768980, 242470712, 9284436, 325379730, 426922557, 253585643, 473459335, 496125795, 212116723, 579959160, 525505189, 681915634, 797942363, 691505794, 454823298, 342255990, 994255712, 284908161, 275004161, 935102263, 472107098, 948357256, 856671615, 528973823, 649773881, 963952149, 308388016, 911396221, 251193820, 721175020, 199750213, 907595892, 491208059, 66513541, 911357998, 28185931, 408941602, 745821213, 601730782, 8869191, 260152446, 11616084, 492782894, 282010506, 115926945, 586669273, 760307966, 135350671, 730510115, 701832702, 230080848, 284697593, 182609947, 968668397, 822892958, 20031466, 582030222, 113170973, 44631330, 117449096, 742186715, 393019551, 475653487, 44400405, 854169605, 417464027, 638137059, 767027912, 156446839, 993857936, 340495049, 620457258, 138844665, 409760846, 178352112, 82788960, 388732194, 649306589, 798058368, 662337136, 564354859, 463324080, 651997437, 151329929, 798760314, 140393196, 82249686, 534814725, 624568021, 130746531, 950081340, 74895509, 582830295, 80288213, 896322580, 930247101, 961634195, 343840503, 151542664, 791653321, 891526646, 512046490, 292522561, 321986893, 483787584, 926080170, 410378864, 504638099, 532986681, 138953386, 701001827, 64586773, 800287681, 592917926, 845148767, 612516645, 103437292, 360749745, 802262044, 905182790, 741928176, 827192105, 608668686, 275550867, 759837767, 768468707, 652063776, 969103143, 1, 45, 1078, 18146, 239803, 2640055, 25119048, 211741156, 609749448, 185787670, 784612981, 979654374, 245960280, 15201333, 958496287, 21110097, 315107827, 742613444, 350112648, 551346765, 22689059, 646342016, 52427180, 113726997, 20972491, 531552248, 493279562, 92962089, 319571072, 658193556, 921146440, 975234478, 32484025, 175484024, 620442122, 566033382, 228886883, 301912152, 137109958, 37427138, 531183271, 684452057, 239066445, 806400806, 345167706, 766401402, 659593100, 342864185, 793254425, 754419464, 829307575, 253460669, 788296808, 455700810, 203460090, 299960617, 672027544, 662169751, 130171479, 226661975, 16040291, 641167104, 11608362, 92735361, 828424038, 151425031, 757058935, 838944903, 705030989, 271605017, 832315720, 525711262, 695893337, 524834613, 616761109, 89325780, 498691877, 390082387, 413410547, 86170624, 733987779, 857386717, 121183471, 378540433, 791481061, 602874536, 895775257, 706223069, 9499, 916233199, 610175789, 305910126, 402086898, 380865911, 987929263, 784720236, 752249361, 533065111, 750214951, 512527924, 120069833, 497034065, 691332267, 542878776, 324018841, 841280375, 368737196, 213532423, 972352910, 856518833, 695976280, 832491001, 482258020, 288928023, 37469870, 669147935, 728824530, 312167670, 98462828, 664815478, 37466991, 488559701, 805407681, 555656112, 449333572, 115257333, 422614443, 217564969, 709154128, 523463461, 73425486, 892488653, 72758100, 139084611, 245397266, 356349189, 258341975, 374070936, 726599734, 907199192, 145474167, 868900328, 80767170, 435742131, 604761267, 550372021, 238314098, 858506407, 406280874, 734533546, 294613351, 569709112, 578499728, 811514468, 971780315, 806793934, 105431100, 109183449, 48863833, 577768093, 679710969, 415227663, 41263734, 575857153, 381654592, 178237376, 962188807, 96401085, 816699360, 379978, 698529453, 815682387, 657011537, 324418972, 693645417, 573047105, 308103161, 882958960, 454854080, 319280881, 638681315, 366562235, 558670399, 767575020, 418970310, 599121706, 533764150, 589341596, 935247125, 342450103, 752510984, 17885861, 270962366, 936052758, 754048953, 578853463, 395299411, 975776432, 660809842, 714104917, 664542262, 888472526, 460099640, 981638523, 92874960, 177231620, 389704303, 815325394, 892076514, 810821143, 435904186, 382196425, 459031152, 355917826, 128881343, 657597142, 768648132, 489510758, 615223177, 785945817, 514595120, 566588750, 607013232, 187911920, 428934627, 690400146, 385480557, 274884476, 214574226, 202705516, 78809920, 768678876, 104566183, 54811645, 783466377, 78714677, 225394661, 571378521, 194681502, 425310485, 768219090, 304793231, 206900396, 615627160, 652872143, 605935098, 888495311, 608958308, 684600222, 150382009, 670451269, 632074742, 29926906, 676412361, 727588975, 541140282, 152873820, 396851079, 644404346, 44361987, 675992732, 795525664, 898044746, 408945421, 518637916, 428148139, 754863856, 398182352, 901207212, 713356422, 978366083, 314876385, 700685480, 450639991, 507197672, 750335365, 694787156, 659670168, 536065922, 58255852, 874808151, 601680063, 300562698, 308983506, 144763409, 291800793, 77526020, 485403753, 904665596, 240987930, 592380858, 131116194, 318805303, 40941643, 253699630, 655235690, 431599614, 508389196, 766960976, 64307752, 83604788, 642165815, 298107337, 143184667, 782909601, 97135064, 800759539, 594114128, 462420032, 946857620, 578998109, 847963761, 556321528, 57391815, 681855904, 181815656, 486333346, 837072759, 524567487, 328595763, 549915998, 810586503, 921107919, 625157836, 520890292, 832156974, 502972509, 844559735, 189855766, 821823028, 625190873, 310510259, 495827691, 683011136, 462720297, 218315456, 558392392, 789434995, 973556645, 730884239, 996176654, 617108310, 869866261, 672230385, 823462275, 454316955, 569646417, 836576125, 486906178, 189726176, 941091111, 447563926, 715506888, 259006307, 152570437, 178255829, 705545293, 756368978, 655390691, 445318929, 656847742, 582354283, 964611397, 757172000, 601301680, 424348696, 51484783, 19240319, 282677827, 308226295, 848392338, 155829926, 371112122, 224524783, 972970693, 890401898, 186586738, 229535528, 744395297, 436751188, 287103606, 767393594, 221149011, 725319915, 148703291, 142739608, 565503173, 66967587, 579759051, 568848401, 146971072, 400042251, 42796974, 930117091, 516575412, 958322295, 49672443, 25502320, 669481138, 837449618, 7837933, 569472200, 125364493, 253977071, 938687542, 347213905, 923213402, 374713215, 103889249, 423021360, 42560340, 446498368, 893011213, 263552847, 473020638, 594960497, 638188472, 306243047, 631678307, 460262893, 114330448, 196301356, 120279822, 408786998, 213927614, 687965452, 221650209, 761159253, 159653422, 237951119, 705996510, 183076481, 962207888, 939920456, 729428244, 527536009, 933629825, 48104537, 426892607, 222940406, 156477133, 294062878, 856995315, 562470362, 935041969, 210948751, 968306167, 842365144, 520781012, 542464204, 753086923, 742421303, 62000597, 644679235, 71406991, 633199433, 272647461, 452692051, 412108892, 971466694, 51102980, 982720545, 17172841, 800141833, 835541670, 112517201, 389287762, 451060806, 667438631, 372888210, 71363616, 925222882, 974951293, 516878304, 717488009, 957226897, 42671831, 558776576, 623171604, 305500795, 631070922, 102790598, 482941055, 578335399, 805101814, 173951677, 379242816, 368922629, 730730546, 873191134, 654555294, 282999571, 122452789, 92227034, 843713012, 807240125, 801145367, 399481174, 81195926, 292593849, 487745170, 77737545, 120468361, 275563695, 294725580, 329691567, 323060707, 128192468, 940264172, 278390124, 237020514, 693096287, 868976326, 357620751, 777387506, 600499325, 283061659, 552760619, 551343042, 374674126, 67456147, 355451755, 309520773, 188033652, 438124708, 963234900, 524570431, 966112342, 609641134, 592345761, 1, 46, 1125, 19316, 260197, 2918394, 28277069, 242654144, 877454212, 274093151, 658806941, 733787098, 12686768, 373279778, 972151771, 700803085, 323660829, 529034010, 15342046, 14519348, 617205005, 151932388, 986173050, 673700068, 544467810, 964286681, 515278420, 556139518, 340574896, 558301369, 203169010, 995039572, 456888812, 641435231, 165153057, 140522292, 660622205, 195293121, 536816710, 963078287, 7389104, 204944482, 754195920, 468292992, 782743724, 983001140, 866703245, 496885028, 44229335, 385957410, 278539952, 468949573, 420982388, 313452346, 869856814, 98935497, 204399132, 112520568, 660616311, 229799510, 228233497, 492491671, 631417681, 54933646, 149425728, 621332861, 339088208, 164640489, 629238436, 824895721, 154091091, 876001533, 408513031, 998443240, 581987593, 639413342, 564182232, 919538600, 946772636, 882410774, 972663920, 656083562, 92818, 266781815, 775781699, 746031288, 222736672, 245153398, 853395663, 612580130, 998160370, 644539418, 268757618, 522753001, 961290581, 775849265, 167666621, 207332842, 699178165, 754169098, 895892786, 110804927, 209717022, 224332021, 783584762, 168756823, 846734143, 820517435, 567375827, 214226237, 514413130, 94334242, 56417678, 452070622, 302779049, 643793464, 45275321, 465081583, 721848633, 905142006, 304646178, 594655979, 909007937, 734286949, 886228757, 175346016, 613908391, 543890160, 182181133, 880150750, 840065256, 833202286, 948664835, 99995047, 986587901, 143761895, 873393215, 472341142, 369663112, 813013714, 860504625, 731747262, 545041246, 583231233, 427381591, 37913038, 537312918, 219404202, 592801409, 727962123, 878247573, 121527391, 62101177, 856133295, 688561557, 4927109, 639161755, 216890863, 944378755, 396352437, 878653962, 905668778, 386987830, 935008847, 899701147, 100650401, 955831377, 336099358, 325599961, 655390214, 368725260, 410912881, 868037904, 255016544, 51552711, 320078126, 868474642, 332377928, 241406268, 35418479, 170587950, 775390874, 598922434, 616742075, 563583865, 362204509, 606438997, 894815935, 49721736, 43588534, 841088924, 703571407, 258771291, 525460849, 233015242, 491199815, 325653075, 858892862, 519655123, 115437087, 727491564, 149427446, 582972761, 204458210, 871579136, 737982490, 129452738, 424878982, 856725917, 336920826, 730532856, 841738688, 738232572, 913319995, 816486040, 235770118, 427698004, 930569686, 569011751, 212446463, 508105319, 803897811, 496189040, 948372030, 432798655, 784691260, 809769369, 691850475, 577558004, 62715847, 947764060, 196109904, 506172286, 447735266, 980867772, 417186123, 46557919, 986790130, 277584037, 822619391, 621076591, 388367593, 68342324, 236699370, 119970164, 657351210, 878868802, 794459312, 436412351, 290870119, 503296346, 564802634, 58773734, 218770767, 842309450, 694735121, 712067611, 605426442, 634737321, 598847809, 189964014, 104895974, 463967300, 12836011, 374171101, 422839429, 769990513, 562838372, 23465799, 935303296, 758855803, 832260567, 373886738, 362866660, 831747060, 745193763, 842521525, 971131364, 323409153, 328965945, 810807795, 987986960, 514599613, 697337301, 518676386, 255182547, 320862033, 438306682, 656059329, 246817307, 296427451, 518314128, 212813255, 401599307, 322632262, 651271379, 102975853, 978392574, 171788197, 425477753, 865141598, 200230496, 352371432, 128877128, 483645145, 487174027, 207964600, 565016864, 366179929, 769999162, 980709292, 279413092, 778963675, 322935221, 775556840, 152203885, 621120920, 754303914, 144652778, 603456104, 397495432, 911648885, 161631342, 183072379, 436197254, 410415743, 654211646, 998944149, 660332881, 659092994, 407158213, 993390015, 62237745, 342306369, 807083806, 460112259, 598009122, 34231667, 354435262, 237881432, 155417941, 495370397, 996923439, 566380833, 854227389, 702509945, 42544433, 284265702, 294553519, 149363293, 27077251, 84953964, 442875086, 52560456, 900402134, 145229989, 73758817, 191009440, 854994962, 638721915, 122661714, 185868970, 77283521, 869275152, 18655948, 313026284, 709600476, 473812539, 310414874, 881320952, 952459523, 248120422, 525865505, 878780555, 987277088, 840681160, 676792790, 412115993, 140030918, 974129475, 721196483, 656805079, 905290349, 47935904, 451920705, 209356056, 551066765, 377150442, 379611973, 957219941, 151470005, 815021467, 645207971, 427463516, 863082600, 325313522, 124436219, 624577057, 614877838, 455973640, 851822937, 25478672, 694724523, 841056623, 311625157, 733217559, 234679922, 488590424, 672460808, 393534712, 496209755, 929085969, 673429468, 675205481, 477828672, 541309112, 421475544, 478494486, 773959869, 620756099, 817295158, 343366608, 474968096, 138789669, 1261477, 581929663, 193727536, 890932863, 10823177, 566850894, 774883564, 16714666, 326523886, 969386350, 297903394, 330603328, 602435368, 640131734, 422205271, 722651837, 536164302, 931111157, 119137488, 728875089, 985577117, 985476890, 17918009, 917723365, 472997173, 89115107, 916366434, 502538821, 230961609, 303908854, 617061492, 736625515, 131713887, 339453221, 738950163, 633262610, 426758031, 238112917, 779917917, 838020550, 66019448, 650675847, 778117049, 610691432, 213274580, 385410347, 146924004, 364868172, 467790003, 719723336, 134820272, 752419541, 477278067, 249134595, 704095466, 475445405, 736299900, 879265925, 152926089, 845846141, 495967193, 279498385, 571884448, 188818617, 160584873, 477296264, 718325160, 376134972, 29944771, 994040918, 900529668, 502667072, 63109761, 493032874, 781301515, 461834757, 82343644, 481132313, 514447042, 33858163, 779555233, 748165656, 15592733, 72424287, 572256728, 868353288, 210902382, 873738113, 462082508, 116372507, 317994063, 320661573, 43412947, 698165915, 782179405, 544478699, 376533191, 591100852, 669522818, 718785967, 689856669, 868867194, 692259782, 326169003, 372530014, 278822874, 245059471, 536750832, 337386716, 351509954, 600150419, 771930319, 812137400, 268506281, 52663290, 576040882, 250206016, 182636529, 238498760, 83748189, 556944302, 408365242, 877381661, 687598532, 206936328, 93325077, 375585930, 311118119, 840250578, 1, 47, 1173, 20535, 281857, 3219563, 31756649, 277324867, 182983217, 698763572, 224340727, 130185913, 938338213, 457596872, 500667258, 726272186, 242531386, 490324006, 697265581, 186365736, 123707347, 149163288, 89978475, 985283339, 584841356, 785509005, 693590689, 256394211, 919078587, 671307265, 271140497, 146527772, 508423202, 678732983, 767147115, 418422439, 470469749, 411147184, 246424306, 580998273, 228726677, 964726100, 955513349, 444565758, 668191949, 622619432, 792082487, 929348032, 601983375, 875985614, 424117930, 730694027, 740975250, 920167707, 500437835, 690210005, 493329701, 913508192, 695611331, 515433292, 682059417, 760833644, 299135864, 144219873, 937695856, 872711671, 176916492, 348891212, 334587033, 49595521, 749704350, 806067034, 773327860, 183297942, 590517602, 642228939, 275941227, 305722242, 165986509, 644370063, 71211109, 994092320, 193064301, 728492690, 76982066, 397536959, 240992716, 459846893, 745186728, 715105963, 864528752, 8495685, 753272988, 61740216, 691254120, 133693721, 536597663, 806042634, 964981978, 37162518, 164112239, 637759779, 841824460, 829311498, 573961610, 622092127, 856298148, 23010232, 90428839, 608194623, 46765621, 381935126, 362962166, 452925715, 585602790, 768818647, 88708532, 942042803, 418311021, 521378251, 499003594, 126819649, 281499536, 951375086, 146412815, 883657287, 598780576, 163659546, 959278876, 560517421, 665346319, 929162776, 164983787, 77699826, 451232846, 342897676, 483260356, 399557298, 954841649, 593150358, 617703430, 292815034, 3827776, 631211917, 629217856, 387782790, 117795063, 964508694, 824603912, 347867132, 217932218, 808071571, 466159291, 919428338, 306867765, 310085680, 347929669, 103137973, 445637697, 645585557, 573817817, 596387955, 672995733, 578127218, 402908135, 115353766, 244018895, 365778204, 555835033, 188328988, 247770780, 214263457, 844226086, 575129810, 998900133, 642186262, 886066131, 9933705, 609621463, 398319031, 223920768, 209742125, 519163806, 74615456, 814536291, 217678251, 205417278, 306418059, 464475526, 330591049, 614947407, 841330174, 17421893, 462387593, 572435987, 550253368, 393354277, 125715312, 124567536, 533400012, 599797708, 528236566, 670562226, 867851657, 488086533, 312725786, 238592338, 37063455, 385067665, 487783197, 118051898, 700641656, 71282753, 435781034, 103306472, 894876554, 845215295, 848516, 105817111, 455104275, 971250603, 659938256, 173306291, 702024160, 716038595, 487118454, 170680030, 880373959, 881689085, 153725278, 74926408, 143593976, 537712434, 635112688, 530810156, 750175992, 211491335, 495469862, 938874667, 906814766, 530322450, 654580872, 345961757, 642596517, 63791230, 944154048, 670877958, 937127089, 186748489, 915912734, 209561832, 276486399, 229476817, 558761321, 226557040, 227364465, 312169979, 745218623, 741668605, 732242764, 141121784, 862165956, 612899824, 26577011, 945385273, 251793938, 946782241, 731260038, 244678083, 406380914, 904932224, 539791264, 681567161, 903979395, 522313639, 307479666, 592336384, 274405785, 808155145, 116439879, 610551965, 466693001, 783212908, 356926408, 441684284, 460337698, 929744044, 6376955, 718008169, 946348344, 771828366, 973818233, 895371075, 977137826, 380169268, 772257849, 31334848, 472603919, 411133545, 814229722, 268412684, 269984826, 925865608, 465876593, 90547760, 192297128, 107314233, 564985934, 624177562, 939350415, 164843750, 127698384, 375467125, 733175906, 272735725, 449176665, 148653187, 981408173, 518395662, 539465581, 376426572, 523018009, 244326749, 117372211, 788925566, 998562683, 66998700, 958836224, 912519308, 243826028, 372775429, 817271079, 249393258, 980817911, 290157076, 803249202, 54296904, 967950499, 259586185, 891527285, 197070576, 229312354, 227197980, 799697366, 938796541, 780082061, 90937344, 484280959, 41280132, 365255061, 357940368, 463355056, 931322797, 484716584, 549219150, 927360223, 836260928, 974511964, 168938341, 138740543, 617041490, 552137623, 940491117, 311751083, 797191757, 581186247, 747525174, 464341615, 45074367, 877273095, 118604361, 820377975, 651223472, 330450797, 299712101, 798402816, 155978336, 76119913, 279749437, 94544299, 576902970, 337821847, 762491092, 205421212, 628488971, 912880168, 293200919, 74345429, 106904237, 117214135, 997309646, 440117215, 601730010, 44099662, 275878624, 579837056, 734358196, 740396992, 105320711, 497734455, 593389397, 892951024, 375888233, 469355971, 904918031, 759963217, 159920933, 656339936, 82028185, 635763012, 494109863, 887577439, 747214684, 51704021, 870514178, 310168296, 344440919, 671389360, 63636271, 867520663, 253359253, 809561479, 515218518, 735486509, 595414813, 855063768, 809133514, 296905455, 403829884, 13706060, 521945271, 406722813, 508410711, 177195219, 735377028, 927006199, 631467156, 561281245, 747357347, 2938426, 465345595, 461810717, 851331500, 936133185, 709629669, 764183492, 336958888, 999734612, 886346709, 929391292, 283117585, 489898780, 493902211, 377860665, 233672406, 313970515, 130449778, 925311516, 829665465, 27964512, 47478431, 502231137, 77997958, 450616449, 231073347, 922519036, 577962078, 74763491, 840109600, 825429573, 325716083, 462423227, 684091307, 610980133, 146344297, 230702558, 840583842, 568780809, 837872774, 467777629, 918753619, 868791683, 692922864, 937076083, 487643358, 553595896, 717484731, 882361644, 739294901, 547711612, 781629368, 821302751, 368923697, 499416921, 374122329, 146178192, 867117817, 743635071, 435195107, 43377741, 23687167, 878990481, 99110158, 262344925, 137035868, 292609610, 625408058, 171070693, 281506530, 350758492, 515834894, 237732608, 828774443, 840832942, 431386878, 857791323, 291378943, 894741249, 559570546, 881728336, 216217018, 497590589, 210577047, 706853900, 528807154, 595327246, 243687205, 679896105, 276389715, 520651743, 981854062, 782051052, 628779694, 482906971, 308000266, 98460224, 329039027, 663453182, 866909422, 358447817, 756042580, 103701857, 530184673, 82157052, 864831037, 833622836, 129557279, 680891914, 903510655, 223117879, 584910098, 872789802, 683398377, 818673921, 424793316, 162530200, 461191009, 233747923, 764377859, 866276050, 20068038, 599500015, 419525268, 504837656, 702339633, 161478719, 731429464, 9977417, 955013204, 944736389, 868359658, 303235910, 570685307, 762022093, 973456873, 491776893, 191155949, 1, 48, 1222, 21804, 304834, 3544928, 35583250, 316123172, 530785426, 505824986, 901343166, 615485588, 789348648, 698747334, 657848248, 964586458, 476943547, 698458295, 801769019, 257736525, 542576587, 933572174, 9542546, 488292838, 779820677, 404677231, 568188493, 931045218, 340825658, 205993974, 185959269, 78058729, 445883053, 431770274, 625502333, 180277174, 804167964, 894493650, 995189957, 934651928, 779076648, 286076285, 196236261, 433504295, 796345349, 46608071, 262327913, 615865530, 569486410, 232121371, 86175778, 154003167, 455565337, 592635041, 449778081, 946011559, 315342730, 523152035, 660192808, 984322053, 918448908, 362530845, 976500024, 826353996, 979299043, 20455239, 106430716, 169990095, 856925551, 339927417, 872925000, 454748405, 844111855, 778706572, 953334777, 367875579, 54603227, 952723870, 746089521, 114899675, 378338080, 515017450, 901556480, 75514717, 118586517, 750778341, 164215503, 398032943, 932771419, 175973529, 371281707, 414155738, 136305212, 176477492, 529591042, 473449712, 104580388, 917944592, 711611694, 275529831, 657391663, 618370464, 182199238, 863262145, 671572410, 926093081, 964697471, 20599847, 886336884, 976845790, 332330830, 936899217, 469444206, 333826539, 382006323, 404644652, 86283892, 711449573, 711524895, 240243757, 137744674, 52585102, 502954368, 568353873, 424768720, 673699213, 453807002, 277591996, 614231800, 858886730, 933633627, 855960053, 795294602, 320736325, 160050137, 741837408, 875372187, 933116510, 439299086, 339530899, 998809886, 988163112, 414204450, 626581582, 425958595, 547450689, 257877182, 25212376, 487090639, 693248108, 736165691, 261048117, 530252319, 667332870, 224234420, 283256778, 493030047, 381167115, 959191937, 567700201, 408470930, 456733167, 877572444, 640070139, 177231251, 53889209, 630925282, 764167042, 903138510, 822950867, 161878067, 741376139, 620673064, 828400388, 989198090, 398235498, 335164252, 650259410, 895482301, 288920533, 986020511, 960531109, 692510577, 743863232, 159848129, 639142915, 658806616, 286815941, 569150064, 996156909, 474086872, 377428234, 108191201, 968576455, 934066962, 520785392, 648351310, 322768543, 500047228, 717012630, 366640002, 617370336, 747113890, 647615517, 420668064, 485924194, 28548015, 242698362, 20265134, 481161073, 780894508, 716872330, 925052871, 809234518, 209608950, 454869307, 42621234, 266915957, 548835092, 11648368, 200676498, 803279760, 609790836, 522043768, 787672824, 264643232, 571421826, 762085826, 854807719, 119023111, 660310435, 945098645, 838260736, 592383406, 728604232, 586121308, 18945549, 62079587, 8000021, 137221342, 936745518, 867913927, 937623778, 183088542, 624248829, 606106136, 815005922, 728188591, 164502140, 885086995, 646575964, 60630781, 250914884, 619961376, 835493684, 1794097, 350786557, 222634027, 605402916, 871984975, 140157610, 784428245, 701028584, 784157139, 199990301, 49282014, 806191394, 544636448, 696393844, 625422532, 306981977, 200109353, 819880255, 622554727, 966234587, 1715755, 884432882, 186517679, 414057470, 559202957, 356291776, 440462056, 76496043, 54502936, 82793754, 693820485, 333532789, 139408482, 538301356, 908601203, 663844984, 277481039, 494620179, 126148065, 101563902, 543304970, 40138848, 255494176, 250466774, 181548534, 183041503, 553027506, 468172977, 571880068, 685135214, 70030015, 431414252, 965377675, 285528459, 577690235, 3039911, 424468115, 149219671, 315258608, 442938842, 340124780, 620577523, 697442435, 606981307, 195766252, 513624332, 160814831, 144529981, 626344971, 929525101, 167384034, 985564306, 757660450, 674490248, 404160553, 218780132, 253152109, 588527766, 276135385, 293545669, 229980166, 406532593, 544661736, 944987368, 74067610, 979465423, 367319108, 691015763, 308068787, 270297211, 892899529, 571121326, 682341094, 508186314, 992592910, 570463576, 551864557, 443417375, 102996223, 180706669, 66278518, 547390018, 97982020, 377733797, 642211092, 809569594, 442856622, 912786312, 563198351, 549331531, 576357131, 891027263, 77805689, 816522985, 731749256, 313952972, 411776160, 795006290, 22615421, 348238413, 716260746, 223962550, 78670864, 47765882, 267128253, 587371111, 927656165, 192469863, 806624234, 136996971, 759497678, 646978177, 833527505, 472805550, 754214240, 960030895, 232746388, 490616131, 420542303, 904038549, 210637836, 74285318, 144447351, 742135765, 244372617, 87595635, 852731251, 594678505, 794681848, 228154101, 363702627, 673985808, 239196945, 836249623, 602064792, 462168907, 430511049, 331217937, 84426505, 529390112, 953694258, 768941491, 296949641, 617567965, 759210871, 554347066, 314959464, 855978152, 459336095, 416019714, 554419893, 643616814, 307318600, 193723511, 342506504, 737708842, 961578294, 644413804, 283651295, 449519877, 262823100, 438065978, 195660179, 15479674, 929627357, 712657286, 867475048, 618979059, 615899609, 290553872, 46585860, 675146342, 899293157, 138576244, 932939832, 413352510, 228638502, 577046541, 52412367, 271101119, 704058715, 716195674, 113738084, 976781966, 417637854, 201849275, 137988263, 703452509, 833173534, 774723430, 98520292, 647910333, 702073064, 101667724, 93613248, 4773372, 993672667, 598539625, 298728331, 547262186, 609550837, 42278975, 203431476, 764589375, 791435299, 273439277, 15186943, 247517820, 332116413, 672582410, 88991345, 573172714, 370502342, 495515460, 486357723, 529038430, 112617630, 9655079, 54905538, 630913486, 94540925, 694069860, 101033114, 601510215, 405093272, 877399916, 606786230, 712700446, 365826653, 440611748, 222502187, 628732942, 260127071, 415183336, 331627148, 603111841, 484627861, 252203062, 603610758, 918118836, 775502591, 558836403, 458735214, 903545723, 229008632, 239177179, 70767308, 751925156, 652119146, 980361868, 450630793, 63075950, 714904102, 795480239, 196855664, 446357279, 343343138, 751184330, 353543327, 265335039, 291055365, 141693974, 952501609, 772988967, 982806649, 295006336, 142133453, 389243658, 551050114, 837354729, 288032982, 926886748, 940810321, 996269340, 544323652, 123254721, 449847916, 164321665, 408440169, 540527971, 235735087, 384560805, 888470688, 711171300, 414716347, 219479361, 559050803, 610845133, 321258507, 296543705, 253557800, 771631909, 466270561, 966519146, 100544233, 474799959, 147649345, 956135303, 808272257, 279282920, 472357219, 422709994, 530025514, 999788009, 64593897, 709199531, 479060735, 311654131, 943520011, 427742758, 799287390, 782392773, 191335024, 830990096, 336010037, 237942831, 237453992, 695887098, 398366572, 529644737, 344086296, 862051533, 684436865, 317549101, 968659087, 366641438, 1, 49, 1272, 23124, 329180, 3895908, 39783804, 359447204, 925733384, 746545659, 165655001, 158091124, 719304162, 111160209, 171158550, 935012406, 874008903, 988755604, 608336289, 351327718, 211049418, 970686245, 441380023, 920727544, 396494781, 218114186, 934368772, 753990221, 203263446, 488226646, 946324350, 642441651, 816607227, 122420091, 629716118, 498106515, 488881569, 100763230, 814241373, 430998026, 986590664, 188596813, 238499794, 887765759, 719310391, 819612870, 840885905, 584773429, 811468143, 396065785, 368868801, 299761844, 617462619, 308704442, 206242421, 833439007, 106715469, 970135543, 972244832, 66232618, 207050932, 577078708, 955731123, 103929249, 632790957, 297717977, 280927805, 856143814, 140717794, 889342899, 570959166, 553036683, 311778062, 833874032, 321035571, 629235909, 60666525, 19636232, 889773198, 837811568, 283828621, 499062871, 459250525, 468391935, 389843786, 80632526, 462481073, 859711240, 66143264, 831825780, 518914304, 998480225, 496960804, 480385724, 483317701, 923742113, 771054094, 630267330, 478946945, 527928962, 674723787, 882998613, 123711144, 324674723, 964132061, 961988031, 65215295, 858250635, 924300325, 577545014, 241841560, 172586320, 726876085, 210684082, 897202470, 742850020, 161301259, 120853804, 344539574, 836860211, 667275920, 72688787, 930704832, 179668299, 861726583, 168665810, 834696469, 672920894, 419563732, 302874180, 454615268, 934181182, 119694911, 779976833, 216225187, 244379028, 586838513, 942544272, 397970796, 155525782, 435250288, 609294947, 697035870, 790138207, 313089121, 451259481, 904475234, 15500998, 428233316, 352796372, 805867626, 355791012, 191743365, 390372515, 86113794, 224579645, 34292553, 472538607, 244805809, 799547326, 350596592, 550928379, 248605526, 858957317, 809083222, 418025439, 717379009, 843111164, 748566980, 795763411, 344249103, 246799165, 468081584, 533360568, 97839725, 814208152, 370784820, 149643652, 648814350, 586462723, 179226570, 323415874, 413399345, 830824722, 901264775, 785155020, 673315179, 883230707, 320461657, 209574161, 896187167, 641537195, 580708044, 615201169, 907420567, 226969633, 44823693, 653925850, 618905940, 556249274, 683808190, 595045606, 406684866, 817926872, 498013040, 741888764, 255307898, 750076370, 226664326, 45791371, 138249186, 182084615, 925519009, 32002450, 507648904, 36302093, 164244320, 134446595, 176304234, 443232913, 204696272, 377207389, 330407781, 317016375, 255990328, 346121343, 776903928, 865285835, 180645765, 94169320, 523805568, 66571932, 958229276, 706032441, 157122799, 174128102, 265560802, 960871567, 814597354, 840895548, 702037, 848074074, 17426708, 276377856, 55696613, 206160180, 32721003, 453495162, 587538197, 204676036, 610254246, 936113705, 842825687, 202272844, 145230437, 624393323, 739106533, 700708897, 523328161, 691038973, 656087189, 213848962, 927815456, 921255504, 609475698, 113463094, 529085932, 807792149, 579407091, 163833313, 694176222, 471399591, 346973697, 718259544, 297359882, 892552532, 451373341, 120883534, 8029910, 624607649, 606649877, 815313728, 231664869, 673443919, 615486405, 94571095, 110823650, 950289120, 646876432, 928906934, 684469503, 297251947, 919054473, 285157267, 967739040, 274416446, 465229888, 656873003, 825576691, 53305194, 539107135, 609069516, 669008004, 585520763, 526072937, 91836656, 101778461, 538228891, 424599066, 719851020, 234795290, 701214554, 914481398, 497763115, 504286064, 212679726, 409710596, 134500525, 154608785, 554889670, 267547678, 851784437, 749366191, 681515762, 587313005, 604179607, 297539881, 51380469, 30897443, 988568867, 430543091, 168358864, 325894509, 131217074, 122226126, 289735266, 2541560, 697428098, 339809826, 339814711, 568813016, 256466301, 865405619, 710940331, 7424767, 660900037, 729644940, 444, 450105203, 690939247, 459755659, 92556107, 42398758, 782901298, 483436309, 73995240, 784415989, 602791285, 655683750, 744368335, 684929720, 939318197, 1937536, 94209990, 544006669, 195169186, 297173575, 151918090, 559870646, 425964491, 818978660, 571568643, 60393204, 415731654, 547756555, 991386612, 383053326, 997830526, 963081859, 107336308, 898219937, 906988404, 550036125, 981857264, 691293427, 481189647, 501756531, 316529056, 476096058, 168221459, 165690115, 553028411, 960794528, 453386272, 963889156, 71983103, 494867184, 462967097, 635240847, 989817132, 23786457, 968645733, 163475174, 884798755, 971346358, 8231228, 947835970, 751371876, 21594745, 702982989, 997528759, 30899466, 874470660, 839706683, 64336797, 183002010, 415355406, 851375333, 802315034, 662347966, 459017349, 83113197, 807783874, 686211775, 665742332, 548408223, 38712773, 947065654, 224142524, 544199777, 554457822, 161813447, 59932464, 324817969, 826816639, 159675767, 610260222, 802832692, 962264291, 230527850, 654881259, 493134625, 56109407, 491401533, 163680598, 892934948, 889185132, 78662275, 741528574, 616484511, 204394884, 120980232, 4959172, 884202370, 468625389, 987185268, 797914336, 292935354, 542176515, 965256954, 25044127, 701524209, 669825969, 264620823, 983915826, 463815578, 325409981, 142164710, 946513145, 626025918, 890502327, 456729879, 921471703, 889764153, 10834930, 550258959, 888111963, 456661896, 560525119, 254574198, 379302005, 359197537, 748972811, 432885247, 174603143, 495215302, 304225805, 499574, 89067439, 956588800, 479903186, 900293862, 918419160, 874312513, 779518268, 750190343, 34999197, 204187488, 29703716, 310295240, 212734818, 705461990, 880565621, 542764103, 578132976, 871657196, 920555643, 635330221, 603836039, 905337022, 446003049, 531829391, 914627500, 109964459, 793773872, 883594493, 588890899, 761763418, 850946563, 47045637, 406265955, 398330580, 175033998, 98562597, 74022406, 109783010, 888406279, 62923507, 851720727, 920064661, 659715101, 731241623, 740764931, 68490942, 26861674, 832409630, 156628069, 65837301, 277330611, 504531610, 621094682, 513712789, 824543274, 863846088, 522929299, 50674845, 205053841, 391074024, 703020653, 598865065, 977680558, 126857946, 571772915, 596794646, 195429545, 328266420, 36051456, 451216030, 522276964, 948367998, 561406981, 389510759, 585943971, 108053297, 459413669, 288907310, 136029766, 802792879, 520247265, 414339912, 337619243, 597859489, 40005835, 350918, 321070418, 199829979, 141119131, 515535428, 350920730, 314377413, 808898947, 900198037, 799762368, 570476717, 244997759, 402733111, 626061442, 103647198, 938528989, 898060580, 652361018, 641847472, 149112119, 134262079, 887185896, 606038263, 859408453, 950373236, 692335861, 405660442, 565431386, 959094106, 393940636, 423632434, 612413824, 143336067, 663257107, 9730523, 471491852, 112828340, 936303905, 998673093, 55233966, 416039620, 144081002, 565258672, 539355694, 202448366, 14002378, 539019751, 307827209, 288622328, 788194350, 570120788, 965430343, 472467292}; int main() { while (cin >> n >> k) { if (k % 2 == 1 || k > n * n / 2) { cout << 0 << endl; } else { int x = 0; // rep(N, 60) { for (int N = 1; N < 60; ++N) { for (int K = 0; K <= N * N / 2; K += 2) { if (N == n && K == k) { N = 100; break; } ++x; } } // cout << x << endl; cout << dat[x] << endl; } } } /* 1 2 3 4 1 2 4 3 2 (+2) 1 4 2 3 4 (+2) 4 1 2 3 6 (+2) ///// 1 2 3 ... 48 49 50 50 49 48 ... 3 2 1 49 47 45 Sum : 1250 */ /* # -*- coding: utf-8 -*- # 整数の入力 while 1: b, c = map(int, input().split()) # 出力 print("{}".format(c%1000000007)) */
delete
1,716
1,746
1,716
1,716
TLE
p02974
Python
Runtime Error
import sys input = sys.stdin.readline sys.setrecursionlimit(100000) mod = 10**9 + 7 def read_values(): return map(int, input().split()) def read_index(): return map(lambda x: int(x) - 1, input().split()) def read_list(): return list(read_values()) def read_lists(N): return [read_list() for n in range(N)] class V: def __init__(self, f, v=None): self.f = f self.v = v def __str__(self): return str(self.v) def ud(self, n): if n is None: return if self.v is None: self.v = n return self.v = self.f(self.v, n) def main(): N, K = read_values() dp = [ [[0 for i in range(N**2 + 1)] for ii in range(N + 1)] for iii in range(N + 1) ] dp[0][0][0] = 1 for i in range(1, N + 1): for j in range(N + 1): for k in range(K + 1): if k - 2 * j < 0: continue dp[i][j][k] = ( (2 * j + 1) * dp[i - 1][j][k - 2 * j] + (j + 1) * (j + 1) * dp[i - 1][j + 1][k - 2 * j] + dp[i - 1][j - 1][k - 2 * j] ) % mod print(dp[N][0][K]) if __name__ == "__main__": main()
import sys input = sys.stdin.readline sys.setrecursionlimit(100000) mod = 10**9 + 7 def read_values(): return map(int, input().split()) def read_index(): return map(lambda x: int(x) - 1, input().split()) def read_list(): return list(read_values()) def read_lists(N): return [read_list() for n in range(N)] class V: def __init__(self, f, v=None): self.f = f self.v = v def __str__(self): return str(self.v) def ud(self, n): if n is None: return if self.v is None: self.v = n return self.v = self.f(self.v, n) def main(): N, K = read_values() dp = [ [[0 for i in range(N**2 + 1)] for ii in range(N + 1)] for iii in range(N + 1) ] dp[0][0][0] = 1 for i in range(1, N + 1): for j in range(N + 1): for k in range(K + 1): if k - 2 * j < 0: continue dp[i][j][k] = ( (2 * j + 1) * dp[i - 1][j][k - 2 * j] + ( (j + 1) * (j + 1) * dp[i - 1][j + 1][k - 2 * j] if j + 1 <= N else 0 ) + dp[i - 1][j - 1][k - 2 * j] ) % mod print(dp[N][0][K]) if __name__ == "__main__": main()
replace
56
57
56
61
0
p02974
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long #ifdef LOCAL_DEBUG #include "LOCAL_DEBUG.hpp" #endif int pos[] = {0, 1, 3, 6, 11, 18, 28, 41, 58, 79, 105, 136, 173, 216, 266, 323, 388, 461, 543, 634, 735, 846, 968, 1101, 1246, 1403, 1573, 1756, 1953, 2164, 2390, 2631, 2888, 3161, 3451, 3758, 4083, 4426, 4788, 5169, 5570, 5991, 6433, 6896, 7381, 7888, 8418, 8971, 9548, 10149, 10775}; int ans[] = { 1, 1, 1, 1, 2, 3, 1, 3, 7, 9, 4, 1, 4, 12, 24, 35, 24, 20, 1, 5, 18, 46, 93, 137, 148, 136, 100, 36, 1, 6, 25, 76, 187, 366, 591, 744, 884, 832, 716, 360, 252, 1, 7, 33, 115, 327, 765, 1523, 2553, 3696, 4852, 5708, 5892, 5452, 4212, 2844, 1764, 576, 1, 8, 42, 164, 524, 1400, 3226, 6436, 11323, 17640, 25472, 33280, 40520, 44240, 45512, 40608, 35496, 25632, 18108, 8064, 5184, 1, 9, 52, 224, 790, 2350, 6072, 13768, 27821, 50461, 83420, 127840, 182256, 242272, 301648, 350864, 382576, 389232, 373536, 332640, 273060, 208548, 136512, 81792, 46656, 14400, 1, 10, 63, 296, 1138, 3708, 10538, 26480, 59673, 121626, 226787, 390144, 628744, 949472, 1355952, 1826464, 2341600, 2833632, 3282464, 3584160, 3765600, 3719664, 3531924, 3093336, 2642364, 2010240, 1508544, 963072, 621504, 259200, 158400, 1, 11, 75, 381, 1582, 5582, 17222, 47194, 116457, 261163, 537459, 1022981, 1817652, 3040352, 4810720, 7230928, 10360160, 14178912, 18577792, 23327872, 28132048, 32571504, 36310464, 38903904, 40028724, 39552156, 37457388, 33941412, 29314944, 24179904, 18835776, 13777344, 9452736, 5716800, 3211200, 1742400, 518400, 1, 12, 88, 480, 2137, 8096, 26860, 79376, 211811, 515308, 1153268, 2391936, 4633331, 8438664, 14557048, 23874176, 37407760, 56117824, 80906752, 112162240, 150052400, 193572736, 241706624, 291576384, 341323776, 386160048, 424359540, 450394992, 464545584, 461528208, 446428476, 413557632, 373573440, 321120000, 268449408, 210332160, 162330624, 112550400, 77788800, 46540800, 28497600, 11404800, 6739200, 1, 13, 102, 594, 2819, 11391, 40344, 127508, 364587, 952559, 2293742, 5126898, 10710633, 21042989, 39117852, 69175664, 116857024, 189256368, 294745440, 442503456, 641759376, 900689616, 225195321, 617201401, 74227554, 586823330, 140227131, 711888699, 274217080, 795069832, 242715461, 585116357, 796764497, 861974465, 769155485, 525176285, 146566301, 650715556, 73773796, 455145195, 828946802, 226153586, 685663993, 216281593, 828705600, 536385600, 309484800, 166924800, 87609600, 25401600, 1, 14, 117, 724, 3645, 15626, 58741, 197280, 600215, 1671266, 4295107, 10259436, 22922995, 48184950, 95816051, 181136304, 327071752, 566117888, 942525072, 513281017, 349163810, 532145419, 154557773, 309226767, 88509354, 563257605, 789064441, 766807654, 474675580, 795689314, 599134613, 627066840, 658988947, 307608398, 337632800, 295701193, 44870369, 150212311, 705302359, 336038622, 452522163, 797367958, 62674553, 57993322, 777736994, 845298906, 452367755, 90655804, 810196653, 976943895, 564798323, 582118351, 994783972, 869862386, 697759993, 660441600, 381024000, 1, 15, 133, 871, 4633, 20979, 83313, 295803, 952299, 2809009, 7656027, 19414457, 46086247, 102967901, 217634463, 437195525, 838372452, 540635289, 722168530, 638311860, 640827391, 196046908, 898688562, 478199884, 793020369, 808862771, 562236075, 94791602, 385333320, 237794527, 197694759, 398043392, 504456766, 579736664, 78137089, 793367253, 961295251, 280517488, 179779783, 947563092, 901772777, 859566930, 199212409, 920781370, 362900807, 735004334, 297264154, 482748036, 653703312, 140400674, 623159781, 320434095, 373194802, 13313867, 205909676, 360223815, 570584277, 68075848, 372652149, 961247580, 23084534, 261139053, 151302323, 715359965, 625702393, 1, 16, 150, 1036, 5802, 27648, 115538, 431844, 1464468, 4554040, 13096378, 35069940, 87969166, 207781760, 464351910, 986188668, 998611836, 879505923, 237509223, 15110629, 621334822, 88677622, 257578542, 963016850, 235638961, 442107823, 429101453, 483004748, 329733855, 718448185, 266304376, 413950543, 256286771, 626720357, 318467482, 59069608, 81901162, 352730851, 104241055, 503595237, 956355036, 534522134, 457799859, 108929893, 887297322, 424614770, 265024591, 876853471, 515703045, 692038809, 210906163, 20070317, 468291405, 145357835, 797577421, 232358134, 747771239, 343859985, 833879609, 78548665, 289896769, 449285934, 313197004, 379603290, 397630660, 609910102, 442642726, 627950853, 722186028, 705163253, 998661511, 771071664, 636940611, 1, 17, 168, 1220, 7172, 35852, 157132, 616084, 2192506, 7159090, 21631676, 60902460, 160707468, 399489140, 939796228, 101060910, 481320121, 151453550, 952463061, 931694473, 957528293, 554162053, 990142499, 644946993, 651797781, 791594351, 556120466, 271969917, 107619398, 710253075, 280526462, 615698879, 99748930, 775178221, 257586036, 645364809, 806795120, 340635512, 801741075, 790520661, 68328385, 331513794, 351728404, 931812262, 91105169, 176869824, 445724501, 370449983, 359815736, 918724628, 869062973, 659791249, 657727222, 395793733, 32692523, 78858425, 151369211, 628504487, 842750087, 152091477, 889718876, 908002421, 944598446, 656459208, 712920845, 47550280, 92244967, 110652620, 951703750, 217822851, 901098263, 655149074, 861896271, 859184013, 992613245, 768042116, 807916959, 335381553, 909568095, 153171069, 827990317, 681893483, 1, 18, 187, 1424, 8764, 45832, 210072, 861400, 3206786, 10957868, 34666130, 102239488, 282743580, 736889224, 817936097, 262532028, 534038590, 412279142, 965109380, 86702267, 846482566, 945052509, 644517943, 548776024, 679330947, 152291502, 882910517, 188127435, 636778925, 902059202, 132531208, 193904122, 893705022, 246193070, 652079051, 958060250, 148697872, 504141990, 371410212, 807466717, 514477363, 565424570, 560794838, 11419155, 215137208, 665710713, 791504234, 359367396, 224050172, 509091270, 125989128, 782600310, 957126038, 667219607, 386301613, 605448653, 296557741, 618019404, 194294675, 222923480, 765962783, 743934970, 24324611, 512643153, 214242880, 286900578, 228877964, 91240846, 430467141, 533029377, 904804693, 373207899, 916503101, 83598539, 560288494, 363356684, 68282446, 152683809, 284461190, 124425011, 167972327, 428909487, 373215034, 420008537, 513304383, 874743039, 487193257, 97337408, 532639641, 184378261, 955976093, 1, 19, 207, 1649, 10600, 57852, 276620, 1183172, 4595034, 16384606, 54107670, 166643130, 481442164, 311240781, 381378831, 288429444, 380463632, 370477330, 171662912, 688513797, 626045604, 789881798, 844990830, 70546834, 230422087, 267733218, 970080423, 75064762, 104073936, 888990608, 393490487, 819401315, 362017415, 197941501, 97730360, 491049732, 790022455, 142301163, 381999002, 81566974, 255547256, 500580164, 503785886, 874661360, 953064009, 357278689, 416715628, 656421867, 311332859, 849655408, 575613107, 850236831, 533549113, 255339339, 611845477, 501164398, 135987981, 672393680, 678611757, 552403430, 470027818, 333312311, 203812034, 929380798, 133842121, 497262544, 839881753, 29703780, 133717366, 249364505, 959337844, 632980495, 72879056, 356819838, 662140760, 182352973, 260787823, 329159184, 423643610, 488600943, 164109163, 8143787, 184454683, 684285006, 693158498, 382122550, 488552031, 777204359, 564238497, 598675373, 603916585, 720234840, 93182262, 238936257, 486420235, 352604922, 958291193, 880928218, 736558676, 163545641, 189347824, 1, 20, 228, 1896, 12703, 72200, 359348, 1599616, 6465450, 23997032, 82508708, 264654080, 796563486, 260832418, 76986106, 528774007, 854313906, 307546108, 722735109, 61004626, 805619536, 18191861, 511411798, 993782454, 401030744, 633897378, 70862649, 96855526, 314416445, 92910833, 135520920, 492052755, 24334887, 643976444, 574388511, 317610455, 122930943, 637889505, 255461238, 950861369, 48876234, 149504663, 198682481, 942670278, 866921314, 563621302, 960474580, 980132644, 624295523, 399490883, 351714973, 945626033, 827908349, 157456205, 481861323, 472454109, 343580291, 683697065, 95059407, 841332348, 464714941, 596887160, 38681949, 757883329, 590303711, 64921694, 730086270, 15240461, 714742087, 32874447, 175996750, 277466516, 788882909, 11880203, 95097385, 778398376, 531252352, 479554466, 557013590, 609738833, 798714176, 859324339, 721484640, 268442938, 861267595, 806087188, 31691029, 950412807, 580575404, 849451646, 691790951, 264837637, 967322620, 365040170, 622467624, 456436788, 658680316, 60575186, 387550026, 215002020, 31349904, 449373833, 559514745, 640364153, 807042078, 450172023, 562637973, 109112418, 545193132, 195217263, 976304283, 1, 21, 250, 2166, 15097, 89189, 461164, 2132144, 8950214, 34503182, 123236828, 410729140, 284813823, 790835929, 594736274, 153822108, 374418504, 157537842, 147846917, 133568389, 483576696, 508616649, 656867821, 84463125, 640047601, 955370715, 182167616, 49108700, 229345632, 795610484, 502493987, 857101031, 142485158, 996679960, 742503997, 723858587, 317526153, 365342533, 250775491, 442738912, 408346120, 881242865, 135363327, 231979623, 347291745, 824934645, 995772018, 164592917, 354883487, 450805745, 963969802, 171006181, 92161176, 169883419, 961669090, 26844445, 393784092, 571606470, 464707158, 34144520, 652396373, 745405475, 202923498, 135935314, 703695236, 776259115, 48310283, 874186699, 219390686, 510394758, 751965065, 418424556, 8781061, 736058807, 674014147, 674780706, 590530540, 4352977, 803825827, 167292329, 541083402, 260679638, 665083995, 939990721, 816665296, 886017767, 669822229, 694816125, 643235536, 937314556, 115942268, 261159535, 687177905, 12245758, 694615643, 977706180, 217949106, 118952653, 898868241, 856650616, 42954342, 330321980, 535121720, 982503521, 719423135, 714354007, 18745970, 333448882, 302037622, 935654015, 778423936, 317991952, 284756555, 504736970, 155871365, 118263505, 797065125, 640838446, 258037348, 34344762, 502389803, 911086550, 1, 22, 273, 2460, 17807, 109158, 585339, 2805752, 12209406, 48792492, 180680070, 624410736, 25734764, 199973794, 977710523, 571365953, 412869707, 328237414, 214863466, 633048751, 257394955, 317735309, 673309005, 193600985, 704135816, 514918834, 650479735, 33606857, 490034801, 698396427, 67986999, 220797055, 218864611, 931163713, 940790978, 675674698, 85542051, 543018292, 61247584, 910803604, 831296179, 923943160, 89478028, 104500393, 161998091, 254912705, 539249258, 547749719, 357852173, 690014841, 206926249, 893887199, 747112232, 382059625, 148865046, 301618706, 260333115, 442306036, 247371284, 782005651, 233300621, 920894203, 317455792, 678639547, 427050277, 482884001, 854060466, 980543322, 860769666, 701293636, 771136168, 670745480, 486701027, 168461356, 848787800, 289825171, 498776317, 33320170, 430165721, 821516580, 115533370, 398776967, 333310602, 563097053, 553134182, 219816464, 216637272, 206027601, 933677337, 925510467, 267639197, 43693887, 486722546, 270929495, 877730912, 261947307, 375318068, 692508932, 989184491, 226696206, 288508969, 739837562, 849035543, 782296408, 273955665, 801085382, 431898190, 935043965, 202752072, 867866169, 151133676, 67940990, 78118516, 742654574, 165553271, 254022475, 668960857, 929973305, 656759571, 877339826, 925206924, 133648890, 623964326, 796176354, 256442424, 844384225, 955053908, 35821657, 33969824, 328610099, 171474448, 265634834, 954990510, 1, 23, 297, 2779, 20859, 132473, 735535, 3649437, 16435370, 67971642, 260491974, 931772466, 129241853, 915880695, 773220207, 21124907, 663657824, 89235883, 562087424, 395633225, 79602143, 818737728, 503346111, 923762587, 810187543, 71950684, 872552891, 722894374, 788701216, 792043650, 839896539, 577542972, 345484502, 350106805, 159630680, 594479078, 806985602, 451202244, 562057157, 345406448, 404888318, 371479292, 122121086, 196184273, 855722413, 625056343, 209132008, 580725504, 234791519, 683270249, 879431955, 820639155, 890517789, 877206124, 780147370, 943542736, 532169988, 134361777, 389279830, 486085405, 212150153, 60309713, 36144061, 220641769, 167907687, 433032241, 672669299, 4840381, 543970499, 860603358, 920463673, 899153827, 269139419, 99866794, 833550296, 732963165, 649634036, 220976898, 948879986, 81746947, 249278044, 943429751, 227240067, 617290217, 857759442, 317672542, 702411387, 392102340, 598392406, 771484657, 20769431, 772211314, 777981688, 103043307, 336611982, 922346108, 46010568, 620920750, 740298345, 143296430, 127113300, 229361025, 452883985, 298773134, 583669967, 430943791, 878469881, 498554889, 377075156, 399618101, 518539100, 610655946, 762624102, 339746521, 193491143, 582788075, 58498274, 139175929, 439487543, 659039143, 969039085, 205473123, 149794944, 735361805, 144310487, 952281582, 885994682, 290034640, 449859219, 870975475, 717604104, 930837761, 466542500, 510501275, 368063612, 61813298, 959329905, 938922014, 660077190, 12025968, 335011033, 657136343, 351072920, 964781583, 196462283, 1, 24, 322, 3124, 24280, 159528, 915834, 4696644, 21857553, 93405656, 369882084, 367190881, 745178532, 541448535, 237690972, 408537702, 191376116, 678513161, 493570976, 397907192, 9101765, 658714208, 122356973, 514532531, 911169029, 6916896, 782796, 910119724, 942560918, 62371227, 773940129, 523667340, 669757203, 42568262, 891666384, 467022993, 486796667, 727294526, 413613585, 787453753, 599953158, 417187968, 359849625, 117069116, 879478181, 12380000, 910899870, 838986319, 102687453, 103327364, 376800830, 429223538, 780159138, 706916356, 587575355, 971169352, 36010810, 483798044, 344462034, 787276711, 359714668, 737585540, 514856433, 506547585, 7966248, 935961, 931790046, 725219981, 437246235, 737823353, 539625329, 101294921, 998345360, 158678756, 14552916, 434899855, 58679632, 771567929, 908041362, 370603042, 958461645, 473954165, 329932246, 645017860, 950250115, 632956030, 39737256, 308287817, 593859369, 848980890, 73354610, 67983312, 794665532, 744501399, 571146358, 79777328, 768540650, 301591668, 87146707, 749547055, 542914952, 113807115, 981646049, 443442346, 689844336, 226785366, 664441023, 644644459, 65534356, 186334852, 433121661, 818953887, 687026114, 344822747, 464015963, 110899493, 294091084, 65199948, 37449794, 719226153, 501099656, 413337315, 725255533, 799293560, 259962068, 954615054, 373654234, 764439094, 914044890, 22085466, 539035590, 698634111, 313016212, 98993468, 941478268, 955683335, 902077766, 420565422, 767959775, 128648986, 355285226, 534029655, 104714136, 932643222, 778200211, 56428536, 225880543, 792355687, 449940761, 181471652, 529937629, 325235521, 6575392, 94094707, 441392085, 37264955, 911557047, 1, 25, 348, 3496, 28098, 190746, 1130768, 5985744, 28747851, 126764795, 517958180, 975500521, 75313899, 914923483, 611051644, 458281681, 932346365, 712529240, 185024083, 463834094, 950836649, 286357381, 871292163, 434939852, 58330077, 629835295, 27932676, 66354549, 10923173, 590226200, 526183672, 176005584, 809584977, 222348292, 260397896, 396327746, 178971085, 774808076, 78650222, 507195902, 144802453, 299847298, 581537053, 724817078, 350425193, 503589319, 654904119, 595937600, 992781673, 82554146, 868891604, 769490422, 119334199, 287573489, 85347169, 118147346, 949694675, 540939467, 927324362, 545027201, 610310429, 769058023, 21423, 262519735, 786795808, 240407039, 428554518, 447092428, 788617633, 367724192, 374279457, 343082569, 856162651, 150954733, 962857235, 700751807, 895999415, 533537747, 537990547, 268357366, 869434038, 633081543, 603452058, 947934680, 987367826, 743179254, 710352935, 835787228, 706586787, 845202323, 238777269, 405136472, 480736674, 155194042, 871452828, 677921910, 616952227, 984554304, 602482844, 894952109, 161534829, 782737895, 850072208, 670793244, 828100052, 222399146, 284700626, 231919567, 306545173, 673216888, 772842480, 314744315, 347738200, 25002680, 730048408, 649455506, 745857274, 196252843, 529935260, 419302767, 276709210, 732855171, 343508231, 624945362, 861002432, 484757974, 367927715, 209929226, 661865936, 531107025, 413469524, 479519565, 741904536, 610072165, 606639245, 934344602, 716197790, 587584177, 185414563, 306822687, 841034662, 971868532, 919896238, 158358640, 773475266, 936203252, 665923149, 911486615, 197651366, 774528535, 82937079, 883806524, 130206852, 774201811, 995994000, 245370199, 842572718, 793423605, 740588350, 687616120, 657690139, 857790226, 37323118, 88399209, 523321086, 117621631, 71036645, 222192424, 788926021, 202125596, 1, 26, 375, 3896, 32342, 226580, 1385350, 7560544, 37426495, 170077814, 716127109, 814596482, 388283574, 187079164, 480126707, 290089727, 38629756, 54115650, 64891257, 901599546, 718222041, 911275669, 323565019, 817912019, 805459451, 803612364, 201797073, 732830955, 80380678, 23464457, 701195891, 272214917, 913862649, 132026200, 669751010, 759341231, 973676755, 794065196, 967438659, 308299894, 10712690, 949669597, 781686555, 88559004, 727530543, 318751597, 278470531, 434911202, 804701133, 324324750, 981099143, 232682614, 987104568, 776649739, 786487389, 442468777, 569068005, 663709268, 881510700, 203686642, 57967683, 568729400, 236001193, 623959074, 703861418, 908672716, 70204475, 867825588, 827103298, 241630317, 362696969, 415618616, 805038660, 598704556, 10082872, 643477587, 415164213, 703084166, 477367476, 20036406, 629980785, 802614294, 952521645, 17601466, 311433959, 830294700, 548394039, 535645146, 521413012, 929141249, 283365227, 727229980, 443388093, 410708269, 286618040, 319768543, 938841603, 93475597, 394693465, 931196821, 495806189, 902879580, 707905623, 303901454, 576396872, 484544924, 486011674, 564305854, 311518869, 856442237, 372745088, 366968335, 813470622, 720542245, 551543931, 596748971, 778551123, 354920979, 984250497, 691689872, 327423759, 52302396, 920309409, 457393341, 162758194, 401889329, 760192486, 361045291, 58998809, 845800809, 8575285, 649668894, 501939170, 542308042, 574502757, 192463535, 690505425, 204738512, 689813836, 483570629, 525148782, 216925832, 952334594, 68584858, 946061868, 229986068, 113082103, 705545851, 563504064, 430610853, 209937938, 608555345, 578039088, 750439353, 944169681, 417934823, 74422181, 960090808, 568355902, 435674968, 894299009, 15861008, 618713868, 509911155, 168869978, 339481775, 369451744, 600513141, 71634326, 781507214, 857107917, 106564183, 736233715, 362800524, 615467708, 519437498, 342065337, 206666492, 505918934, 308299385, 20927738, 106279730, 457391057, 1, 27, 403, 4325, 37042, 267514, 1685106, 9470830, 48268511, 225792189, 978561725, 958557158, 38052071, 919433401, 254995547, 546697380, 704487939, 32839999, 508901654, 551556389, 663564198, 695178769, 814009554, 547143595, 371559020, 945387943, 670094820, 616330760, 976064124, 607380120, 8699769, 998280938, 580008436, 958036252, 912203574, 544195790, 396609897, 954428754, 708902921, 801338681, 431017191, 381717232, 344144422, 131861617, 874277396, 830300192, 596462835, 318671397, 244894238, 904557382, 834593756, 283869037, 697514761, 969250693, 509524190, 913260759, 384371901, 692021356, 509945770, 32685910, 505430483, 907189201, 193340383, 693205397, 603006308, 305262013, 925218957, 968092842, 27052064, 47727228, 477199307, 293774777, 98292616, 663047137, 995897620, 288543890, 998081856, 524487172, 892499155, 556044593, 972323813, 578208602, 933674462, 509188659, 985492681, 986901126, 628028841, 519717277, 311965185, 897395442, 829761538, 9680527, 161715155, 343759581, 402616197, 861303980, 911400557, 358697993, 515548395, 553147014, 892738525, 205604013, 762111690, 442223169, 7841804, 517369986, 84729818, 152655938, 700957258, 898706126, 75157861, 271201265, 543855670, 440588279, 204308612, 236683234, 208667572, 404506592, 809547310, 853106482, 518815458, 16491026, 491832633, 360120645, 923872102, 602086347, 641452842, 18221609, 229080666, 428455406, 569262655, 856993308, 230900297, 490066099, 367669571, 96292417, 52365382, 469261002, 374633464, 900617667, 182287939, 49700390, 796588976, 949085023, 222503562, 658471212, 94278399, 66098044, 72459139, 603916441, 257635815, 234793049, 951525459, 549173423, 938321308, 13662267, 288258509, 65326301, 11071916, 364716823, 929353581, 839483911, 199241395, 29486252, 482468148, 829994735, 370892643, 687560607, 531658704, 568187724, 486108828, 475403750, 227529481, 124500798, 228110006, 56292488, 958873404, 963718586, 481659835, 183136868, 593123751, 622015148, 469053734, 211587807, 928091671, 481375722, 612130911, 134707706, 334981252, 784422204, 712253942, 698883770, 390222722, 25478322, 28778175, 349558455, 616616543, 1, 28, 432, 4784, 42229, 314064, 2036108, 11772944, 61710789, 296841956, 322742117, 501368237, 486564198, 208215103, 787564548, 236938424, 301578523, 866593178, 461034739, 153403692, 741061604, 268366308, 41671958, 999969805, 820629183, 540097933, 348143198, 290585123, 709901036, 830657214, 397773343, 205345230, 80836479, 744283025, 767371096, 13280133, 166091858, 688213267, 405245759, 999129285, 957885801, 125598090, 229197648, 232621259, 771781842, 15692966, 623498734, 209019752, 451480479, 405116698, 905232949, 522429827, 160392239, 911337480, 463779522, 870625842, 997849245, 364479050, 834828, 300785526, 10186705, 265101999, 566806573, 614983712, 685595755, 48653250, 344390997, 673637797, 896886255, 108856368, 31386606, 486989879, 489263782, 517653845, 976993581, 117774221, 829510874, 294191687, 233225993, 831800739, 448583977, 657291524, 649603801, 456575978, 536862581, 855051723, 994222346, 302476269, 502749737, 322446053, 790323255, 357338908, 887312147, 181428924, 536100952, 55330164, 160205355, 190454705, 365581727, 201998030, 826748536, 400273437, 624522779, 849319472, 800147953, 80982274, 447705256, 168185200, 97822479, 309878269, 678607548, 912097410, 927785144, 334246635, 662138658, 715198385, 260363473, 461374975, 89468114, 651175074, 575096135, 130470890, 71518840, 879845193, 486812125, 128678982, 647847215, 49005945, 59417027, 550597313, 85275582, 589669875, 488581288, 579391253, 238935007, 307933774, 801626662, 991248834, 831660242, 2289249, 939337934, 170802252, 112167473, 712496239, 45742853, 482400666, 341362938, 957391891, 147812751, 376451585, 832724562, 418101830, 38563919, 274362964, 819817184, 400041713, 313141267, 806456583, 999307614, 670677205, 585839782, 845991536, 831623045, 109161241, 554327240, 822718306, 173814042, 363700239, 22366070, 479904205, 190929878, 554951008, 774006606, 279182950, 109357938, 401823952, 575672540, 860574847, 593910748, 547825741, 217594637, 989467389, 184852185, 331539318, 325720467, 383229710, 654245987, 146654996, 209385163, 560462909, 965812836, 65583448, 508391947, 709539829, 955465325, 214525022, 394005813, 531700924, 773028650, 417539579, 326670161, 406612199, 165245, 699092510, 550837077, 14964582, 527720684, 440459594, 268905155, 297293091, 881879628, 1, 29, 462, 5274, 47935, 366779, 2445008, 14530396, 78259797, 386723841, 770080067, 561338901, 331351593, 839635833, 167817400, 497149119, 881282118, 352201610, 471630724, 181160121, 88806794, 987377178, 289689361, 946592969, 656979867, 594487341, 196240769, 948508749, 810784209, 709855728, 576276359, 518417791, 87667236, 667014934, 181628700, 79050911, 337053925, 373883684, 560120551, 458872893, 815731972, 827954345, 771964062, 380463298, 190074568, 335845313, 308369049, 297128477, 730684746, 742600059, 263592454, 96421517, 206168581, 306386280, 238588046, 136275025, 509837233, 285349782, 467079296, 44733505, 132275281, 829959933, 391862643, 62600608, 253168338, 426879146, 365435454, 91732486, 471304236, 543190875, 798110387, 894371900, 696428631, 750022470, 726550236, 936549828, 542410178, 939184541, 791578453, 983635297, 823881369, 150676558, 585328209, 653882077, 963087655, 950795211, 936066317, 71868369, 440124326, 965151462, 175368387, 40663323, 699428294, 108367130, 332044307, 970432796, 572024201, 885659377, 539317691, 132218646, 139253073, 467726930, 45351751, 297376822, 508633325, 703469419, 746467332, 503668629, 112630766, 930570931, 962347630, 576196343, 698904389, 167199167, 333129737, 608922442, 222067115, 688206452, 802821275, 954540394, 911151138, 906746447, 902608727, 890863920, 307268385, 54404696, 104370759, 495676754, 441341576, 829087999, 88911607, 975336543, 381836343, 298727399, 758323163, 709721214, 146811076, 322114121, 909574264, 955852236, 803216000, 511491931, 157225317, 671670053, 367885171, 612666342, 842261160, 508147005, 345029386, 809990068, 981225972, 241279545, 458275632, 172983843, 48836190, 961296645, 538132589, 271432367, 877708377, 386417805, 815731556, 463571419, 404450924, 113136747, 549319603, 219464194, 220054123, 907114544, 328856175, 265047793, 589592614, 328159953, 809008569, 510434161, 420313068, 107873733, 868895119, 895337042, 156863206, 48004547, 666506430, 727609186, 85858741, 59205240, 78940637, 545962715, 139572749, 421355881, 858507471, 952603331, 401020118, 942925111, 296295597, 997986384, 115737481, 677010850, 282276283, 274892540, 163700485, 118592549, 846472792, 136765224, 236032397, 179431589, 539549211, 214067143, 923131121, 999465547, 232088789, 610013691, 896204760, 478686995, 218989077, 91096939, 221616643, 243944261, 454787573, 542927414, 355318220, 147354818, 482630, 675619041, 634351197, 478341164, 574509037, 738721209, 1, 30, 493, 5796, 54193, 426242, 2919073, 17814512, 98499977, 499582398, 346636279, 286311246, 338970899, 482987014, 740494022, 522312682, 389124982, 438269373, 295660905, 384589942, 269003911, 190728878, 21841107, 394443500, 159301748, 885681179, 869073529, 396029106, 969827087, 16747334, 474716791, 259235367, 753984455, 365768194, 423375006, 957390875, 407261764, 592999097, 928039310, 529328158, 133251022, 533719572, 434981329, 779487889, 212784950, 467080112, 287628298, 91658981, 576061624, 322787361, 682746649, 234833733, 676878118, 220869554, 982232103, 879428014, 742840902, 65876039, 230084790, 68776407, 988541480, 113769367, 288661011, 898604342, 790158821, 811679832, 416532461, 643426286, 357304561, 904850873, 143689492, 643378934, 217587561, 816799579, 741653213, 950522177, 519192837, 195766899, 875531753, 913462122, 931740864, 147485151, 73473743, 881407231, 943949423, 19375017, 95185407, 658198820, 654223830, 78841384, 487272636, 810454297, 156111172, 108214345, 594083015, 721613382, 413639222, 199581479, 219296986, 983776208, 50034813, 434669652, 336761553, 553659069, 443256837, 867959007, 649693919, 829394710, 511124003, 801382432, 809258820, 440312724, 549557631, 57091967, 619973166, 38255131, 989252595, 296849831, 126449228, 992478958, 948085171, 398912012, 308493194, 585304989, 581850817, 704472537, 457658359, 706849064, 974235300, 322942033, 801441410, 806760539, 930211369, 674605925, 140615032, 804334982, 654022727, 747554604, 304695097, 670935186, 973200118, 899755340, 43016718, 33443894, 486649937, 183173093, 28680647, 612676891, 17478829, 208078434, 467131016, 651933212, 464433186, 3993644, 959280435, 310671435, 524438940, 540166082, 143663989, 984026973, 596317769, 299039541, 925611762, 115137245, 238184581, 798462400, 902062936, 499673997, 696053154, 121959061, 376644235, 378356623, 996412950, 115590297, 517087995, 817795384, 731733847, 61225249, 930096903, 292653780, 149516053, 503527083, 233497811, 781589564, 87992011, 514696635, 495015483, 151617728, 478098704, 773499685, 621536652, 787266199, 440325002, 249898342, 747360642, 671517137, 216648293, 686506084, 544204132, 949750238, 249236969, 319054830, 756596931, 233403453, 594672369, 158463779, 809106181, 249481644, 610711719, 262167344, 179138909, 270160113, 278492510, 490828032, 946977816, 803242084, 541036271, 624688984, 204404014, 881539240, 779609382, 561095932, 524976628, 888316278, 139701497, 712146362, 413036824, 810411985, 241441787, 247390036, 695355554, 122993697, 227371919, 399947791, 833892197, 899399938, 781528108, 656359733, 551706967, 845829828, 900357325, 1, 31, 525, 6351, 61037, 493071, 3466221, 21705119, 123102861, 640304911, 83941000, 859775332, 485271727, 929183599, 393442380, 976105677, 287805815, 238271867, 74391877, 765979021, 335546599, 709265303, 808915958, 907593582, 463983041, 147572225, 888153362, 391439968, 221443415, 801779213, 245226914, 866175931, 810047153, 267980729, 805674759, 955321032, 906824500, 367243333, 486256638, 145115859, 530769671, 290945081, 932311137, 51068986, 807551107, 185085629, 261181005, 959829857, 118218336, 295880881, 506261294, 848742193, 936582961, 153400705, 578662225, 341741810, 161659811, 816049772, 839223846, 559301757, 400427189, 216771109, 207016492, 505237766, 795055758, 945605740, 555992642, 907845643, 982951177, 401043526, 597396374, 84431994, 362552441, 746539639, 303946121, 357484364, 893505269, 526515449, 560103044, 121894895, 445706213, 592793631, 713670463, 810676671, 143889731, 392244416, 73126772, 488568958, 542583029, 752584772, 7383345, 155007498, 994039957, 804821801, 379264833, 525210782, 239847467, 126254398, 219331239, 753237922, 434345445, 635807399, 872366121, 133933893, 590603804, 32230684, 70841222, 840236255, 909722819, 689521789, 529248821, 178846494, 980363222, 548654005, 434479841, 697553680, 35011089, 544881135, 260563063, 695816358, 44173506, 726085055, 671716390, 781464159, 450226987, 146813053, 877951734, 991641337, 221699230, 419417817, 794832550, 810418558, 969705412, 219055178, 274301546, 503413612, 695160244, 74090275, 26176299, 695070748, 341801549, 897892431, 470380437, 3467372, 448525308, 439337134, 724845391, 9187155, 585558376, 372261444, 277930003, 34819054, 431482585, 279947765, 492267585, 818516372, 484582901, 390623889, 856573701, 179325546, 611189228, 688765384, 847931848, 534263758, 557397045, 116495491, 85868985, 610969731, 478650084, 585159686, 14772190, 776211983, 474268574, 460744792, 134988124, 912707317, 105964987, 809266690, 785401545, 161419686, 653370610, 499797235, 534961655, 323936668, 802659551, 370287438, 326963010, 342959476, 313044094, 148582386, 976795271, 120954501, 724957759, 860215558, 270001726, 640931921, 833230238, 701256342, 242231076, 286286219, 13632467, 253663042, 129411109, 603714672, 564008356, 523901279, 216864213, 524434304, 182659511, 983267072, 644616701, 707181007, 618980658, 405751838, 571460922, 136629759, 744395053, 539608518, 963053644, 97893406, 866038338, 265757870, 944699732, 964525924, 892464175, 168006507, 562926324, 742708490, 132927348, 526909479, 79557205, 129052432, 157042523, 659309142, 834183171, 802572815, 517259737, 256356803, 353227137, 87135975, 224995979, 596580540, 402931204, 515099940, 793833445, 691900231, 589149123, 114327507, 887760880, 389703467, 830251700, 783657579, 433484966, 412892473, 432995349, 911076886, 112628181, 1, 32, 558, 6940, 68502, 567920, 4095058, 26291268, 152836946, 814626856, 19929138, 508014078, 3627542, 383619686, 178749032, 257695016, 714018516, 472708243, 782289684, 785010736, 673452130, 967313791, 416615851, 594708501, 823838568, 374885539, 520875465, 462873691, 866641568, 110422771, 371334024, 597629306, 954905318, 192386746, 711820060, 202869372, 886359460, 670157944, 884126969, 502946720, 582271977, 402610790, 343533084, 511648372, 517557636, 170605372, 597697292, 829559995, 983984749, 601678152, 265076525, 200313780, 586898347, 936910249, 473920775, 97417050, 844866738, 973357211, 106398807, 531568235, 220592830, 72245680, 709223174, 966562898, 364453034, 204299565, 516186616, 388239153, 70201813, 72763421, 794896998, 14537122, 759848271, 370782607, 723372604, 610938893, 161728308, 212501210, 376508968, 271352258, 323852567, 552136716, 801650724, 615740271, 208656790, 224034222, 747809272, 617340476, 153891047, 285642015, 901118362, 123777425, 16228193, 623027527, 937436377, 60747289, 714381298, 882770713, 15381170, 999192137, 197256049, 480638655, 953137460, 883599778, 148656904, 722191509, 39402136, 582147050, 757441169, 260428827, 253172482, 508174417, 834955862, 157349819, 261175551, 247577251, 264652493, 595186522, 812752039, 875384578, 747313263, 224431706, 462673707, 39074204, 237357876, 896371707, 361524710, 10299862, 761952483, 924315000, 304463541, 831385606, 228637562, 845205390, 599099308, 177524018, 209006125, 256908838, 355221513, 792061054, 713446694, 397486564, 756107839, 527866716, 337624854, 575430320, 456754471, 959728018, 921786900, 102983773, 936936381, 473475121, 131588049, 189268154, 863126769, 700571091, 871530822, 832046604, 609629520, 45186676, 853387560, 464311797, 368430192, 151536782, 691919878, 176735598, 972465597, 804610607, 50289062, 722819065, 20410813, 11987321, 648373171, 889715409, 778512390, 280809979, 767453391, 155472064, 275305459, 296611231, 377220752, 229158487, 259857310, 987705391, 873889855, 448418244, 657467052, 301028637, 400332864, 304525446, 853531448, 201469133, 757430782, 288842043, 292821474, 389580374, 148645279, 450672899, 404696472, 399758661, 549392647, 972607841, 459482261, 344863732, 405989209, 14412475, 913865943, 988039851, 302203080, 293916756, 28383491, 502818531, 791480646, 619991127, 151573496, 311251301, 362738947, 457688580, 884177111, 390413172, 889218635, 530910268, 818241216, 542232757, 765042883, 885001834, 10229128, 574524301, 836418812, 984923781, 235783687, 868003012, 379478756, 832878398, 751487743, 496700139, 587857943, 624473538, 510088706, 778144708, 214176553, 953029206, 646822434, 252787767, 281229254, 401166205, 434753895, 343430684, 941989547, 465870277, 861407908, 387687010, 216509894, 375279811, 453878600, 982073623, 677731113, 95924240, 198468867, 861679672, 204003039, 472066136, 228890861, 880462406, 133638984, 924365283, 274136081, 742318625, 898640542, 85174164, 775817726, 982947180, 716729952, 1, 33, 592, 7564, 76624, 651480, 4814916, 31671996, 188578368, 29248753, 200002145, 508415428, 442411092, 823607844, 339155380, 84465338, 814093820, 347929398, 722645092, 146033429, 312847170, 460125097, 915837300, 530134554, 683613860, 22911398, 950166343, 297700883, 874171812, 779302544, 705201416, 91735442, 764568060, 448540109, 794383951, 50664826, 501387621, 764478731, 392332791, 697065547, 136584719, 904822171, 811342153, 498086442, 66346910, 903864157, 648069920, 294527566, 68277872, 192952288, 465503414, 89641650, 342876181, 975687654, 849073744, 732768838, 299144725, 960087859, 432060633, 521050995, 669642411, 783220798, 964761936, 888496451, 578822675, 774117896, 595815330, 556187991, 328078421, 497539038, 461150544, 593197759, 454579240, 228665398, 675695769, 189021504, 506127036, 683711210, 767254008, 372876392, 950363733, 781425867, 518441353, 618578159, 210702480, 146366158, 211092828, 25645664, 252569415, 768287264, 315751220, 46304131, 875313001, 63062094, 41563387, 521548621, 882111752, 325592507, 674715724, 754661696, 386558110, 154963091, 238088464, 48050421, 639662963, 70331570, 315682289, 290604457, 553625701, 114470501, 286499320, 302628334, 934963054, 90280656, 946037777, 701374947, 21339121, 663053978, 944685826, 452543047, 117230904, 560747251, 199227363, 16627409, 318622953, 147892287, 924956445, 813803967, 785002825, 524657750, 94619872, 228326183, 399365341, 370689535, 675442405, 908504726, 873312142, 624281896, 910865167, 214431914, 356568789, 649815619, 48684312, 203060656, 723151845, 388405201, 798060040, 729614446, 977682164, 533436928, 146813819, 149571082, 895803037, 777214043, 552248021, 204656845, 982800841, 733286978, 63964308, 481147156, 389291330, 76639625, 311176854, 441157810, 671041225, 83215916, 462900391, 792922861, 933493638, 911064426, 640299582, 658369868, 816565473, 95242536, 385493380, 848295064, 737403618, 437312030, 117969370, 718173112, 995019578, 309321859, 756181744, 40101942, 426476878, 702396178, 795715493, 835764511, 743326504, 209546865, 430615231, 826070511, 334341237, 118979238, 371120144, 839568659, 676120384, 72519, 845333099, 357629799, 910834209, 593346831, 104377605, 380654497, 634970517, 115890735, 793059350, 887063630, 651636452, 507749972, 783577804, 143656503, 242083869, 911105370, 970085702, 524972130, 465698950, 325374351, 536364599, 196104291, 139239152, 633851401, 256158579, 919175466, 894613648, 315818683, 5141779, 876022828, 934709255, 681050535, 191918360, 662583345, 207316521, 848780031, 272975543, 702356884, 769886013, 961041057, 6500208, 70262300, 494310602, 739703998, 384177576, 343193798, 693062586, 969762392, 66952659, 685150241, 630304511, 413041585, 515441116, 191001103, 912006289, 473846745, 605301455, 795067847, 856671001, 508821454, 735406667, 258084054, 117733205, 780290039, 23367661, 593944851, 692132515, 4650353, 187487602, 151055135, 898863554, 673507355, 215091232, 603704193, 594167428, 682519378, 496434131, 965159536, 430378180, 248402836, 470772870, 307340881, 347656961, 749714755, 122062081, 558277910, 169666679, 941915597, 277380477, 270070849, 652088255, 549544085, 1, 34, 627, 8224, 85440, 744480, 5635892, 37957128, 231322416, 291965329, 678229698, 199102832, 733159273, 432255582, 825398987, 945721657, 530531857, 605903605, 198451639, 405128341, 881104650, 95712824, 87475937, 88052462, 854657880, 671362129, 345256719, 279913923, 405600244, 791623773, 184158289, 548244621, 559931899, 811302745, 822463013, 829884052, 612803610, 114370483, 717655175, 250670751, 158660853, 996989593, 922821653, 403693850, 640224917, 726696528, 558324649, 504260316, 457498775, 235424755, 214797729, 595578763, 703649058, 668639597, 273743575, 830864733, 8621856, 152359528, 351252345, 54682531, 631863641, 533130514, 548187372, 212107229, 690348600, 269650465, 644636821, 588449397, 716956418, 569059993, 571818753, 620732748, 238441683, 628780105, 73251606, 77232245, 265685085, 860541096, 181038883, 995121568, 787161997, 984175916, 994855981, 70309595, 279951259, 412871815, 881913054, 268261177, 575207129, 196951994, 610045829, 705950877, 200402175, 179100085, 912730914, 795237101, 264189519, 756871237, 840795855, 477498958, 568161700, 101820158, 478938140, 546807900, 824972458, 320572966, 375535061, 712736750, 146215080, 296045377, 892271196, 198915619, 973312163, 292266224, 766955048, 774760742, 724672108, 189810671, 590576941, 955913056, 705860403, 956268133, 120026477, 977289531, 897970234, 594373646, 802624855, 16139526, 294245189, 661099173, 505327457, 687552139, 570417673, 288750674, 928298666, 124243321, 103493234, 782666425, 810561902, 479140046, 567654010, 66398299, 87173858, 171094018, 401077961, 201022453, 649177770, 751032860, 458665510, 583069945, 3741921, 644139368, 777863779, 427938859, 574083500, 968708036, 5259009, 14753514, 566158894, 428971413, 29779639, 601893398, 934948155, 463945886, 442386091, 787098075, 294593703, 467511028, 998601384, 749411810, 495421040, 283658473, 287441865, 687819162, 964614928, 353638623, 648210867, 238886215, 893364457, 158958124, 29345292, 800368429, 595552294, 572640574, 913495958, 705720935, 850127566, 83220185, 799386246, 848828465, 335228800, 498492912, 819731260, 972790229, 191002130, 289923062, 997108332, 479589354, 13686350, 377632380, 915241611, 38445376, 115515812, 312111610, 862313776, 36444206, 491509332, 899038496, 494299749, 577210085, 925017398, 377889538, 129014425, 544007299, 134491550, 77644047, 150186363, 549177782, 243194000, 889811949, 476414356, 302027816, 934223010, 116351600, 936035078, 728736728, 99057293, 233685532, 715949090, 484999785, 527817757, 40017975, 403976200, 963752121, 230480821, 165554215, 501580240, 480519751, 374582722, 588438105, 13652788, 835399525, 909982574, 63720437, 165170490, 768431894, 385829327, 268804006, 950180874, 398363435, 512876602, 149304949, 858796870, 305796565, 80654592, 209088881, 365995652, 741417209, 580938286, 849913699, 209592153, 430983500, 292682916, 89781822, 346251985, 899920810, 490814818, 319818650, 865676138, 199552930, 49606030, 396988194, 289382805, 394082926, 680976370, 125444750, 312554820, 11884810, 730982055, 36906819, 144996838, 532313029, 339360681, 509568859, 763509787, 79118993, 930179491, 756170211, 627420026, 161269793, 542072728, 498021200, 392693531, 523036960, 919765468, 367278574, 755839168, 466305341, 613534367, 534169086, 166110829, 107021592, 280650539, 268761091, 590645300, 269909358, 234042842, 1, 35, 663, 8921, 94988, 847688, 6568888, 45268120, 282195928, 611807809, 518705216, 990050297, 271051698, 122408000, 405189613, 94926808, 864141322, 53735275, 24011733, 736554738, 929218491, 904644261, 780020466, 504939462, 734736582, 905177688, 612557341, 964587741, 714487014, 841745335, 939266470, 221175663, 553510265, 427922711, 816845808, 551876447, 104782423, 432788437, 75343637, 98990584, 780296494, 401590023, 184896774, 39759619, 46187357, 134251301, 342702573, 517720, 358976055, 583636644, 962541900, 167548822, 161325057, 550357824, 277594189, 165080443, 231182951, 735855208, 908711807, 571176463, 42569340, 237272417, 790920442, 624258522, 720842250, 768667158, 451444080, 122083868, 366641147, 308868590, 806102171, 616667978, 212552319, 508058403, 321794596, 570313528, 460066496, 737582233, 710064955, 691296552, 63281621, 675218599, 955697061, 110510427, 512018248, 153536802, 745040214, 175960352, 594730127, 864516601, 686994354, 671193730, 758082482, 651219990, 268055455, 209604272, 794711886, 922988292, 233697499, 855180879, 757331520, 952855529, 712373324, 501054908, 610479660, 988305583, 359797155, 981016202, 392046260, 222705767, 339379031, 255395660, 760704862, 824907580, 377018926, 100950434, 568292199, 345612839, 702169410, 76425882, 316244660, 633878521, 345805531, 43908232, 498746978, 171201976, 618174067, 828038701, 451921110, 452033897, 911744318, 64098066, 83924105, 595571257, 147937863, 948006101, 514496555, 77289879, 282007238, 421799065, 804334778, 765393189, 193008022, 263503242, 355816072, 278012511, 227861525, 902054870, 618486736, 979710805, 971590402, 61042704, 664850817, 113175896, 488535341, 617582794, 612947413, 45804546, 259073867, 263038734, 265569066, 162645795, 60875191, 359494871, 979749311, 139358127, 29529290, 309151363, 279422923, 345089768, 87598058, 700337527, 479652910, 994907927, 933976635, 324751070, 167729179, 810904540, 230096199, 33195878, 559883815, 674302503, 158162721, 997344757, 974400760, 476723636, 933671908, 372458552, 487353300, 603836216, 903251923, 461631785, 620155186, 664707969, 139328434, 135802315, 547850780, 544085832, 243757336, 714792500, 277247444, 736724545, 7257213, 104433298, 33077964, 133546300, 658470668, 407613385, 15549086, 409602732, 220607605, 154437658, 434924060, 212726357, 432662346, 953726155, 55947205, 221865215, 896738564, 702917595, 219549259, 784888336, 998968443, 737927890, 111474776, 479544893, 204531672, 722344756, 339644359, 296335713, 172390948, 145219000, 740849986, 175518952, 876047366, 775536223, 909308844, 333180421, 96764559, 528034987, 396799645, 413114766, 622993858, 563074288, 710510893, 900874806, 315196225, 993816000, 623166550, 642968249, 328645521, 844280596, 556521945, 272458659, 580772239, 284457451, 186994948, 909094031, 935768265, 319893231, 114481887, 109302906, 586737223, 466388545, 717893242, 342269015, 164207650, 394855609, 330099455, 836592042, 939058426, 541984626, 852636994, 524042858, 358495217, 921118657, 464191254, 284341637, 363378706, 679058686, 917272314, 562488937, 105215359, 614330571, 404183151, 365378837, 280141835, 594380252, 79371576, 739360814, 210010442, 10232401, 449147207, 97531383, 696215921, 900156881, 51327507, 224992261, 946786023, 685932368, 729503576, 741723150, 479111191, 872812474, 454570174, 217639787, 553029674, 745481673, 194164134, 241094015, 672191097, 520725696, 177728245, 485102929, 511421076, 349030122, 157631252, 431267952, 813510823, 604978728, 799539100, 871169236, 265066919, 191499414, 52282294, 1, 36, 700, 9656, 105307, 961912, 7625652, 53738944, 342470612, 999200441, 797070294, 375863958, 9523173, 166271514, 481765400, 879554808, 535680694, 467340394, 413500052, 692064693, 580959888, 369347871, 169821810, 621921924, 137911737, 940784828, 741570244, 905517670, 551817302, 657369119, 721648393, 536831850, 500879720, 726253305, 296162041, 891225164, 880747817, 182180719, 544050763, 654393489, 357200480, 356889637, 635049309, 374948412, 486169649, 407475615, 51228607, 535369936, 325305756, 74215114, 944988254, 919680639, 647644667, 526651696, 763479161, 278201627, 103508412, 387580497, 561661113, 38190290, 310583115, 569811056, 351262691, 985051203, 403138813, 643132429, 289980808, 570569544, 550559442, 934893929, 352045239, 810200946, 61218795, 42358563, 89293505, 506603831, 400595820, 117891860, 469015294, 166372283, 320554017, 155147268, 955469333, 896730515, 826039051, 931193995, 36098122, 893366407, 522834450, 917130400, 759016216, 23584371, 48884561, 844352920, 604253909, 886656394, 548946691, 688504947, 972899398, 721435398, 409845929, 399680456, 284950632, 796741351, 217452678, 611033399, 592790059, 219084711, 504058472, 277505825, 120276345, 694287126, 35416589, 305976723, 447309020, 969824889, 565684997, 62139306, 857693940, 901163636, 262850397, 927594387, 721909425, 958991660, 471789360, 260033992, 544270783, 877013007, 153311613, 85679796, 660447085, 213261352, 954007371, 8266647, 75417194, 28241545, 733410215, 579803150, 41901427, 876245480, 900022334, 813145019, 668096269, 73987267, 175135030, 724217744, 139403302, 77167168, 775504145, 397863476, 816272710, 221129133, 242347768, 885383757, 728565085, 947647994, 605379205, 598139075, 269419404, 178994132, 603450690, 652850980, 19254430, 182635911, 57268581, 239936865, 878358438, 515315850, 141611162, 665647032, 700517198, 807335907, 965806030, 897617342, 773532343, 924389029, 419741954, 420757062, 581633294, 179995348, 34733596, 923518220, 731757774, 573741822, 531242380, 813544540, 336821038, 442738016, 551572674, 470067223, 638102335, 989538200, 956007535, 613954394, 401563904, 103519975, 569290006, 144046622, 689996849, 638589501, 358099514, 725282594, 691632053, 702244532, 284031792, 473014945, 465414316, 116886234, 142777936, 342518645, 138051544, 347505254, 57716395, 939744642, 114873890, 359397343, 671360195, 724489266, 683013222, 345781236, 550104449, 877003874, 63443231, 224660360, 658626409, 133687251, 933261032, 273131705, 48202694, 144323990, 559827621, 779609382, 930553156, 35267489, 493151974, 645090534, 517431516, 368634145, 540405134, 215255527, 144656993, 549192120, 659960465, 217236722, 742258783, 538378955, 211409043, 760044403, 389330065, 692548510, 583181570, 627949137, 829194932, 234693932, 651493437, 707321269, 828284674, 652751037, 873736576, 267300299, 729754896, 429920674, 875733754, 60888792, 225478637, 39002446, 407176220, 761384762, 131879783, 661443680, 51638267, 568172852, 186052558, 637968267, 556455031, 313451921, 238551452, 644714578, 449541818, 640800540, 923965193, 38909678, 41940756, 338485997, 888949941, 526610135, 48150535, 778944981, 480892059, 874500608, 900322190, 973783674, 468787609, 618167632, 913754856, 327797543, 845404908, 752246622, 831422464, 484541178, 501948673, 647306990, 882577308, 771072569, 171273117, 620085552, 385025714, 126556571, 472404266, 664907284, 284895728, 860747643, 285481155, 480968189, 426457284, 579997870, 253315436, 264967992, 325506073, 407074927, 289125366, 710111895, 168902913, 39893459, 264014099, 335462311, 284068808, 624620216, 265346008, 330183605, 301153063, 136165951, 223572391, 416076696, 791322793, 440956632, 812128221, 56870528, 529001955, 157225171, 153110824, 659760559, 934444871, 1, 37, 738, 10430, 116437, 1088001, 8818820, 63517016, 413577336, 466132154, 602224077, 950429493, 571044537, 948550192, 759622519, 360792951, 40404471, 549575252, 331339348, 353289303, 642561133, 959520386, 811439523, 113998222, 306747368, 686402540, 608623079, 625536502, 102898449, 513583096, 310389938, 861964034, 144673299, 459932354, 368865341, 656127608, 909171212, 807159815, 446679967, 582385365, 827063804, 980667706, 264330272, 600794253, 740948802, 906942889, 945728377, 18846332, 985664112, 7701519, 115050801, 870345183, 606442987, 443069595, 817056595, 621418778, 690512206, 255049968, 161633922, 402904753, 372549674, 317848199, 779510849, 454579621, 366999138, 955388684, 940196190, 710141532, 289889641, 400266971, 473006189, 518001144, 203532149, 277752196, 73653399, 957077834, 580796815, 797359407, 33679102, 974181950, 229170666, 221016673, 753153481, 718492334, 480056326, 134801483, 829292600, 87160542, 624566954, 157188714, 912350324, 248797376, 864861712, 311625650, 564724833, 638897879, 211767349, 670618766, 182357348, 406247054, 335828971, 235855014, 766599169, 873180801, 943988159, 797515463, 949064434, 37355164, 366387587, 992037332, 39085136, 457008562, 710738441, 147115812, 245127944, 221285308, 44913339, 750687382, 166494925, 487773254, 2533400, 294773545, 964749926, 838352064, 354747747, 983055334, 906311260, 773970452, 136280712, 732037766, 304757958, 868694356, 9717274, 686595153, 845171773, 715645486, 457517675, 868876321, 257821804, 398717354, 952878758, 459394839, 735151005, 982831573, 597714383, 483469574, 396276440, 147004054, 275175512, 449695021, 280047682, 322443740, 657859781, 236891682, 338855034, 771308208, 208042945, 611383416, 470020781, 959351211, 871193372, 314812327, 417008584, 157794928, 30304137, 772193806, 92880268, 735754383, 725090032, 678769251, 695572650, 713627047, 220917673, 996272940, 711499227, 615337951, 732510553, 265860373, 10346269, 946167168, 327969286, 691646116, 588894836, 556718107, 891256057, 29035235, 193826291, 413628097, 951441661, 812044940, 432676044, 866499015, 139084375, 351784477, 900166473, 781089061, 914118385, 818686834, 857340116, 329139077, 237478891, 284468211, 215304591, 458481845, 227432873, 865995208, 554027168, 463893384, 221077016, 374577314, 119759917, 360383422, 704486222, 404678036, 137104816, 809074680, 755219457, 826569646, 867839827, 768754773, 89100960, 257194726, 724398193, 973188469, 858913715, 18463743, 680309520, 450458743, 140048366, 764912130, 371007014, 456635116, 735728421, 778688084, 152973997, 434969799, 574794869, 212648988, 728361716, 542931287, 302379989, 751579729, 92390154, 220181191, 407743441, 315151252, 520426045, 407908622, 679231575, 395003916, 794034847, 347654216, 68808817, 829211530, 81601558, 162714123, 30761100, 394951130, 268715057, 283612447, 241955302, 623210420, 275963878, 159211117, 252162685, 595441437, 529655660, 437222092, 841111836, 179960886, 135660761, 917237477, 768051317, 444580903, 506791801, 487181239, 875489229, 680194597, 205928376, 680445786, 683783933, 969592088, 132367844, 396994570, 832926454, 630581401, 505495558, 385734337, 641541057, 95095471, 989574773, 911275608, 518514268, 282262989, 419271827, 469001628, 420271862, 947083037, 407529572, 59976989, 434008630, 863717239, 945875935, 75676474, 215313835, 250745830, 87811894, 264747800, 37018493, 98597371, 710706515, 142785594, 391940962, 336466122, 341268838, 21508490, 413865364, 232101532, 92701632, 8053527, 412757119, 757312194, 403681966, 949009531, 880975038, 37050684, 272465075, 678404684, 193438246, 672480427, 700064004, 142628578, 802581416, 279140871, 973655892, 800905741, 598005728, 935768930, 668573394, 207197197, 649003003, 270174246, 76144766, 315632510, 875459369, 359185050, 528086919, 473525359, 758981160, 249109513, 189948776, 344668617, 795917722, 549344159, 348920520, 486734532, 302843834, 285724416, 810790165, 350603652, 574459989, 873908008, 1, 38, 777, 11244, 128419, 1226846, 10161959, 74764168, 497121432, 26344483, 38234873, 423642505, 376339808, 863392989, 917340710, 353019266, 355701734, 828153534, 204362640, 374924405, 607928554, 963790885, 940721850, 687219775, 764705852, 876861874, 763291630, 981930457, 551085656, 980270580, 505906881, 983294521, 135354674, 135665519, 630173290, 212355830, 143623144, 227056594, 817242891, 163435465, 418550307, 731605596, 289566443, 285968813, 433396374, 290335437, 260134359, 257166798, 296375223, 99595679, 459082068, 507135523, 972388714, 133158519, 975205558, 982374421, 644050428, 996778111, 162109063, 746906113, 514292299, 926426755, 356009260, 196659267, 409916170, 325494529, 655002543, 558511285, 36446396, 471095084, 174722764, 671116976, 160891233, 868903396, 304037581, 23612943, 337881011, 234387037, 370561646, 356075504, 698718914, 535181667, 514726084, 815242029, 608023573, 448544035, 835833664, 991058290, 399256230, 20531824, 669361826, 539724566, 760387110, 830813942, 547045707, 178050500, 929198630, 6813905, 110412371, 858816899, 809729618, 833864785, 232951975, 485491061, 613385270, 553071180, 627954610, 952757220, 692906182, 748961577, 662247263, 52513186, 149763764, 145530822, 33882391, 453364543, 997405166, 992558694, 759602854, 84367345, 100239977, 854081961, 858205595, 486024240, 91555639, 177882871, 949083392, 519037398, 556513157, 228484413, 492836072, 589348909, 196163508, 266626335, 11245627, 157404436, 270481031, 638406640, 490889097, 527976504, 370488458, 823400678, 322868722, 206357234, 647142926, 768625346, 265191551, 148038615, 363341916, 267722164, 893118504, 738977503, 565582757, 762106365, 849369394, 766495732, 13155357, 515888816, 523640060, 647203814, 437352666, 546684558, 961386555, 7614498, 893885274, 936701598, 428062192, 113231261, 402917050, 409965843, 165984892, 799921270, 659405770, 509144023, 774701607, 842603658, 487390464, 251731862, 581859608, 922860080, 258383681, 201597752, 292594441, 460903867, 638298912, 848020590, 765105850, 965506327, 844776867, 575276415, 85481014, 653985938, 197424999, 197600210, 989591463, 112466859, 918937916, 878289962, 30252094, 561367106, 701604983, 794157139, 205106586, 358551581, 218730442, 820317821, 718077344, 742273426, 343977802, 723940137, 91227055, 889419899, 835334285, 445942872, 874169472, 806494972, 841559090, 34902341, 936247116, 742348345, 932764662, 776531786, 136341990, 609226011, 962126351, 692609037, 492230872, 512261831, 61424189, 202712100, 557188069, 23267751, 10862209, 780311892, 698216821, 610626474, 445698906, 548927052, 791636623, 278469086, 802570473, 843652647, 214889050, 950325814, 545811188, 732525066, 799299048, 547938769, 119233118, 836166054, 515368215, 821018309, 703809789, 385697728, 474302192, 326687407, 701322950, 753939342, 860741461, 608860184, 481069405, 497217661, 107822505, 538149776, 65872865, 267685484, 630211463, 833714775, 127007356, 988488267, 704390393, 326686679, 330510067, 968474337, 860095258, 865223840, 3530159, 602833824, 943838253, 510792598, 862215682, 804647558, 57277705, 379631476, 611335785, 827032941, 500396827, 166974973, 950996383, 97277257, 336237474, 527425945, 836169765, 13569792, 45600126, 103702022, 589110361, 158793934, 917834123, 750227633, 450511448, 228174293, 380815071, 984828008, 35225572, 19924799, 316530723, 169463852, 11894443, 83625994, 27918722, 725825514, 510537357, 901592447, 560692763, 386943274, 409576331, 409681305, 19743037, 901841314, 504205848, 287987501, 95070522, 999713439, 52172335, 458657276, 716446234, 960325619, 967217606, 29400294, 323715881, 571473809, 542099425, 838958945, 826022366, 215456133, 111542899, 27057122, 264098733, 414451664, 367598279, 660361161, 317432327, 788309656, 482969647, 453723335, 307123116, 46250346, 156036134, 550671015, 501877998, 918162544, 672414507, 744250791, 519150731, 449335541, 717241257, 798831268, 772517138, 286300330, 910111510, 66350225, 850058429, 996528049, 454249733, 463645138, 33673728, 195487971, 700828817, 25012182, 447505308, 968790402, 312778627, 684898658, 698549052, 965513947, 825161447, 410399245, 428579579, 669192144, 82412074, 1, 39, 817, 12099, 141295, 1379381, 11669611, 87657665, 594899060, 695536795, 226472285, 640458905, 794561570, 378189352, 472728269, 218438573, 56516519, 255055733, 845027144, 588332091, 652544873, 575593478, 251899261, 421780632, 446749115, 397384403, 967249876, 562965804, 307548860, 910064219, 267557957, 532097834, 694036707, 378870548, 124206593, 109699395, 5415029, 722948552, 875697847, 694452268, 7553293, 132421363, 106964105, 391245927, 870340375, 243365738, 69805673, 199865008, 75486973, 171179760, 109991897, 220793643, 513746719, 106419838, 540171765, 580499245, 759007158, 982900537, 645687882, 590392656, 601803737, 221575615, 697448067, 153409333, 368742411, 593478736, 779784392, 983542304, 533669091, 167997680, 729893362, 841704349, 760614624, 47743042, 998724205, 972938209, 77600320, 536850090, 695359058, 769331095, 966134679, 528777379, 695035445, 387545073, 911151592, 242062595, 521446824, 889535341, 920252167, 112865832, 806555197, 118151259, 625842139, 701618487, 790273468, 694977537, 572862214, 473466414, 246109368, 48621359, 353657541, 554932622, 499105369, 867797665, 487345603, 842033962, 519557065, 245850790, 335288378, 782811146, 892240358, 338051309, 826545456, 41171254, 334148733, 152569170, 144665017, 941279118, 897754414, 89241104, 416864510, 41530804, 299074740, 73588196, 959211062, 109470038, 500259918, 366443802, 403320596, 183957534, 992196343, 652194487, 652679636, 980112362, 896443763, 694053263, 85474084, 793481845, 36502549, 113761902, 13660255, 295744749, 768030597, 559676644, 267907464, 329732897, 34721556, 481917917, 470669881, 496023609, 35319413, 426881953, 436183525, 539581676, 797395436, 949513087, 636400441, 684066319, 283217124, 456809507, 742722246, 708837224, 1825110, 845476655, 721485134, 509524702, 571748192, 313097600, 164720049, 83489702, 463694600, 122519767, 438333196, 350973050, 742760174, 292313656, 699166885, 733491013, 480543050, 245749577, 741817620, 207993307, 244579067, 622422144, 604751887, 899189402, 151409381, 217727618, 880477312, 214663719, 394263729, 196688383, 548030201, 726215545, 464673145, 261250632, 625458514, 838784252, 982491280, 700533618, 585918514, 160625577, 639912412, 329107337, 639996475, 820595096, 822718095, 278815123, 496262265, 918547360, 8027724, 726754416, 823448457, 260321413, 863184482, 650858805, 276099402, 685460415, 954079520, 733965175, 676833996, 368637623, 143549481, 304621819, 472579474, 749596748, 116386311, 410243381, 633945382, 411647917, 177570608, 616578162, 767744928, 61290651, 523112125, 276619822, 15151789, 253528389, 167816966, 891846580, 541892511, 341041750, 391023167, 293092921, 243156326, 622723871, 473135257, 726189187, 379573236, 555335821, 257038714, 482079083, 723871307, 606515981, 65251208, 632383753, 147352575, 594192641, 924833549, 483314326, 808069004, 770319259, 427864560, 25642674, 464671587, 569308215, 637300329, 923466624, 23057035, 86870702, 983746124, 846059215, 574808201, 554549209, 446310553, 959681948, 778636627, 211592095, 516682914, 291911580, 587928798, 427680003, 894209596, 866648165, 679666232, 460484096, 854394115, 982195268, 822495481, 835383529, 431162040, 830468499, 195346596, 57036658, 866149457, 860543178, 818146210, 279107618, 892401239, 225036974, 868558986, 685134666, 744469605, 156127522, 187537334, 788919638, 909025900, 672187019, 217419201, 384265406, 616374282, 378322214, 141913342, 501653295, 461070473, 25985020, 589549638, 109433868, 888240019, 931367280, 762349235, 234613827, 765084315, 611038359, 758764450, 286873014, 382512476, 382119459, 20294058, 943700532, 211933192, 58390954, 180966724, 929698288, 805610393, 509211182, 866583662, 775212548, 88368846, 726939816, 185342247, 229877142, 705155204, 200856219, 36832958, 610458570, 660966337, 749737121, 592806565, 894272325, 480779946, 649154472, 88597955, 74084666, 744113332, 528684751, 282107891, 100372245, 756922141, 58776739, 981772435, 924634098, 951039927, 397719622, 577729727, 762973087, 736969640, 674672356, 297937804, 986319572, 149411109, 496025335, 118765897, 173573997, 13186371, 696131467, 139811703, 497652080, 238358226, 252091863, 126575962, 416549513, 112043953, 769546766, 210139961, 218718185, 975953506, 930028805, 845629302, 57030776, 852433935, 836915594, 400219298, 622051773, 829969111, 114603161, 10751254, 909008878, 579282117, 214070865, 563200757, 1, 40, 858, 12996, 155108, 1546584, 13357338, 102391268, 708914679, 491589996, 307979410, 602522471, 317222127, 290284759, 54099411, 989042041, 349750818, 106531062, 706143382, 63807262, 819412921, 144007031, 937903432, 671633208, 144280187, 535961584, 391683158, 665684992, 173615217, 173957993, 353557533, 689224661, 70346145, 249590014, 418977958, 826283746, 394602103, 916349862, 513826761, 491750575, 183159109, 757685121, 418341803, 274891227, 642914114, 790796259, 588464975, 740365449, 551222753, 10565934, 35820801, 515689568, 211177017, 828019707, 68961130, 155306993, 295844962, 698696703, 264483577, 967049520, 615265667, 559761896, 719262960, 509462378, 575657367, 591920899, 676732702, 723371825, 327050158, 311506131, 94078284, 608080285, 992236405, 137506625, 399044419, 458634324, 553334522, 801149022, 685520978, 446537546, 993927587, 293142441, 349812890, 364132070, 129851348, 857298051, 877404263, 877505804, 63808796, 43779853, 597054006, 757518688, 847719064, 814336009, 295491019, 566317327, 427355879, 99632937, 271930495, 211594531, 907085661, 370381473, 40651392, 893659649, 363630034, 486697292, 957988008, 762036357, 927839193, 855832860, 336383816, 307639758, 266751066, 682795763, 757933830, 702637096, 416587519, 241670221, 803239702, 991067388, 753770489, 69318095, 379601638, 829408102, 918333643, 833524181, 647446668, 999853061, 600717076, 736359930, 166694847, 912637361, 883248816, 334184966, 360770954, 907814459, 571070899, 760625736, 543003305, 12232839, 27415041, 235755079, 155935992, 895456358, 299525687, 387663753, 430722193, 845849975, 389897647, 157165043, 232374231, 709459451, 819494807, 873294798, 982307907, 723241456, 529916420, 190269000, 832006535, 157577121, 119818595, 751958343, 818604698, 923214476, 455357809, 664208514, 204222119, 358021985, 507909159, 532713722, 447934290, 550255949, 9030523, 204809569, 704696131, 798537153, 779574805, 146334295, 422444856, 763243391, 968318292, 409596303, 730176788, 661449533, 145680243, 291092743, 406566554, 840725280, 859336604, 385485264, 540592314, 491573347, 430591599, 799102625, 349645352, 953856191, 685505744, 968883032, 548153198, 991972402, 298640488, 335784052, 560792641, 200482497, 534424478, 835919822, 256133832, 789502694, 815463653, 367192054, 711296060, 505894941, 749371649, 586599852, 478956964, 771301542, 936596369, 641013477, 895880622, 275251735, 709512313, 675062513, 900057226, 864601515, 604121575, 213439255, 718556713, 352300658, 293209273, 62461535, 212741657, 925233457, 601757735, 357273411, 900952265, 337965737, 654516053, 138964736, 683012438, 388413281, 151113816, 328964247, 191920444, 84786019, 179152386, 346561188, 643354711, 718267295, 169193229, 252223726, 887596939, 657097686, 142103925, 40078284, 150004901, 459569297, 459199105, 789641065, 6481222, 858687076, 375816137, 147145108, 520309635, 748217920, 667457550, 716254093, 186260954, 725808394, 626037945, 743543562, 764478177, 601933842, 797462265, 777370200, 654651513, 156072819, 707272486, 178868661, 27986290, 925976600, 457000898, 540704905, 843382395, 769084631, 760118502, 476552208, 749317409, 710185045, 964800796, 516878606, 266237510, 913933501, 813693982, 336046538, 762072594, 997287607, 756174558, 615699332, 325935068, 478725181, 294206110, 71125626, 862744505, 369229533, 687983312, 908265361, 496504119, 960935105, 69879109, 315010091, 778995602, 757128123, 249975621, 699329744, 984761141, 255696873, 966070938, 214893935, 551564463, 316442626, 532269369, 314110968, 128028415, 969165598, 561496103, 817486578, 282697706, 480617072, 509205119, 834540584, 277705122, 660874354, 778117470, 366056531, 831243822, 903068403, 672944646, 441340373, 340680954, 617276976, 849516577, 560088434, 230800586, 10428026, 372559113, 922230949, 889642650, 244184042, 533938488, 841639506, 817920213, 336934324, 44823033, 565545678, 701086145, 241957483, 114182239, 850726147, 526783422, 115816117, 835376982, 659266467, 815849396, 168028335, 255187925, 748491938, 622185783, 663040863, 743392515, 163408177, 383060357, 31556416, 794030948, 934245344, 258437764, 379321408, 40236316, 660469577, 655665845, 690942361, 375378322, 568352979, 602028119, 317437606, 657543398, 100015852, 252684947, 481051042, 964341166, 522946308, 280791483, 467949044, 475945690, 972019230, 462068105, 580258224, 819125286, 65219413, 675919204, 938373431, 246074242, 416112669, 990084376, 992206586, 174382581, 694468435, 670357482, 52707698, 430228891, 194064984, 374269653, 873105421, 89789806, 360326019, 422866288, 247972613, 990139142, 766813630, 25619403, 929658745, 91230876, 1, 41, 900, 13936, 169902, 1729478, 15241768, 119176344, 841399673, 434809990, 446105964, 492649140, 758977149, 206041682, 323715565, 660084286, 595902939, 912996958, 734408694, 639760787, 253066665, 208103163, 518638879, 141246298, 316067064, 932295902, 638352197, 835906694, 518593201, 772224592, 710767801, 155069328, 87760296, 888628863, 85616127, 159719113, 852745152, 116208329, 603162784, 598162586, 214665773, 928212607, 364268988, 422947444, 91651894, 294508512, 306449339, 29129368, 721764444, 23720919, 155935808, 134434641, 906918132, 581645037, 673925534, 656820458, 712140580, 940311261, 639783029, 193680127, 625191701, 485391283, 454129733, 912047676, 531795443, 151893083, 16212124, 506754047, 491882623, 143293012, 25311790, 265858487, 730580376, 281408346, 313354998, 904477185, 246774679, 76212745, 790588368, 952519623, 156839403, 194467618, 872887052, 91963369, 534129628, 238356180, 632320800, 58443419, 722943306, 618550091, 33518175, 519583410, 960079192, 538023159, 305123951, 486152058, 294482726, 518323725, 455607677, 182021187, 748135143, 512410493, 35362801, 719659644, 317014598, 528329960, 583008290, 443175574, 659178079, 174647583, 349497845, 577399146, 818913619, 271472027, 656817275, 494680790, 969710982, 229444476, 267631925, 175671131, 35511369, 58752774, 135202754, 944159958, 464206230, 475819996, 314325811, 754861491, 276808552, 810159244, 91192489, 626570800, 590621471, 514780234, 305537247, 801654104, 149383516, 787215362, 114530579, 859617326, 613074050, 468568467, 919259772, 617744284, 340905322, 985953212, 372028816, 217079653, 938494776, 284906842, 769978385, 515786223, 285120775, 375534381, 675385916, 665832700, 133450834, 3874364, 408375526, 770616302, 276273159, 413928636, 723794836, 198571707, 678091222, 296508406, 529916658, 588863591, 413257244, 498474249, 915935032, 120501359, 836927142, 230121084, 774509032, 870826787, 489996192, 917057075, 196187219, 383821852, 922336284, 22274995, 748507616, 607632780, 183109949, 339998525, 507933598, 698781318, 498085612, 803731847, 473820207, 901546035, 302928184, 865394080, 114078163, 2199878, 779942965, 594445523, 91527221, 272107811, 718335802, 365412741, 52329171, 414520032, 494974650, 300177708, 811610962, 146810674, 337728819, 506402762, 403329973, 694340600, 766854981, 757139989, 188368338, 788752320, 918847437, 928046733, 527551285, 479184799, 517252899, 712149490, 791491255, 238449676, 667119615, 757940899, 445679476, 734062646, 326185889, 40504124, 623294475, 807102585, 697275776, 960233124, 90479243, 277423126, 459856976, 523164613, 283246190, 353589088, 214300387, 783487356, 692462518, 267488040, 851918218, 799153667, 810257248, 109085516, 633189413, 670646041, 913414538, 526057886, 701571781, 823895555, 366072317, 141394361, 832809290, 464577360, 305577012, 512815120, 121404516, 195457318, 321946163, 309097012, 239601477, 94799504, 314416433, 43085740, 639634392, 892727867, 559091131, 668748148, 422889784, 711508368, 676630033, 634668710, 364293294, 844937242, 751071408, 322260215, 891789141, 187899827, 511558264, 521391391, 670781806, 509672700, 51147255, 62331255, 681097643, 668432081, 698715101, 46454740, 726474418, 934462337, 72103891, 408373632, 957100449, 670661469, 786800623, 834620545, 287400489, 490496888, 497846381, 189806313, 912940390, 809020495, 703284720, 835793884, 605744360, 923348658, 214377202, 697918809, 343995053, 445012242, 544883273, 475774494, 73159748, 664916820, 945806189, 388033609, 184443581, 891139166, 132967061, 662232592, 630310273, 296941879, 926467100, 732662520, 755030683, 373067237, 200501225, 132039597, 621016442, 864116597, 199168443, 229224627, 19895297, 392227721, 512572983, 888183257, 954225811, 362992884, 408318299, 664465052, 828120392, 703374891, 61248349, 16358204, 241119413, 30565637, 838212406, 921697699, 543334430, 89858526, 273185879, 355471309, 304528048, 507574008, 476038937, 789196651, 57644735, 932966132, 292240565, 284284800, 198355642, 844613937, 375170024, 881957600, 108981244, 644631978, 730251746, 563646094, 15703371, 891969119, 462467018, 842418885, 184776107, 20489508, 525173823, 93913531, 199936707, 49296883, 500271791, 9386940, 42793104, 102301079, 299925062, 242848544, 157270543, 567750735, 512260765, 540910896, 473863432, 123756576, 867793612, 940752336, 189701376, 338838501, 163690216, 120916067, 790468763, 680974009, 939542025, 299064055, 752326705, 668302564, 775312490, 929999123, 713601128, 593704708, 595301628, 539445680, 220384571, 492539730, 572951883, 264745653, 946510661, 751486844, 372815432, 445849920, 481560920, 887629330, 46438187, 433046906, 550746520, 68280122, 549536967, 98170304, 942092421, 657076175, 85959544, 736296914, 244774210, 196059783, 968298850, 183375217, 810099519, 413635020, 636120983, 396309504, 740465895, 371532101, 1, 42, 943, 14920, 185722, 1929132, 17340642, 138243024, 994832181, 548192008, 829424358, 702470585, 488681655, 275370643, 835638795, 810867407, 286977068, 950047225, 83539435, 44629372, 288790619, 507410843, 264046736, 483012816, 672138691, 875194556, 651203850, 66911617, 918075656, 674825734, 94581776, 415282344, 303997379, 819537616, 622429217, 698967413, 751254549, 420414807, 687830513, 601402264, 434289505, 724948167, 754889253, 808542135, 995391960, 178813332, 724416372, 177739106, 814105099, 753597104, 45856871, 272275296, 786414287, 511285559, 160720229, 317562390, 790336119, 868224061, 359611251, 78736463, 773457035, 927802445, 421722380, 116775238, 364696053, 502866895, 626441652, 490807991, 713262576, 797949369, 598695934, 260170588, 82830001, 494545919, 272206045, 443643728, 598266021, 33015507, 884148700, 307476402, 959867411, 216334812, 800291904, 985570368, 488188448, 107147695, 538136243, 662412600, 979298525, 134498654, 226734918, 727004323, 749341953, 119616289, 344235011, 179701806, 771727176, 867138213, 462181714, 886155872, 120844409, 637609736, 732957723, 950929297, 917858187, 787591285, 658307576, 752393246, 363474545, 410621001, 994736846, 177814531, 780475306, 862888709, 592093607, 579502147, 557845688, 288775481, 603183203, 577960148, 788283409, 673824051, 683888139, 877184660, 633236685, 114600324, 443874806, 243845462, 737247494, 816215602, 301818289, 678209727, 613605938, 858234475, 818583083, 638002191, 955539556, 166659792, 402119583, 136117938, 121601666, 755992562, 47984728, 295575049, 499852111, 307179145, 332974068, 315732357, 716712867, 640162541, 867854182, 934376752, 313718034, 59903781, 946384843, 119557570, 525136020, 151571916, 798992199, 641098837, 260839275, 993458171, 824535499, 355644177, 761912070, 816737774, 16159145, 269418274, 606453921, 360745230, 8968332, 697762673, 987763777, 660889863, 735951723, 644168107, 694447061, 112348183, 530007620, 3042837, 764274326, 848173528, 194620935, 635775962, 259196720, 713828904, 940082694, 457694335, 838811079, 742877821, 825043434, 999682813, 323541591, 50872352, 337477908, 513975090, 485543671, 991738379, 437900643, 771900426, 686428428, 563411325, 914169111, 935692665, 43568184, 490175371, 749564693, 101137943, 245839802, 603981104, 626386341, 386920859, 413292672, 913439917, 70347116, 434898910, 144090153, 824132212, 891175519, 132402569, 347193520, 969072546, 16729602, 608672301, 618817500, 911982521, 688615529, 732174336, 500282116, 497352932, 456415575, 878875953, 316115544, 915703538, 598465482, 596140294, 730305232, 164832432, 897815573, 166896959, 324516472, 764718824, 566396641, 914517008, 874306816, 779763109, 852306547, 611269114, 292511571, 915381300, 758955270, 257373679, 74625589, 121789415, 230596845, 205840454, 916544901, 23902587, 416402779, 293269031, 510816400, 975368660, 955188220, 72244504, 561311434, 137072009, 127537010, 860723336, 883260674, 394382836, 913512596, 497775666, 206616201, 483790701, 11643758, 543373789, 107216374, 536706614, 345207484, 197739695, 416959310, 802020491, 883579389, 155472766, 707726533, 878636875, 137339984, 387604391, 170286771, 862464509, 93116703, 698306089, 277231574, 157624181, 518482505, 545923209, 301838767, 429107456, 65466197, 400869145, 603396151, 201146053, 29560436, 908247428, 740900666, 645622178, 468181946, 182006817, 585006092, 39427009, 901513909, 575103140, 643739693, 969005418, 413112711, 121940507, 949419798, 274176335, 533655948, 73448571, 447893873, 303200166, 406062958, 327948494, 399154885, 680966803, 676784794, 346165530, 118434942, 634041854, 219847494, 927409557, 731595298, 204066166, 484721091, 397391612, 62697528, 613046235, 363210072, 588627148, 359818291, 176675393, 710790103, 31891420, 193284227, 13322649, 80677012, 364175866, 156203486, 303397217, 540753075, 969185318, 762928705, 479974322, 873609278, 714679223, 243389411, 893917661, 730412727, 540295939, 380888528, 199480073, 111615382, 501213077, 699982545, 83674978, 340471893, 589623231, 135448371, 354059110, 416125008, 490338358, 869847423, 644581498, 153365962, 261322947, 680966984, 400282844, 542955010, 604680600, 412088220, 680278649, 139286485, 860834305, 469429775, 280658323, 253030904, 2560916, 10309871, 297479762, 823144855, 871982081, 47058346, 963847165, 382927224, 356584190, 324565827, 306141977, 910279795, 453817674, 601981427, 979339306, 222338413, 904561649, 382529080, 408856660, 854658577, 411827225, 670817056, 827144476, 223389693, 471934610, 930635535, 587441381, 722797748, 95690794, 663628478, 287716698, 646651719, 701670514, 288321331, 90367689, 303151955, 540716833, 449495113, 614473847, 768187147, 779428778, 859329178, 317839203, 24311574, 208713726, 534909824, 569617669, 779723332, 951823587, 262620278, 508684571, 644816282, 124674019, 369884532, 146396384, 993989514, 828097325, 353947367, 356630001, 483119775, 36683277, 829372562, 480348153, 416969202, 237164413, 917166508, 673670902, 955993972, 550159722, 115253791, 571208381, 883450110, 234414978, 338605160, 465632072, 975880238, 1, 43, 987, 15949, 202614, 2146662, 19672862, 159841410, 171958174, 857707214, 674952199, 863564473, 694487987, 218927913, 150857334, 64522123, 242512102, 726888439, 233627107, 811786714, 114239005, 343074532, 372330107, 720689358, 467711835, 904517093, 48140523, 445520536, 151023837, 477389409, 167654505, 524330326, 826025786, 750662832, 873751815, 63739722, 191556854, 667326112, 50500515, 441625511, 782830742, 400734038, 564497630, 921910383, 845548941, 368028935, 749018447, 103585045, 796556849, 628596101, 868979841, 539520158, 627354569, 90231323, 417433082, 56768496, 355579497, 422451590, 886349503, 72956900, 803725461, 415871073, 683643384, 621063238, 193330057, 325926450, 277754812, 24871409, 448472012, 886190243, 823962291, 441987145, 894908057, 837390023, 862747763, 91512877, 722912649, 93349481, 545810047, 913016979, 515556016, 298546360, 734212089, 844284728, 136068973, 71028614, 122223407, 751306630, 44843394, 423748616, 386401231, 812571458, 811253207, 883210298, 108253088, 777750730, 94398075, 357510258, 341016668, 444595182, 421469474, 846006439, 697364303, 430219357, 145159, 329923811, 555736286, 145037472, 50858159, 758063180, 409311835, 199515197, 849732459, 429458586, 110831608, 601311986, 405029768, 899721594, 362036575, 3616348, 447767827, 718164293, 455022502, 154627334, 632024645, 923207902, 841801838, 418932384, 595460287, 460605434, 188513457, 767682601, 51793196, 194981425, 929803954, 504733978, 22197692, 870666331, 333136663, 819520200, 530915500, 599537526, 53266589, 48676597, 387019415, 413134249, 89916173, 988538195, 741237674, 580557472, 340811443, 13472882, 840030352, 781975641, 296220934, 702357371, 942050407, 935085214, 845987731, 799577627, 872670633, 692587304, 440284632, 702895036, 10589510, 109084537, 901549736, 680965380, 523560865, 14608855, 766098800, 955736031, 229070295, 918139336, 762087315, 15060087, 769624318, 210516326, 269537431, 932448778, 651446512, 367308406, 624037144, 927670291, 415521073, 854675140, 947034643, 395133007, 858104556, 792426709, 918444166, 282314711, 96653546, 423079321, 469451942, 792999037, 308400615, 330587501, 691818222, 53917678, 568461122, 362577365, 775464857, 904714011, 845440210, 795470521, 568880508, 666239878, 183860147, 125507811, 545400921, 401495311, 3467092, 430876347, 332849310, 96436924, 957680475, 836934713, 150232592, 891109199, 995835861, 145792868, 255284669, 853681633, 801676454, 45857933, 127560794, 137690320, 534209092, 436059291, 890838261, 134212816, 302504982, 936257832, 761720727, 269396963, 28197218, 59083210, 947207164, 442972791, 384169121, 488722025, 351406087, 443097712, 82956552, 698141640, 145942108, 188889308, 734290094, 387705377, 912805029, 973822420, 47485510, 507370861, 221674431, 786661915, 91335607, 856760661, 173031704, 864904090, 599152735, 495185408, 938099393, 556362344, 990758140, 995900803, 254599934, 462199704, 5008078, 665636661, 527028350, 642386127, 1829553, 551952980, 424017355, 108488740, 701380336, 806666866, 700141562, 59441909, 362171728, 894757457, 445400929, 773238426, 127546419, 723395394, 338826564, 332919619, 340737249, 850054615, 184058121, 13063831, 278558952, 698063140, 498777528, 72607237, 345269132, 902279995, 183690503, 772520236, 708689187, 233896476, 458831695, 230994551, 41124197, 206351350, 689101399, 262700029, 620939252, 892377787, 428085255, 694339277, 213848040, 916329377, 192795757, 474268014, 561285670, 220016093, 638297144, 193877561, 647642810, 64716523, 5417153, 709160560, 438820650, 471896153, 456049785, 424945489, 102312939, 179871925, 155527933, 66018018, 519349428, 575834851, 366155295, 196027859, 709388961, 444696414, 108229719, 111474967, 169464130, 765045351, 916818004, 674916990, 958919968, 932259128, 849009441, 829390390, 846317162, 253991616, 482990034, 163822353, 775754269, 532037321, 49173712, 212326050, 301906174, 678424573, 534302771, 375782334, 160287870, 855370313, 341617592, 25457804, 708941176, 246832732, 903916100, 546588049, 96029971, 706821232, 940560978, 101534792, 337492719, 856837601, 613769045, 707646199, 812028723, 616833643, 679800396, 535428679, 224426630, 413895724, 784683428, 431644219, 111092914, 661756720, 639659700, 41894591, 68359952, 43802473, 952730000, 823133424, 376059765, 707785553, 822330735, 771301262, 948220958, 908479296, 864547297, 515908783, 27167717, 175015260, 401476125, 721945851, 298498970, 707819205, 838011772, 889483594, 356594984, 693435347, 967781679, 401435494, 355846180, 333596320, 628919505, 303558980, 984974994, 113643042, 89409518, 612893129, 122412730, 114900098, 810658251, 247580260, 945287301, 609126629, 492005778, 772356444, 361927818, 440145503, 858752994, 174471327, 210890472, 769016792, 638211867, 546015263, 377533141, 892710683, 705066724, 412035898, 913706912, 989583745, 102815427, 296051463, 435828877, 627348761, 994079761, 369313875, 909339708, 172995194, 816793393, 474860389, 821690532, 962160124, 246051373, 970475428, 561698902, 165844443, 708639335, 918973613, 861542417, 207950600, 197794802, 563223285, 448456804, 787570186, 926930606, 566070711, 279041721, 162328562, 287318056, 191225488, 14318341, 585550504, 409974535, 697728497, 891226405, 200433586, 381575055, 638337683, 483277973, 755030264, 867834356, 962849947, 821535631, 1, 44, 1032, 17024, 220625, 2383232, 22258540, 184242832, 375813872, 392612893, 231706087, 882424931, 687132034, 689650073, 577977876, 303878988, 24310937, 406963663, 625468735, 582435950, 41660062, 421950986, 98962940, 938709884, 758565048, 969234571, 703952131, 900436492, 658647225, 285611947, 399326780, 419454732, 205387170, 983950227, 49990302, 189001672, 62673927, 586296391, 184361166, 506353667, 438069708, 256171907, 825943859, 951340167, 368115756, 522855639, 198647246, 263328246, 450011807, 434855284, 725807775, 648411666, 18383140, 128787399, 387148373, 905324825, 158891954, 656234845, 213026076, 490012707, 365468167, 200221292, 298615515, 290107567, 35072337, 317672326, 60118064, 676291945, 898619095, 494511021, 35193707, 681989460, 255539191, 6318676, 181981289, 309123618, 769843578, 942743189, 29734288, 954472400, 463236670, 747980714, 175643037, 260101113, 77874147, 589524374, 710018290, 567729062, 854908844, 767838566, 521233813, 535397022, 395450772, 519565978, 430844324, 691804767, 750969410, 915664434, 335442962, 327801393, 599337662, 151524696, 372580414, 756807473, 202845724, 578628778, 324772867, 495203100, 594805038, 176866440, 134364432, 797477913, 981614510, 128692174, 938852792, 42148884, 122641852, 370944239, 473851910, 935488807, 532851475, 689984371, 438315593, 696398812, 66001022, 428174065, 54501471, 80878480, 666016821, 47295976, 813797397, 317765605, 714997505, 258919731, 82884010, 661027522, 582655484, 361252385, 24311003, 432884688, 368733632, 23821090, 792526029, 846601436, 536812192, 29313630, 382435159, 426147993, 517181759, 645690342, 270896281, 775661220, 283600768, 240876557, 135665693, 104458079, 616729602, 497103691, 828815240, 86098789, 998656307, 754065783, 488969594, 91503702, 52278308, 883359011, 733253122, 448869387, 985543203, 116773170, 582006344, 860482711, 481797421, 498040658, 240829616, 836032529, 195942841, 508465042, 970760583, 262117458, 515914406, 802808161, 784332475, 374122343, 146224696, 841597534, 586439935, 244148601, 788204315, 767547799, 776362337, 510076278, 624681830, 364806405, 36907700, 539421266, 800828005, 512242954, 899834647, 163376162, 50294413, 18654970, 84289561, 55576943, 421249957, 34930346, 752291330, 162276973, 265235612, 648593820, 174309283, 472188614, 715911113, 367773012, 121970433, 269868616, 883985007, 980070897, 514347496, 412293057, 574601560, 116830355, 45453500, 562859501, 189078677, 827602581, 712444490, 316586780, 733065979, 840949184, 60074648, 135398686, 424428452, 321968689, 410040315, 273128858, 471407472, 574966766, 873880166, 875045586, 51088331, 163730111, 878321231, 726127318, 966070068, 992549896, 363335253, 89848987, 723352311, 66759579, 406269326, 227087300, 150259572, 36586234, 121181736, 671327424, 433664784, 948164313, 657988535, 451431758, 352880293, 341991927, 179834471, 17796695, 709446365, 576526708, 534876965, 620591563, 749402589, 628280366, 213414310, 982746106, 780180633, 458647121, 527146575, 210950823, 363805011, 571210392, 912463620, 153315485, 532024632, 427468951, 230879114, 869803861, 964025520, 480715223, 895116735, 766188327, 419338263, 475074013, 158183698, 899486620, 551866464, 830407504, 385674668, 305150124, 25769566, 438519248, 46473036, 427624180, 723264512, 651472006, 264633252, 457374493, 476392005, 982968243, 594462543, 141658727, 489344824, 433530156, 442633667, 193279091, 506366676, 618868695, 731227096, 902261819, 499005142, 38842574, 647293009, 470120821, 963932040, 826530559, 427769181, 52186234, 243569284, 806914289, 77294303, 605077946, 125786816, 193185124, 669741115, 146483601, 421911450, 244025223, 607708016, 920909811, 503255382, 458139691, 962827176, 614853461, 60315827, 350564197, 429760397, 252570002, 854719144, 336843776, 342192419, 596659989, 924243516, 172320579, 980212083, 387574794, 749118912, 796421442, 338721201, 731277700, 423355068, 842226704, 398877706, 643899462, 276311394, 413568057, 530987554, 558156380, 825270018, 71652153, 764304967, 575174245, 41877959, 189656159, 729954858, 472722511, 759829544, 285982254, 921037034, 543320666, 873711613, 829723375, 146980729, 88768980, 242470712, 9284436, 325379730, 426922557, 253585643, 473459335, 496125795, 212116723, 579959160, 525505189, 681915634, 797942363, 691505794, 454823298, 342255990, 994255712, 284908161, 275004161, 935102263, 472107098, 948357256, 856671615, 528973823, 649773881, 963952149, 308388016, 911396221, 251193820, 721175020, 199750213, 907595892, 491208059, 66513541, 911357998, 28185931, 408941602, 745821213, 601730782, 8869191, 260152446, 11616084, 492782894, 282010506, 115926945, 586669273, 760307966, 135350671, 730510115, 701832702, 230080848, 284697593, 182609947, 968668397, 822892958, 20031466, 582030222, 113170973, 44631330, 117449096, 742186715, 393019551, 475653487, 44400405, 854169605, 417464027, 638137059, 767027912, 156446839, 993857936, 340495049, 620457258, 138844665, 409760846, 178352112, 82788960, 388732194, 649306589, 798058368, 662337136, 564354859, 463324080, 651997437, 151329929, 798760314, 140393196, 82249686, 534814725, 624568021, 130746531, 950081340, 74895509, 582830295, 80288213, 896322580, 930247101, 961634195, 343840503, 151542664, 791653321, 891526646, 512046490, 292522561, 321986893, 483787584, 926080170, 410378864, 504638099, 532986681, 138953386, 701001827, 64586773, 800287681, 592917926, 845148767, 612516645, 103437292, 360749745, 802262044, 905182790, 741928176, 827192105, 608668686, 275550867, 759837767, 768468707, 652063776, 969103143, 1, 45, 1078, 18146, 239803, 2640055, 25119048, 211741156, 609749448, 185787670, 784612981, 979654374, 245960280, 15201333, 958496287, 21110097, 315107827, 742613444, 350112648, 551346765, 22689059, 646342016, 52427180, 113726997, 20972491, 531552248, 493279562, 92962089, 319571072, 658193556, 921146440, 975234478, 32484025, 175484024, 620442122, 566033382, 228886883, 301912152, 137109958, 37427138, 531183271, 684452057, 239066445, 806400806, 345167706, 766401402, 659593100, 342864185, 793254425, 754419464, 829307575, 253460669, 788296808, 455700810, 203460090, 299960617, 672027544, 662169751, 130171479, 226661975, 16040291, 641167104, 11608362, 92735361, 828424038, 151425031, 757058935, 838944903, 705030989, 271605017, 832315720, 525711262, 695893337, 524834613, 616761109, 89325780, 498691877, 390082387, 413410547, 86170624, 733987779, 857386717, 121183471, 378540433, 791481061, 602874536, 895775257, 706223069, 9499, 916233199, 610175789, 305910126, 402086898, 380865911, 987929263, 784720236, 752249361, 533065111, 750214951, 512527924, 120069833, 497034065, 691332267, 542878776, 324018841, 841280375, 368737196, 213532423, 972352910, 856518833, 695976280, 832491001, 482258020, 288928023, 37469870, 669147935, 728824530, 312167670, 98462828, 664815478, 37466991, 488559701, 805407681, 555656112, 449333572, 115257333, 422614443, 217564969, 709154128, 523463461, 73425486, 892488653, 72758100, 139084611, 245397266, 356349189, 258341975, 374070936, 726599734, 907199192, 145474167, 868900328, 80767170, 435742131, 604761267, 550372021, 238314098, 858506407, 406280874, 734533546, 294613351, 569709112, 578499728, 811514468, 971780315, 806793934, 105431100, 109183449, 48863833, 577768093, 679710969, 415227663, 41263734, 575857153, 381654592, 178237376, 962188807, 96401085, 816699360, 379978, 698529453, 815682387, 657011537, 324418972, 693645417, 573047105, 308103161, 882958960, 454854080, 319280881, 638681315, 366562235, 558670399, 767575020, 418970310, 599121706, 533764150, 589341596, 935247125, 342450103, 752510984, 17885861, 270962366, 936052758, 754048953, 578853463, 395299411, 975776432, 660809842, 714104917, 664542262, 888472526, 460099640, 981638523, 92874960, 177231620, 389704303, 815325394, 892076514, 810821143, 435904186, 382196425, 459031152, 355917826, 128881343, 657597142, 768648132, 489510758, 615223177, 785945817, 514595120, 566588750, 607013232, 187911920, 428934627, 690400146, 385480557, 274884476, 214574226, 202705516, 78809920, 768678876, 104566183, 54811645, 783466377, 78714677, 225394661, 571378521, 194681502, 425310485, 768219090, 304793231, 206900396, 615627160, 652872143, 605935098, 888495311, 608958308, 684600222, 150382009, 670451269, 632074742, 29926906, 676412361, 727588975, 541140282, 152873820, 396851079, 644404346, 44361987, 675992732, 795525664, 898044746, 408945421, 518637916, 428148139, 754863856, 398182352, 901207212, 713356422, 978366083, 314876385, 700685480, 450639991, 507197672, 750335365, 694787156, 659670168, 536065922, 58255852, 874808151, 601680063, 300562698, 308983506, 144763409, 291800793, 77526020, 485403753, 904665596, 240987930, 592380858, 131116194, 318805303, 40941643, 253699630, 655235690, 431599614, 508389196, 766960976, 64307752, 83604788, 642165815, 298107337, 143184667, 782909601, 97135064, 800759539, 594114128, 462420032, 946857620, 578998109, 847963761, 556321528, 57391815, 681855904, 181815656, 486333346, 837072759, 524567487, 328595763, 549915998, 810586503, 921107919, 625157836, 520890292, 832156974, 502972509, 844559735, 189855766, 821823028, 625190873, 310510259, 495827691, 683011136, 462720297, 218315456, 558392392, 789434995, 973556645, 730884239, 996176654, 617108310, 869866261, 672230385, 823462275, 454316955, 569646417, 836576125, 486906178, 189726176, 941091111, 447563926, 715506888, 259006307, 152570437, 178255829, 705545293, 756368978, 655390691, 445318929, 656847742, 582354283, 964611397, 757172000, 601301680, 424348696, 51484783, 19240319, 282677827, 308226295, 848392338, 155829926, 371112122, 224524783, 972970693, 890401898, 186586738, 229535528, 744395297, 436751188, 287103606, 767393594, 221149011, 725319915, 148703291, 142739608, 565503173, 66967587, 579759051, 568848401, 146971072, 400042251, 42796974, 930117091, 516575412, 958322295, 49672443, 25502320, 669481138, 837449618, 7837933, 569472200, 125364493, 253977071, 938687542, 347213905, 923213402, 374713215, 103889249, 423021360, 42560340, 446498368, 893011213, 263552847, 473020638, 594960497, 638188472, 306243047, 631678307, 460262893, 114330448, 196301356, 120279822, 408786998, 213927614, 687965452, 221650209, 761159253, 159653422, 237951119, 705996510, 183076481, 962207888, 939920456, 729428244, 527536009, 933629825, 48104537, 426892607, 222940406, 156477133, 294062878, 856995315, 562470362, 935041969, 210948751, 968306167, 842365144, 520781012, 542464204, 753086923, 742421303, 62000597, 644679235, 71406991, 633199433, 272647461, 452692051, 412108892, 971466694, 51102980, 982720545, 17172841, 800141833, 835541670, 112517201, 389287762, 451060806, 667438631, 372888210, 71363616, 925222882, 974951293, 516878304, 717488009, 957226897, 42671831, 558776576, 623171604, 305500795, 631070922, 102790598, 482941055, 578335399, 805101814, 173951677, 379242816, 368922629, 730730546, 873191134, 654555294, 282999571, 122452789, 92227034, 843713012, 807240125, 801145367, 399481174, 81195926, 292593849, 487745170, 77737545, 120468361, 275563695, 294725580, 329691567, 323060707, 128192468, 940264172, 278390124, 237020514, 693096287, 868976326, 357620751, 777387506, 600499325, 283061659, 552760619, 551343042, 374674126, 67456147, 355451755, 309520773, 188033652, 438124708, 963234900, 524570431, 966112342, 609641134, 592345761, 1, 46, 1125, 19316, 260197, 2918394, 28277069, 242654144, 877454212, 274093151, 658806941, 733787098, 12686768, 373279778, 972151771, 700803085, 323660829, 529034010, 15342046, 14519348, 617205005, 151932388, 986173050, 673700068, 544467810, 964286681, 515278420, 556139518, 340574896, 558301369, 203169010, 995039572, 456888812, 641435231, 165153057, 140522292, 660622205, 195293121, 536816710, 963078287, 7389104, 204944482, 754195920, 468292992, 782743724, 983001140, 866703245, 496885028, 44229335, 385957410, 278539952, 468949573, 420982388, 313452346, 869856814, 98935497, 204399132, 112520568, 660616311, 229799510, 228233497, 492491671, 631417681, 54933646, 149425728, 621332861, 339088208, 164640489, 629238436, 824895721, 154091091, 876001533, 408513031, 998443240, 581987593, 639413342, 564182232, 919538600, 946772636, 882410774, 972663920, 656083562, 92818, 266781815, 775781699, 746031288, 222736672, 245153398, 853395663, 612580130, 998160370, 644539418, 268757618, 522753001, 961290581, 775849265, 167666621, 207332842, 699178165, 754169098, 895892786, 110804927, 209717022, 224332021, 783584762, 168756823, 846734143, 820517435, 567375827, 214226237, 514413130, 94334242, 56417678, 452070622, 302779049, 643793464, 45275321, 465081583, 721848633, 905142006, 304646178, 594655979, 909007937, 734286949, 886228757, 175346016, 613908391, 543890160, 182181133, 880150750, 840065256, 833202286, 948664835, 99995047, 986587901, 143761895, 873393215, 472341142, 369663112, 813013714, 860504625, 731747262, 545041246, 583231233, 427381591, 37913038, 537312918, 219404202, 592801409, 727962123, 878247573, 121527391, 62101177, 856133295, 688561557, 4927109, 639161755, 216890863, 944378755, 396352437, 878653962, 905668778, 386987830, 935008847, 899701147, 100650401, 955831377, 336099358, 325599961, 655390214, 368725260, 410912881, 868037904, 255016544, 51552711, 320078126, 868474642, 332377928, 241406268, 35418479, 170587950, 775390874, 598922434, 616742075, 563583865, 362204509, 606438997, 894815935, 49721736, 43588534, 841088924, 703571407, 258771291, 525460849, 233015242, 491199815, 325653075, 858892862, 519655123, 115437087, 727491564, 149427446, 582972761, 204458210, 871579136, 737982490, 129452738, 424878982, 856725917, 336920826, 730532856, 841738688, 738232572, 913319995, 816486040, 235770118, 427698004, 930569686, 569011751, 212446463, 508105319, 803897811, 496189040, 948372030, 432798655, 784691260, 809769369, 691850475, 577558004, 62715847, 947764060, 196109904, 506172286, 447735266, 980867772, 417186123, 46557919, 986790130, 277584037, 822619391, 621076591, 388367593, 68342324, 236699370, 119970164, 657351210, 878868802, 794459312, 436412351, 290870119, 503296346, 564802634, 58773734, 218770767, 842309450, 694735121, 712067611, 605426442, 634737321, 598847809, 189964014, 104895974, 463967300, 12836011, 374171101, 422839429, 769990513, 562838372, 23465799, 935303296, 758855803, 832260567, 373886738, 362866660, 831747060, 745193763, 842521525, 971131364, 323409153, 328965945, 810807795, 987986960, 514599613, 697337301, 518676386, 255182547, 320862033, 438306682, 656059329, 246817307, 296427451, 518314128, 212813255, 401599307, 322632262, 651271379, 102975853, 978392574, 171788197, 425477753, 865141598, 200230496, 352371432, 128877128, 483645145, 487174027, 207964600, 565016864, 366179929, 769999162, 980709292, 279413092, 778963675, 322935221, 775556840, 152203885, 621120920, 754303914, 144652778, 603456104, 397495432, 911648885, 161631342, 183072379, 436197254, 410415743, 654211646, 998944149, 660332881, 659092994, 407158213, 993390015, 62237745, 342306369, 807083806, 460112259, 598009122, 34231667, 354435262, 237881432, 155417941, 495370397, 996923439, 566380833, 854227389, 702509945, 42544433, 284265702, 294553519, 149363293, 27077251, 84953964, 442875086, 52560456, 900402134, 145229989, 73758817, 191009440, 854994962, 638721915, 122661714, 185868970, 77283521, 869275152, 18655948, 313026284, 709600476, 473812539, 310414874, 881320952, 952459523, 248120422, 525865505, 878780555, 987277088, 840681160, 676792790, 412115993, 140030918, 974129475, 721196483, 656805079, 905290349, 47935904, 451920705, 209356056, 551066765, 377150442, 379611973, 957219941, 151470005, 815021467, 645207971, 427463516, 863082600, 325313522, 124436219, 624577057, 614877838, 455973640, 851822937, 25478672, 694724523, 841056623, 311625157, 733217559, 234679922, 488590424, 672460808, 393534712, 496209755, 929085969, 673429468, 675205481, 477828672, 541309112, 421475544, 478494486, 773959869, 620756099, 817295158, 343366608, 474968096, 138789669, 1261477, 581929663, 193727536, 890932863, 10823177, 566850894, 774883564, 16714666, 326523886, 969386350, 297903394, 330603328, 602435368, 640131734, 422205271, 722651837, 536164302, 931111157, 119137488, 728875089, 985577117, 985476890, 17918009, 917723365, 472997173, 89115107, 916366434, 502538821, 230961609, 303908854, 617061492, 736625515, 131713887, 339453221, 738950163, 633262610, 426758031, 238112917, 779917917, 838020550, 66019448, 650675847, 778117049, 610691432, 213274580, 385410347, 146924004, 364868172, 467790003, 719723336, 134820272, 752419541, 477278067, 249134595, 704095466, 475445405, 736299900, 879265925, 152926089, 845846141, 495967193, 279498385, 571884448, 188818617, 160584873, 477296264, 718325160, 376134972, 29944771, 994040918, 900529668, 502667072, 63109761, 493032874, 781301515, 461834757, 82343644, 481132313, 514447042, 33858163, 779555233, 748165656, 15592733, 72424287, 572256728, 868353288, 210902382, 873738113, 462082508, 116372507, 317994063, 320661573, 43412947, 698165915, 782179405, 544478699, 376533191, 591100852, 669522818, 718785967, 689856669, 868867194, 692259782, 326169003, 372530014, 278822874, 245059471, 536750832, 337386716, 351509954, 600150419, 771930319, 812137400, 268506281, 52663290, 576040882, 250206016, 182636529, 238498760, 83748189, 556944302, 408365242, 877381661, 687598532, 206936328, 93325077, 375585930, 311118119, 840250578, 1, 47, 1173, 20535, 281857, 3219563, 31756649, 277324867, 182983217, 698763572, 224340727, 130185913, 938338213, 457596872, 500667258, 726272186, 242531386, 490324006, 697265581, 186365736, 123707347, 149163288, 89978475, 985283339, 584841356, 785509005, 693590689, 256394211, 919078587, 671307265, 271140497, 146527772, 508423202, 678732983, 767147115, 418422439, 470469749, 411147184, 246424306, 580998273, 228726677, 964726100, 955513349, 444565758, 668191949, 622619432, 792082487, 929348032, 601983375, 875985614, 424117930, 730694027, 740975250, 920167707, 500437835, 690210005, 493329701, 913508192, 695611331, 515433292, 682059417, 760833644, 299135864, 144219873, 937695856, 872711671, 176916492, 348891212, 334587033, 49595521, 749704350, 806067034, 773327860, 183297942, 590517602, 642228939, 275941227, 305722242, 165986509, 644370063, 71211109, 994092320, 193064301, 728492690, 76982066, 397536959, 240992716, 459846893, 745186728, 715105963, 864528752, 8495685, 753272988, 61740216, 691254120, 133693721, 536597663, 806042634, 964981978, 37162518, 164112239, 637759779, 841824460, 829311498, 573961610, 622092127, 856298148, 23010232, 90428839, 608194623, 46765621, 381935126, 362962166, 452925715, 585602790, 768818647, 88708532, 942042803, 418311021, 521378251, 499003594, 126819649, 281499536, 951375086, 146412815, 883657287, 598780576, 163659546, 959278876, 560517421, 665346319, 929162776, 164983787, 77699826, 451232846, 342897676, 483260356, 399557298, 954841649, 593150358, 617703430, 292815034, 3827776, 631211917, 629217856, 387782790, 117795063, 964508694, 824603912, 347867132, 217932218, 808071571, 466159291, 919428338, 306867765, 310085680, 347929669, 103137973, 445637697, 645585557, 573817817, 596387955, 672995733, 578127218, 402908135, 115353766, 244018895, 365778204, 555835033, 188328988, 247770780, 214263457, 844226086, 575129810, 998900133, 642186262, 886066131, 9933705, 609621463, 398319031, 223920768, 209742125, 519163806, 74615456, 814536291, 217678251, 205417278, 306418059, 464475526, 330591049, 614947407, 841330174, 17421893, 462387593, 572435987, 550253368, 393354277, 125715312, 124567536, 533400012, 599797708, 528236566, 670562226, 867851657, 488086533, 312725786, 238592338, 37063455, 385067665, 487783197, 118051898, 700641656, 71282753, 435781034, 103306472, 894876554, 845215295, 848516, 105817111, 455104275, 971250603, 659938256, 173306291, 702024160, 716038595, 487118454, 170680030, 880373959, 881689085, 153725278, 74926408, 143593976, 537712434, 635112688, 530810156, 750175992, 211491335, 495469862, 938874667, 906814766, 530322450, 654580872, 345961757, 642596517, 63791230, 944154048, 670877958, 937127089, 186748489, 915912734, 209561832, 276486399, 229476817, 558761321, 226557040, 227364465, 312169979, 745218623, 741668605, 732242764, 141121784, 862165956, 612899824, 26577011, 945385273, 251793938, 946782241, 731260038, 244678083, 406380914, 904932224, 539791264, 681567161, 903979395, 522313639, 307479666, 592336384, 274405785, 808155145, 116439879, 610551965, 466693001, 783212908, 356926408, 441684284, 460337698, 929744044, 6376955, 718008169, 946348344, 771828366, 973818233, 895371075, 977137826, 380169268, 772257849, 31334848, 472603919, 411133545, 814229722, 268412684, 269984826, 925865608, 465876593, 90547760, 192297128, 107314233, 564985934, 624177562, 939350415, 164843750, 127698384, 375467125, 733175906, 272735725, 449176665, 148653187, 981408173, 518395662, 539465581, 376426572, 523018009, 244326749, 117372211, 788925566, 998562683, 66998700, 958836224, 912519308, 243826028, 372775429, 817271079, 249393258, 980817911, 290157076, 803249202, 54296904, 967950499, 259586185, 891527285, 197070576, 229312354, 227197980, 799697366, 938796541, 780082061, 90937344, 484280959, 41280132, 365255061, 357940368, 463355056, 931322797, 484716584, 549219150, 927360223, 836260928, 974511964, 168938341, 138740543, 617041490, 552137623, 940491117, 311751083, 797191757, 581186247, 747525174, 464341615, 45074367, 877273095, 118604361, 820377975, 651223472, 330450797, 299712101, 798402816, 155978336, 76119913, 279749437, 94544299, 576902970, 337821847, 762491092, 205421212, 628488971, 912880168, 293200919, 74345429, 106904237, 117214135, 997309646, 440117215, 601730010, 44099662, 275878624, 579837056, 734358196, 740396992, 105320711, 497734455, 593389397, 892951024, 375888233, 469355971, 904918031, 759963217, 159920933, 656339936, 82028185, 635763012, 494109863, 887577439, 747214684, 51704021, 870514178, 310168296, 344440919, 671389360, 63636271, 867520663, 253359253, 809561479, 515218518, 735486509, 595414813, 855063768, 809133514, 296905455, 403829884, 13706060, 521945271, 406722813, 508410711, 177195219, 735377028, 927006199, 631467156, 561281245, 747357347, 2938426, 465345595, 461810717, 851331500, 936133185, 709629669, 764183492, 336958888, 999734612, 886346709, 929391292, 283117585, 489898780, 493902211, 377860665, 233672406, 313970515, 130449778, 925311516, 829665465, 27964512, 47478431, 502231137, 77997958, 450616449, 231073347, 922519036, 577962078, 74763491, 840109600, 825429573, 325716083, 462423227, 684091307, 610980133, 146344297, 230702558, 840583842, 568780809, 837872774, 467777629, 918753619, 868791683, 692922864, 937076083, 487643358, 553595896, 717484731, 882361644, 739294901, 547711612, 781629368, 821302751, 368923697, 499416921, 374122329, 146178192, 867117817, 743635071, 435195107, 43377741, 23687167, 878990481, 99110158, 262344925, 137035868, 292609610, 625408058, 171070693, 281506530, 350758492, 515834894, 237732608, 828774443, 840832942, 431386878, 857791323, 291378943, 894741249, 559570546, 881728336, 216217018, 497590589, 210577047, 706853900, 528807154, 595327246, 243687205, 679896105, 276389715, 520651743, 981854062, 782051052, 628779694, 482906971, 308000266, 98460224, 329039027, 663453182, 866909422, 358447817, 756042580, 103701857, 530184673, 82157052, 864831037, 833622836, 129557279, 680891914, 903510655, 223117879, 584910098, 872789802, 683398377, 818673921, 424793316, 162530200, 461191009, 233747923, 764377859, 866276050, 20068038, 599500015, 419525268, 504837656, 702339633, 161478719, 731429464, 9977417, 955013204, 944736389, 868359658, 303235910, 570685307, 762022093, 973456873, 491776893, 191155949, 1, 48, 1222, 21804, 304834, 3544928, 35583250, 316123172, 530785426, 505824986, 901343166, 615485588, 789348648, 698747334, 657848248, 964586458, 476943547, 698458295, 801769019, 257736525, 542576587, 933572174, 9542546, 488292838, 779820677, 404677231, 568188493, 931045218, 340825658, 205993974, 185959269, 78058729, 445883053, 431770274, 625502333, 180277174, 804167964, 894493650, 995189957, 934651928, 779076648, 286076285, 196236261, 433504295, 796345349, 46608071, 262327913, 615865530, 569486410, 232121371, 86175778, 154003167, 455565337, 592635041, 449778081, 946011559, 315342730, 523152035, 660192808, 984322053, 918448908, 362530845, 976500024, 826353996, 979299043, 20455239, 106430716, 169990095, 856925551, 339927417, 872925000, 454748405, 844111855, 778706572, 953334777, 367875579, 54603227, 952723870, 746089521, 114899675, 378338080, 515017450, 901556480, 75514717, 118586517, 750778341, 164215503, 398032943, 932771419, 175973529, 371281707, 414155738, 136305212, 176477492, 529591042, 473449712, 104580388, 917944592, 711611694, 275529831, 657391663, 618370464, 182199238, 863262145, 671572410, 926093081, 964697471, 20599847, 886336884, 976845790, 332330830, 936899217, 469444206, 333826539, 382006323, 404644652, 86283892, 711449573, 711524895, 240243757, 137744674, 52585102, 502954368, 568353873, 424768720, 673699213, 453807002, 277591996, 614231800, 858886730, 933633627, 855960053, 795294602, 320736325, 160050137, 741837408, 875372187, 933116510, 439299086, 339530899, 998809886, 988163112, 414204450, 626581582, 425958595, 547450689, 257877182, 25212376, 487090639, 693248108, 736165691, 261048117, 530252319, 667332870, 224234420, 283256778, 493030047, 381167115, 959191937, 567700201, 408470930, 456733167, 877572444, 640070139, 177231251, 53889209, 630925282, 764167042, 903138510, 822950867, 161878067, 741376139, 620673064, 828400388, 989198090, 398235498, 335164252, 650259410, 895482301, 288920533, 986020511, 960531109, 692510577, 743863232, 159848129, 639142915, 658806616, 286815941, 569150064, 996156909, 474086872, 377428234, 108191201, 968576455, 934066962, 520785392, 648351310, 322768543, 500047228, 717012630, 366640002, 617370336, 747113890, 647615517, 420668064, 485924194, 28548015, 242698362, 20265134, 481161073, 780894508, 716872330, 925052871, 809234518, 209608950, 454869307, 42621234, 266915957, 548835092, 11648368, 200676498, 803279760, 609790836, 522043768, 787672824, 264643232, 571421826, 762085826, 854807719, 119023111, 660310435, 945098645, 838260736, 592383406, 728604232, 586121308, 18945549, 62079587, 8000021, 137221342, 936745518, 867913927, 937623778, 183088542, 624248829, 606106136, 815005922, 728188591, 164502140, 885086995, 646575964, 60630781, 250914884, 619961376, 835493684, 1794097, 350786557, 222634027, 605402916, 871984975, 140157610, 784428245, 701028584, 784157139, 199990301, 49282014, 806191394, 544636448, 696393844, 625422532, 306981977, 200109353, 819880255, 622554727, 966234587, 1715755, 884432882, 186517679, 414057470, 559202957, 356291776, 440462056, 76496043, 54502936, 82793754, 693820485, 333532789, 139408482, 538301356, 908601203, 663844984, 277481039, 494620179, 126148065, 101563902, 543304970, 40138848, 255494176, 250466774, 181548534, 183041503, 553027506, 468172977, 571880068, 685135214, 70030015, 431414252, 965377675, 285528459, 577690235, 3039911, 424468115, 149219671, 315258608, 442938842, 340124780, 620577523, 697442435, 606981307, 195766252, 513624332, 160814831, 144529981, 626344971, 929525101, 167384034, 985564306, 757660450, 674490248, 404160553, 218780132, 253152109, 588527766, 276135385, 293545669, 229980166, 406532593, 544661736, 944987368, 74067610, 979465423, 367319108, 691015763, 308068787, 270297211, 892899529, 571121326, 682341094, 508186314, 992592910, 570463576, 551864557, 443417375, 102996223, 180706669, 66278518, 547390018, 97982020, 377733797, 642211092, 809569594, 442856622, 912786312, 563198351, 549331531, 576357131, 891027263, 77805689, 816522985, 731749256, 313952972, 411776160, 795006290, 22615421, 348238413, 716260746, 223962550, 78670864, 47765882, 267128253, 587371111, 927656165, 192469863, 806624234, 136996971, 759497678, 646978177, 833527505, 472805550, 754214240, 960030895, 232746388, 490616131, 420542303, 904038549, 210637836, 74285318, 144447351, 742135765, 244372617, 87595635, 852731251, 594678505, 794681848, 228154101, 363702627, 673985808, 239196945, 836249623, 602064792, 462168907, 430511049, 331217937, 84426505, 529390112, 953694258, 768941491, 296949641, 617567965, 759210871, 554347066, 314959464, 855978152, 459336095, 416019714, 554419893, 643616814, 307318600, 193723511, 342506504, 737708842, 961578294, 644413804, 283651295, 449519877, 262823100, 438065978, 195660179, 15479674, 929627357, 712657286, 867475048, 618979059, 615899609, 290553872, 46585860, 675146342, 899293157, 138576244, 932939832, 413352510, 228638502, 577046541, 52412367, 271101119, 704058715, 716195674, 113738084, 976781966, 417637854, 201849275, 137988263, 703452509, 833173534, 774723430, 98520292, 647910333, 702073064, 101667724, 93613248, 4773372, 993672667, 598539625, 298728331, 547262186, 609550837, 42278975, 203431476, 764589375, 791435299, 273439277, 15186943, 247517820, 332116413, 672582410, 88991345, 573172714, 370502342, 495515460, 486357723, 529038430, 112617630, 9655079, 54905538, 630913486, 94540925, 694069860, 101033114, 601510215, 405093272, 877399916, 606786230, 712700446, 365826653, 440611748, 222502187, 628732942, 260127071, 415183336, 331627148, 603111841, 484627861, 252203062, 603610758, 918118836, 775502591, 558836403, 458735214, 903545723, 229008632, 239177179, 70767308, 751925156, 652119146, 980361868, 450630793, 63075950, 714904102, 795480239, 196855664, 446357279, 343343138, 751184330, 353543327, 265335039, 291055365, 141693974, 952501609, 772988967, 982806649, 295006336, 142133453, 389243658, 551050114, 837354729, 288032982, 926886748, 940810321, 996269340, 544323652, 123254721, 449847916, 164321665, 408440169, 540527971, 235735087, 384560805, 888470688, 711171300, 414716347, 219479361, 559050803, 610845133, 321258507, 296543705, 253557800, 771631909, 466270561, 966519146, 100544233, 474799959, 147649345, 956135303, 808272257, 279282920, 472357219, 422709994, 530025514, 999788009, 64593897, 709199531, 479060735, 311654131, 943520011, 427742758, 799287390, 782392773, 191335024, 830990096, 336010037, 237942831, 237453992, 695887098, 398366572, 529644737, 344086296, 862051533, 684436865, 317549101, 968659087, 366641438, 1, 49, 1272, 23124, 329180, 3895908, 39783804, 359447204, 925733384, 746545659, 165655001, 158091124, 719304162, 111160209, 171158550, 935012406, 874008903, 988755604, 608336289, 351327718, 211049418, 970686245, 441380023, 920727544, 396494781, 218114186, 934368772, 753990221, 203263446, 488226646, 946324350, 642441651, 816607227, 122420091, 629716118, 498106515, 488881569, 100763230, 814241373, 430998026, 986590664, 188596813, 238499794, 887765759, 719310391, 819612870, 840885905, 584773429, 811468143, 396065785, 368868801, 299761844, 617462619, 308704442, 206242421, 833439007, 106715469, 970135543, 972244832, 66232618, 207050932, 577078708, 955731123, 103929249, 632790957, 297717977, 280927805, 856143814, 140717794, 889342899, 570959166, 553036683, 311778062, 833874032, 321035571, 629235909, 60666525, 19636232, 889773198, 837811568, 283828621, 499062871, 459250525, 468391935, 389843786, 80632526, 462481073, 859711240, 66143264, 831825780, 518914304, 998480225, 496960804, 480385724, 483317701, 923742113, 771054094, 630267330, 478946945, 527928962, 674723787, 882998613, 123711144, 324674723, 964132061, 961988031, 65215295, 858250635, 924300325, 577545014, 241841560, 172586320, 726876085, 210684082, 897202470, 742850020, 161301259, 120853804, 344539574, 836860211, 667275920, 72688787, 930704832, 179668299, 861726583, 168665810, 834696469, 672920894, 419563732, 302874180, 454615268, 934181182, 119694911, 779976833, 216225187, 244379028, 586838513, 942544272, 397970796, 155525782, 435250288, 609294947, 697035870, 790138207, 313089121, 451259481, 904475234, 15500998, 428233316, 352796372, 805867626, 355791012, 191743365, 390372515, 86113794, 224579645, 34292553, 472538607, 244805809, 799547326, 350596592, 550928379, 248605526, 858957317, 809083222, 418025439, 717379009, 843111164, 748566980, 795763411, 344249103, 246799165, 468081584, 533360568, 97839725, 814208152, 370784820, 149643652, 648814350, 586462723, 179226570, 323415874, 413399345, 830824722, 901264775, 785155020, 673315179, 883230707, 320461657, 209574161, 896187167, 641537195, 580708044, 615201169, 907420567, 226969633, 44823693, 653925850, 618905940, 556249274, 683808190, 595045606, 406684866, 817926872, 498013040, 741888764, 255307898, 750076370, 226664326, 45791371, 138249186, 182084615, 925519009, 32002450, 507648904, 36302093, 164244320, 134446595, 176304234, 443232913, 204696272, 377207389, 330407781, 317016375, 255990328, 346121343, 776903928, 865285835, 180645765, 94169320, 523805568, 66571932, 958229276, 706032441, 157122799, 174128102, 265560802, 960871567, 814597354, 840895548, 702037, 848074074, 17426708, 276377856, 55696613, 206160180, 32721003, 453495162, 587538197, 204676036, 610254246, 936113705, 842825687, 202272844, 145230437, 624393323, 739106533, 700708897, 523328161, 691038973, 656087189, 213848962, 927815456, 921255504, 609475698, 113463094, 529085932, 807792149, 579407091, 163833313, 694176222, 471399591, 346973697, 718259544, 297359882, 892552532, 451373341, 120883534, 8029910, 624607649, 606649877, 815313728, 231664869, 673443919, 615486405, 94571095, 110823650, 950289120, 646876432, 928906934, 684469503, 297251947, 919054473, 285157267, 967739040, 274416446, 465229888, 656873003, 825576691, 53305194, 539107135, 609069516, 669008004, 585520763, 526072937, 91836656, 101778461, 538228891, 424599066, 719851020, 234795290, 701214554, 914481398, 497763115, 504286064, 212679726, 409710596, 134500525, 154608785, 554889670, 267547678, 851784437, 749366191, 681515762, 587313005, 604179607, 297539881, 51380469, 30897443, 988568867, 430543091, 168358864, 325894509, 131217074, 122226126, 289735266, 2541560, 697428098, 339809826, 339814711, 568813016, 256466301, 865405619, 710940331, 7424767, 660900037, 729644940, 444, 450105203, 690939247, 459755659, 92556107, 42398758, 782901298, 483436309, 73995240, 784415989, 602791285, 655683750, 744368335, 684929720, 939318197, 1937536, 94209990, 544006669, 195169186, 297173575, 151918090, 559870646, 425964491, 818978660, 571568643, 60393204, 415731654, 547756555, 991386612, 383053326, 997830526, 963081859, 107336308, 898219937, 906988404, 550036125, 981857264, 691293427, 481189647, 501756531, 316529056, 476096058, 168221459, 165690115, 553028411, 960794528, 453386272, 963889156, 71983103, 494867184, 462967097, 635240847, 989817132, 23786457, 968645733, 163475174, 884798755, 971346358, 8231228, 947835970, 751371876, 21594745, 702982989, 997528759, 30899466, 874470660, 839706683, 64336797, 183002010, 415355406, 851375333, 802315034, 662347966, 459017349, 83113197, 807783874, 686211775, 665742332, 548408223, 38712773, 947065654, 224142524, 544199777, 554457822, 161813447, 59932464, 324817969, 826816639, 159675767, 610260222, 802832692, 962264291, 230527850, 654881259, 493134625, 56109407, 491401533, 163680598, 892934948, 889185132, 78662275, 741528574, 616484511, 204394884, 120980232, 4959172, 884202370, 468625389, 987185268, 797914336, 292935354, 542176515, 965256954, 25044127, 701524209, 669825969, 264620823, 983915826, 463815578, 325409981, 142164710, 946513145, 626025918, 890502327, 456729879, 921471703, 889764153, 10834930, 550258959, 888111963, 456661896, 560525119, 254574198, 379302005, 359197537, 748972811, 432885247, 174603143, 495215302, 304225805, 499574, 89067439, 956588800, 479903186, 900293862, 918419160, 874312513, 779518268, 750190343, 34999197, 204187488, 29703716, 310295240, 212734818, 705461990, 880565621, 542764103, 578132976, 871657196, 920555643, 635330221, 603836039, 905337022, 446003049, 531829391, 914627500, 109964459, 793773872, 883594493, 588890899, 761763418, 850946563, 47045637, 406265955, 398330580, 175033998, 98562597, 74022406, 109783010, 888406279, 62923507, 851720727, 920064661, 659715101, 731241623, 740764931, 68490942, 26861674, 832409630, 156628069, 65837301, 277330611, 504531610, 621094682, 513712789, 824543274, 863846088, 522929299, 50674845, 205053841, 391074024, 703020653, 598865065, 977680558, 126857946, 571772915, 596794646, 195429545, 328266420, 36051456, 451216030, 522276964, 948367998, 561406981, 389510759, 585943971, 108053297, 459413669, 288907310, 136029766, 802792879, 520247265, 414339912, 337619243, 597859489, 40005835, 350918, 321070418, 199829979, 141119131, 515535428, 350920730, 314377413, 808898947, 900198037, 799762368, 570476717, 244997759, 402733111, 626061442, 103647198, 938528989, 898060580, 652361018, 641847472, 149112119, 134262079, 887185896, 606038263, 859408453, 950373236, 692335861, 405660442, 565431386, 959094106, 393940636, 423632434, 612413824, 143336067, 663257107, 9730523, 471491852, 112828340, 936303905, 998673093, 55233966, 416039620, 144081002, 565258672, 539355694, 202448366, 14002378, 539019751, 307827209, 288622328, 788194350, 570120788, 965430343, 472467292}; signed main() { int n, k; cin >> n >> k; if (k % 2 == 1 || n == 0) cout << 0 << endl; else cout << ans[pos[n - 1] + k / 2] << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #define int long long #ifdef LOCAL_DEBUG #include "LOCAL_DEBUG.hpp" #endif int pos[] = {0, 1, 3, 6, 11, 18, 28, 41, 58, 79, 105, 136, 173, 216, 266, 323, 388, 461, 543, 634, 735, 846, 968, 1101, 1246, 1403, 1573, 1756, 1953, 2164, 2390, 2631, 2888, 3161, 3451, 3758, 4083, 4426, 4788, 5169, 5570, 5991, 6433, 6896, 7381, 7888, 8418, 8971, 9548, 10149, 10775}; int ans[] = { 1, 1, 1, 1, 2, 3, 1, 3, 7, 9, 4, 1, 4, 12, 24, 35, 24, 20, 1, 5, 18, 46, 93, 137, 148, 136, 100, 36, 1, 6, 25, 76, 187, 366, 591, 744, 884, 832, 716, 360, 252, 1, 7, 33, 115, 327, 765, 1523, 2553, 3696, 4852, 5708, 5892, 5452, 4212, 2844, 1764, 576, 1, 8, 42, 164, 524, 1400, 3226, 6436, 11323, 17640, 25472, 33280, 40520, 44240, 45512, 40608, 35496, 25632, 18108, 8064, 5184, 1, 9, 52, 224, 790, 2350, 6072, 13768, 27821, 50461, 83420, 127840, 182256, 242272, 301648, 350864, 382576, 389232, 373536, 332640, 273060, 208548, 136512, 81792, 46656, 14400, 1, 10, 63, 296, 1138, 3708, 10538, 26480, 59673, 121626, 226787, 390144, 628744, 949472, 1355952, 1826464, 2341600, 2833632, 3282464, 3584160, 3765600, 3719664, 3531924, 3093336, 2642364, 2010240, 1508544, 963072, 621504, 259200, 158400, 1, 11, 75, 381, 1582, 5582, 17222, 47194, 116457, 261163, 537459, 1022981, 1817652, 3040352, 4810720, 7230928, 10360160, 14178912, 18577792, 23327872, 28132048, 32571504, 36310464, 38903904, 40028724, 39552156, 37457388, 33941412, 29314944, 24179904, 18835776, 13777344, 9452736, 5716800, 3211200, 1742400, 518400, 1, 12, 88, 480, 2137, 8096, 26860, 79376, 211811, 515308, 1153268, 2391936, 4633331, 8438664, 14557048, 23874176, 37407760, 56117824, 80906752, 112162240, 150052400, 193572736, 241706624, 291576384, 341323776, 386160048, 424359540, 450394992, 464545584, 461528208, 446428476, 413557632, 373573440, 321120000, 268449408, 210332160, 162330624, 112550400, 77788800, 46540800, 28497600, 11404800, 6739200, 1, 13, 102, 594, 2819, 11391, 40344, 127508, 364587, 952559, 2293742, 5126898, 10710633, 21042989, 39117852, 69175664, 116857024, 189256368, 294745440, 442503456, 641759376, 900689616, 225195321, 617201401, 74227554, 586823330, 140227131, 711888699, 274217080, 795069832, 242715461, 585116357, 796764497, 861974465, 769155485, 525176285, 146566301, 650715556, 73773796, 455145195, 828946802, 226153586, 685663993, 216281593, 828705600, 536385600, 309484800, 166924800, 87609600, 25401600, 1, 14, 117, 724, 3645, 15626, 58741, 197280, 600215, 1671266, 4295107, 10259436, 22922995, 48184950, 95816051, 181136304, 327071752, 566117888, 942525072, 513281017, 349163810, 532145419, 154557773, 309226767, 88509354, 563257605, 789064441, 766807654, 474675580, 795689314, 599134613, 627066840, 658988947, 307608398, 337632800, 295701193, 44870369, 150212311, 705302359, 336038622, 452522163, 797367958, 62674553, 57993322, 777736994, 845298906, 452367755, 90655804, 810196653, 976943895, 564798323, 582118351, 994783972, 869862386, 697759993, 660441600, 381024000, 1, 15, 133, 871, 4633, 20979, 83313, 295803, 952299, 2809009, 7656027, 19414457, 46086247, 102967901, 217634463, 437195525, 838372452, 540635289, 722168530, 638311860, 640827391, 196046908, 898688562, 478199884, 793020369, 808862771, 562236075, 94791602, 385333320, 237794527, 197694759, 398043392, 504456766, 579736664, 78137089, 793367253, 961295251, 280517488, 179779783, 947563092, 901772777, 859566930, 199212409, 920781370, 362900807, 735004334, 297264154, 482748036, 653703312, 140400674, 623159781, 320434095, 373194802, 13313867, 205909676, 360223815, 570584277, 68075848, 372652149, 961247580, 23084534, 261139053, 151302323, 715359965, 625702393, 1, 16, 150, 1036, 5802, 27648, 115538, 431844, 1464468, 4554040, 13096378, 35069940, 87969166, 207781760, 464351910, 986188668, 998611836, 879505923, 237509223, 15110629, 621334822, 88677622, 257578542, 963016850, 235638961, 442107823, 429101453, 483004748, 329733855, 718448185, 266304376, 413950543, 256286771, 626720357, 318467482, 59069608, 81901162, 352730851, 104241055, 503595237, 956355036, 534522134, 457799859, 108929893, 887297322, 424614770, 265024591, 876853471, 515703045, 692038809, 210906163, 20070317, 468291405, 145357835, 797577421, 232358134, 747771239, 343859985, 833879609, 78548665, 289896769, 449285934, 313197004, 379603290, 397630660, 609910102, 442642726, 627950853, 722186028, 705163253, 998661511, 771071664, 636940611, 1, 17, 168, 1220, 7172, 35852, 157132, 616084, 2192506, 7159090, 21631676, 60902460, 160707468, 399489140, 939796228, 101060910, 481320121, 151453550, 952463061, 931694473, 957528293, 554162053, 990142499, 644946993, 651797781, 791594351, 556120466, 271969917, 107619398, 710253075, 280526462, 615698879, 99748930, 775178221, 257586036, 645364809, 806795120, 340635512, 801741075, 790520661, 68328385, 331513794, 351728404, 931812262, 91105169, 176869824, 445724501, 370449983, 359815736, 918724628, 869062973, 659791249, 657727222, 395793733, 32692523, 78858425, 151369211, 628504487, 842750087, 152091477, 889718876, 908002421, 944598446, 656459208, 712920845, 47550280, 92244967, 110652620, 951703750, 217822851, 901098263, 655149074, 861896271, 859184013, 992613245, 768042116, 807916959, 335381553, 909568095, 153171069, 827990317, 681893483, 1, 18, 187, 1424, 8764, 45832, 210072, 861400, 3206786, 10957868, 34666130, 102239488, 282743580, 736889224, 817936097, 262532028, 534038590, 412279142, 965109380, 86702267, 846482566, 945052509, 644517943, 548776024, 679330947, 152291502, 882910517, 188127435, 636778925, 902059202, 132531208, 193904122, 893705022, 246193070, 652079051, 958060250, 148697872, 504141990, 371410212, 807466717, 514477363, 565424570, 560794838, 11419155, 215137208, 665710713, 791504234, 359367396, 224050172, 509091270, 125989128, 782600310, 957126038, 667219607, 386301613, 605448653, 296557741, 618019404, 194294675, 222923480, 765962783, 743934970, 24324611, 512643153, 214242880, 286900578, 228877964, 91240846, 430467141, 533029377, 904804693, 373207899, 916503101, 83598539, 560288494, 363356684, 68282446, 152683809, 284461190, 124425011, 167972327, 428909487, 373215034, 420008537, 513304383, 874743039, 487193257, 97337408, 532639641, 184378261, 955976093, 1, 19, 207, 1649, 10600, 57852, 276620, 1183172, 4595034, 16384606, 54107670, 166643130, 481442164, 311240781, 381378831, 288429444, 380463632, 370477330, 171662912, 688513797, 626045604, 789881798, 844990830, 70546834, 230422087, 267733218, 970080423, 75064762, 104073936, 888990608, 393490487, 819401315, 362017415, 197941501, 97730360, 491049732, 790022455, 142301163, 381999002, 81566974, 255547256, 500580164, 503785886, 874661360, 953064009, 357278689, 416715628, 656421867, 311332859, 849655408, 575613107, 850236831, 533549113, 255339339, 611845477, 501164398, 135987981, 672393680, 678611757, 552403430, 470027818, 333312311, 203812034, 929380798, 133842121, 497262544, 839881753, 29703780, 133717366, 249364505, 959337844, 632980495, 72879056, 356819838, 662140760, 182352973, 260787823, 329159184, 423643610, 488600943, 164109163, 8143787, 184454683, 684285006, 693158498, 382122550, 488552031, 777204359, 564238497, 598675373, 603916585, 720234840, 93182262, 238936257, 486420235, 352604922, 958291193, 880928218, 736558676, 163545641, 189347824, 1, 20, 228, 1896, 12703, 72200, 359348, 1599616, 6465450, 23997032, 82508708, 264654080, 796563486, 260832418, 76986106, 528774007, 854313906, 307546108, 722735109, 61004626, 805619536, 18191861, 511411798, 993782454, 401030744, 633897378, 70862649, 96855526, 314416445, 92910833, 135520920, 492052755, 24334887, 643976444, 574388511, 317610455, 122930943, 637889505, 255461238, 950861369, 48876234, 149504663, 198682481, 942670278, 866921314, 563621302, 960474580, 980132644, 624295523, 399490883, 351714973, 945626033, 827908349, 157456205, 481861323, 472454109, 343580291, 683697065, 95059407, 841332348, 464714941, 596887160, 38681949, 757883329, 590303711, 64921694, 730086270, 15240461, 714742087, 32874447, 175996750, 277466516, 788882909, 11880203, 95097385, 778398376, 531252352, 479554466, 557013590, 609738833, 798714176, 859324339, 721484640, 268442938, 861267595, 806087188, 31691029, 950412807, 580575404, 849451646, 691790951, 264837637, 967322620, 365040170, 622467624, 456436788, 658680316, 60575186, 387550026, 215002020, 31349904, 449373833, 559514745, 640364153, 807042078, 450172023, 562637973, 109112418, 545193132, 195217263, 976304283, 1, 21, 250, 2166, 15097, 89189, 461164, 2132144, 8950214, 34503182, 123236828, 410729140, 284813823, 790835929, 594736274, 153822108, 374418504, 157537842, 147846917, 133568389, 483576696, 508616649, 656867821, 84463125, 640047601, 955370715, 182167616, 49108700, 229345632, 795610484, 502493987, 857101031, 142485158, 996679960, 742503997, 723858587, 317526153, 365342533, 250775491, 442738912, 408346120, 881242865, 135363327, 231979623, 347291745, 824934645, 995772018, 164592917, 354883487, 450805745, 963969802, 171006181, 92161176, 169883419, 961669090, 26844445, 393784092, 571606470, 464707158, 34144520, 652396373, 745405475, 202923498, 135935314, 703695236, 776259115, 48310283, 874186699, 219390686, 510394758, 751965065, 418424556, 8781061, 736058807, 674014147, 674780706, 590530540, 4352977, 803825827, 167292329, 541083402, 260679638, 665083995, 939990721, 816665296, 886017767, 669822229, 694816125, 643235536, 937314556, 115942268, 261159535, 687177905, 12245758, 694615643, 977706180, 217949106, 118952653, 898868241, 856650616, 42954342, 330321980, 535121720, 982503521, 719423135, 714354007, 18745970, 333448882, 302037622, 935654015, 778423936, 317991952, 284756555, 504736970, 155871365, 118263505, 797065125, 640838446, 258037348, 34344762, 502389803, 911086550, 1, 22, 273, 2460, 17807, 109158, 585339, 2805752, 12209406, 48792492, 180680070, 624410736, 25734764, 199973794, 977710523, 571365953, 412869707, 328237414, 214863466, 633048751, 257394955, 317735309, 673309005, 193600985, 704135816, 514918834, 650479735, 33606857, 490034801, 698396427, 67986999, 220797055, 218864611, 931163713, 940790978, 675674698, 85542051, 543018292, 61247584, 910803604, 831296179, 923943160, 89478028, 104500393, 161998091, 254912705, 539249258, 547749719, 357852173, 690014841, 206926249, 893887199, 747112232, 382059625, 148865046, 301618706, 260333115, 442306036, 247371284, 782005651, 233300621, 920894203, 317455792, 678639547, 427050277, 482884001, 854060466, 980543322, 860769666, 701293636, 771136168, 670745480, 486701027, 168461356, 848787800, 289825171, 498776317, 33320170, 430165721, 821516580, 115533370, 398776967, 333310602, 563097053, 553134182, 219816464, 216637272, 206027601, 933677337, 925510467, 267639197, 43693887, 486722546, 270929495, 877730912, 261947307, 375318068, 692508932, 989184491, 226696206, 288508969, 739837562, 849035543, 782296408, 273955665, 801085382, 431898190, 935043965, 202752072, 867866169, 151133676, 67940990, 78118516, 742654574, 165553271, 254022475, 668960857, 929973305, 656759571, 877339826, 925206924, 133648890, 623964326, 796176354, 256442424, 844384225, 955053908, 35821657, 33969824, 328610099, 171474448, 265634834, 954990510, 1, 23, 297, 2779, 20859, 132473, 735535, 3649437, 16435370, 67971642, 260491974, 931772466, 129241853, 915880695, 773220207, 21124907, 663657824, 89235883, 562087424, 395633225, 79602143, 818737728, 503346111, 923762587, 810187543, 71950684, 872552891, 722894374, 788701216, 792043650, 839896539, 577542972, 345484502, 350106805, 159630680, 594479078, 806985602, 451202244, 562057157, 345406448, 404888318, 371479292, 122121086, 196184273, 855722413, 625056343, 209132008, 580725504, 234791519, 683270249, 879431955, 820639155, 890517789, 877206124, 780147370, 943542736, 532169988, 134361777, 389279830, 486085405, 212150153, 60309713, 36144061, 220641769, 167907687, 433032241, 672669299, 4840381, 543970499, 860603358, 920463673, 899153827, 269139419, 99866794, 833550296, 732963165, 649634036, 220976898, 948879986, 81746947, 249278044, 943429751, 227240067, 617290217, 857759442, 317672542, 702411387, 392102340, 598392406, 771484657, 20769431, 772211314, 777981688, 103043307, 336611982, 922346108, 46010568, 620920750, 740298345, 143296430, 127113300, 229361025, 452883985, 298773134, 583669967, 430943791, 878469881, 498554889, 377075156, 399618101, 518539100, 610655946, 762624102, 339746521, 193491143, 582788075, 58498274, 139175929, 439487543, 659039143, 969039085, 205473123, 149794944, 735361805, 144310487, 952281582, 885994682, 290034640, 449859219, 870975475, 717604104, 930837761, 466542500, 510501275, 368063612, 61813298, 959329905, 938922014, 660077190, 12025968, 335011033, 657136343, 351072920, 964781583, 196462283, 1, 24, 322, 3124, 24280, 159528, 915834, 4696644, 21857553, 93405656, 369882084, 367190881, 745178532, 541448535, 237690972, 408537702, 191376116, 678513161, 493570976, 397907192, 9101765, 658714208, 122356973, 514532531, 911169029, 6916896, 782796, 910119724, 942560918, 62371227, 773940129, 523667340, 669757203, 42568262, 891666384, 467022993, 486796667, 727294526, 413613585, 787453753, 599953158, 417187968, 359849625, 117069116, 879478181, 12380000, 910899870, 838986319, 102687453, 103327364, 376800830, 429223538, 780159138, 706916356, 587575355, 971169352, 36010810, 483798044, 344462034, 787276711, 359714668, 737585540, 514856433, 506547585, 7966248, 935961, 931790046, 725219981, 437246235, 737823353, 539625329, 101294921, 998345360, 158678756, 14552916, 434899855, 58679632, 771567929, 908041362, 370603042, 958461645, 473954165, 329932246, 645017860, 950250115, 632956030, 39737256, 308287817, 593859369, 848980890, 73354610, 67983312, 794665532, 744501399, 571146358, 79777328, 768540650, 301591668, 87146707, 749547055, 542914952, 113807115, 981646049, 443442346, 689844336, 226785366, 664441023, 644644459, 65534356, 186334852, 433121661, 818953887, 687026114, 344822747, 464015963, 110899493, 294091084, 65199948, 37449794, 719226153, 501099656, 413337315, 725255533, 799293560, 259962068, 954615054, 373654234, 764439094, 914044890, 22085466, 539035590, 698634111, 313016212, 98993468, 941478268, 955683335, 902077766, 420565422, 767959775, 128648986, 355285226, 534029655, 104714136, 932643222, 778200211, 56428536, 225880543, 792355687, 449940761, 181471652, 529937629, 325235521, 6575392, 94094707, 441392085, 37264955, 911557047, 1, 25, 348, 3496, 28098, 190746, 1130768, 5985744, 28747851, 126764795, 517958180, 975500521, 75313899, 914923483, 611051644, 458281681, 932346365, 712529240, 185024083, 463834094, 950836649, 286357381, 871292163, 434939852, 58330077, 629835295, 27932676, 66354549, 10923173, 590226200, 526183672, 176005584, 809584977, 222348292, 260397896, 396327746, 178971085, 774808076, 78650222, 507195902, 144802453, 299847298, 581537053, 724817078, 350425193, 503589319, 654904119, 595937600, 992781673, 82554146, 868891604, 769490422, 119334199, 287573489, 85347169, 118147346, 949694675, 540939467, 927324362, 545027201, 610310429, 769058023, 21423, 262519735, 786795808, 240407039, 428554518, 447092428, 788617633, 367724192, 374279457, 343082569, 856162651, 150954733, 962857235, 700751807, 895999415, 533537747, 537990547, 268357366, 869434038, 633081543, 603452058, 947934680, 987367826, 743179254, 710352935, 835787228, 706586787, 845202323, 238777269, 405136472, 480736674, 155194042, 871452828, 677921910, 616952227, 984554304, 602482844, 894952109, 161534829, 782737895, 850072208, 670793244, 828100052, 222399146, 284700626, 231919567, 306545173, 673216888, 772842480, 314744315, 347738200, 25002680, 730048408, 649455506, 745857274, 196252843, 529935260, 419302767, 276709210, 732855171, 343508231, 624945362, 861002432, 484757974, 367927715, 209929226, 661865936, 531107025, 413469524, 479519565, 741904536, 610072165, 606639245, 934344602, 716197790, 587584177, 185414563, 306822687, 841034662, 971868532, 919896238, 158358640, 773475266, 936203252, 665923149, 911486615, 197651366, 774528535, 82937079, 883806524, 130206852, 774201811, 995994000, 245370199, 842572718, 793423605, 740588350, 687616120, 657690139, 857790226, 37323118, 88399209, 523321086, 117621631, 71036645, 222192424, 788926021, 202125596, 1, 26, 375, 3896, 32342, 226580, 1385350, 7560544, 37426495, 170077814, 716127109, 814596482, 388283574, 187079164, 480126707, 290089727, 38629756, 54115650, 64891257, 901599546, 718222041, 911275669, 323565019, 817912019, 805459451, 803612364, 201797073, 732830955, 80380678, 23464457, 701195891, 272214917, 913862649, 132026200, 669751010, 759341231, 973676755, 794065196, 967438659, 308299894, 10712690, 949669597, 781686555, 88559004, 727530543, 318751597, 278470531, 434911202, 804701133, 324324750, 981099143, 232682614, 987104568, 776649739, 786487389, 442468777, 569068005, 663709268, 881510700, 203686642, 57967683, 568729400, 236001193, 623959074, 703861418, 908672716, 70204475, 867825588, 827103298, 241630317, 362696969, 415618616, 805038660, 598704556, 10082872, 643477587, 415164213, 703084166, 477367476, 20036406, 629980785, 802614294, 952521645, 17601466, 311433959, 830294700, 548394039, 535645146, 521413012, 929141249, 283365227, 727229980, 443388093, 410708269, 286618040, 319768543, 938841603, 93475597, 394693465, 931196821, 495806189, 902879580, 707905623, 303901454, 576396872, 484544924, 486011674, 564305854, 311518869, 856442237, 372745088, 366968335, 813470622, 720542245, 551543931, 596748971, 778551123, 354920979, 984250497, 691689872, 327423759, 52302396, 920309409, 457393341, 162758194, 401889329, 760192486, 361045291, 58998809, 845800809, 8575285, 649668894, 501939170, 542308042, 574502757, 192463535, 690505425, 204738512, 689813836, 483570629, 525148782, 216925832, 952334594, 68584858, 946061868, 229986068, 113082103, 705545851, 563504064, 430610853, 209937938, 608555345, 578039088, 750439353, 944169681, 417934823, 74422181, 960090808, 568355902, 435674968, 894299009, 15861008, 618713868, 509911155, 168869978, 339481775, 369451744, 600513141, 71634326, 781507214, 857107917, 106564183, 736233715, 362800524, 615467708, 519437498, 342065337, 206666492, 505918934, 308299385, 20927738, 106279730, 457391057, 1, 27, 403, 4325, 37042, 267514, 1685106, 9470830, 48268511, 225792189, 978561725, 958557158, 38052071, 919433401, 254995547, 546697380, 704487939, 32839999, 508901654, 551556389, 663564198, 695178769, 814009554, 547143595, 371559020, 945387943, 670094820, 616330760, 976064124, 607380120, 8699769, 998280938, 580008436, 958036252, 912203574, 544195790, 396609897, 954428754, 708902921, 801338681, 431017191, 381717232, 344144422, 131861617, 874277396, 830300192, 596462835, 318671397, 244894238, 904557382, 834593756, 283869037, 697514761, 969250693, 509524190, 913260759, 384371901, 692021356, 509945770, 32685910, 505430483, 907189201, 193340383, 693205397, 603006308, 305262013, 925218957, 968092842, 27052064, 47727228, 477199307, 293774777, 98292616, 663047137, 995897620, 288543890, 998081856, 524487172, 892499155, 556044593, 972323813, 578208602, 933674462, 509188659, 985492681, 986901126, 628028841, 519717277, 311965185, 897395442, 829761538, 9680527, 161715155, 343759581, 402616197, 861303980, 911400557, 358697993, 515548395, 553147014, 892738525, 205604013, 762111690, 442223169, 7841804, 517369986, 84729818, 152655938, 700957258, 898706126, 75157861, 271201265, 543855670, 440588279, 204308612, 236683234, 208667572, 404506592, 809547310, 853106482, 518815458, 16491026, 491832633, 360120645, 923872102, 602086347, 641452842, 18221609, 229080666, 428455406, 569262655, 856993308, 230900297, 490066099, 367669571, 96292417, 52365382, 469261002, 374633464, 900617667, 182287939, 49700390, 796588976, 949085023, 222503562, 658471212, 94278399, 66098044, 72459139, 603916441, 257635815, 234793049, 951525459, 549173423, 938321308, 13662267, 288258509, 65326301, 11071916, 364716823, 929353581, 839483911, 199241395, 29486252, 482468148, 829994735, 370892643, 687560607, 531658704, 568187724, 486108828, 475403750, 227529481, 124500798, 228110006, 56292488, 958873404, 963718586, 481659835, 183136868, 593123751, 622015148, 469053734, 211587807, 928091671, 481375722, 612130911, 134707706, 334981252, 784422204, 712253942, 698883770, 390222722, 25478322, 28778175, 349558455, 616616543, 1, 28, 432, 4784, 42229, 314064, 2036108, 11772944, 61710789, 296841956, 322742117, 501368237, 486564198, 208215103, 787564548, 236938424, 301578523, 866593178, 461034739, 153403692, 741061604, 268366308, 41671958, 999969805, 820629183, 540097933, 348143198, 290585123, 709901036, 830657214, 397773343, 205345230, 80836479, 744283025, 767371096, 13280133, 166091858, 688213267, 405245759, 999129285, 957885801, 125598090, 229197648, 232621259, 771781842, 15692966, 623498734, 209019752, 451480479, 405116698, 905232949, 522429827, 160392239, 911337480, 463779522, 870625842, 997849245, 364479050, 834828, 300785526, 10186705, 265101999, 566806573, 614983712, 685595755, 48653250, 344390997, 673637797, 896886255, 108856368, 31386606, 486989879, 489263782, 517653845, 976993581, 117774221, 829510874, 294191687, 233225993, 831800739, 448583977, 657291524, 649603801, 456575978, 536862581, 855051723, 994222346, 302476269, 502749737, 322446053, 790323255, 357338908, 887312147, 181428924, 536100952, 55330164, 160205355, 190454705, 365581727, 201998030, 826748536, 400273437, 624522779, 849319472, 800147953, 80982274, 447705256, 168185200, 97822479, 309878269, 678607548, 912097410, 927785144, 334246635, 662138658, 715198385, 260363473, 461374975, 89468114, 651175074, 575096135, 130470890, 71518840, 879845193, 486812125, 128678982, 647847215, 49005945, 59417027, 550597313, 85275582, 589669875, 488581288, 579391253, 238935007, 307933774, 801626662, 991248834, 831660242, 2289249, 939337934, 170802252, 112167473, 712496239, 45742853, 482400666, 341362938, 957391891, 147812751, 376451585, 832724562, 418101830, 38563919, 274362964, 819817184, 400041713, 313141267, 806456583, 999307614, 670677205, 585839782, 845991536, 831623045, 109161241, 554327240, 822718306, 173814042, 363700239, 22366070, 479904205, 190929878, 554951008, 774006606, 279182950, 109357938, 401823952, 575672540, 860574847, 593910748, 547825741, 217594637, 989467389, 184852185, 331539318, 325720467, 383229710, 654245987, 146654996, 209385163, 560462909, 965812836, 65583448, 508391947, 709539829, 955465325, 214525022, 394005813, 531700924, 773028650, 417539579, 326670161, 406612199, 165245, 699092510, 550837077, 14964582, 527720684, 440459594, 268905155, 297293091, 881879628, 1, 29, 462, 5274, 47935, 366779, 2445008, 14530396, 78259797, 386723841, 770080067, 561338901, 331351593, 839635833, 167817400, 497149119, 881282118, 352201610, 471630724, 181160121, 88806794, 987377178, 289689361, 946592969, 656979867, 594487341, 196240769, 948508749, 810784209, 709855728, 576276359, 518417791, 87667236, 667014934, 181628700, 79050911, 337053925, 373883684, 560120551, 458872893, 815731972, 827954345, 771964062, 380463298, 190074568, 335845313, 308369049, 297128477, 730684746, 742600059, 263592454, 96421517, 206168581, 306386280, 238588046, 136275025, 509837233, 285349782, 467079296, 44733505, 132275281, 829959933, 391862643, 62600608, 253168338, 426879146, 365435454, 91732486, 471304236, 543190875, 798110387, 894371900, 696428631, 750022470, 726550236, 936549828, 542410178, 939184541, 791578453, 983635297, 823881369, 150676558, 585328209, 653882077, 963087655, 950795211, 936066317, 71868369, 440124326, 965151462, 175368387, 40663323, 699428294, 108367130, 332044307, 970432796, 572024201, 885659377, 539317691, 132218646, 139253073, 467726930, 45351751, 297376822, 508633325, 703469419, 746467332, 503668629, 112630766, 930570931, 962347630, 576196343, 698904389, 167199167, 333129737, 608922442, 222067115, 688206452, 802821275, 954540394, 911151138, 906746447, 902608727, 890863920, 307268385, 54404696, 104370759, 495676754, 441341576, 829087999, 88911607, 975336543, 381836343, 298727399, 758323163, 709721214, 146811076, 322114121, 909574264, 955852236, 803216000, 511491931, 157225317, 671670053, 367885171, 612666342, 842261160, 508147005, 345029386, 809990068, 981225972, 241279545, 458275632, 172983843, 48836190, 961296645, 538132589, 271432367, 877708377, 386417805, 815731556, 463571419, 404450924, 113136747, 549319603, 219464194, 220054123, 907114544, 328856175, 265047793, 589592614, 328159953, 809008569, 510434161, 420313068, 107873733, 868895119, 895337042, 156863206, 48004547, 666506430, 727609186, 85858741, 59205240, 78940637, 545962715, 139572749, 421355881, 858507471, 952603331, 401020118, 942925111, 296295597, 997986384, 115737481, 677010850, 282276283, 274892540, 163700485, 118592549, 846472792, 136765224, 236032397, 179431589, 539549211, 214067143, 923131121, 999465547, 232088789, 610013691, 896204760, 478686995, 218989077, 91096939, 221616643, 243944261, 454787573, 542927414, 355318220, 147354818, 482630, 675619041, 634351197, 478341164, 574509037, 738721209, 1, 30, 493, 5796, 54193, 426242, 2919073, 17814512, 98499977, 499582398, 346636279, 286311246, 338970899, 482987014, 740494022, 522312682, 389124982, 438269373, 295660905, 384589942, 269003911, 190728878, 21841107, 394443500, 159301748, 885681179, 869073529, 396029106, 969827087, 16747334, 474716791, 259235367, 753984455, 365768194, 423375006, 957390875, 407261764, 592999097, 928039310, 529328158, 133251022, 533719572, 434981329, 779487889, 212784950, 467080112, 287628298, 91658981, 576061624, 322787361, 682746649, 234833733, 676878118, 220869554, 982232103, 879428014, 742840902, 65876039, 230084790, 68776407, 988541480, 113769367, 288661011, 898604342, 790158821, 811679832, 416532461, 643426286, 357304561, 904850873, 143689492, 643378934, 217587561, 816799579, 741653213, 950522177, 519192837, 195766899, 875531753, 913462122, 931740864, 147485151, 73473743, 881407231, 943949423, 19375017, 95185407, 658198820, 654223830, 78841384, 487272636, 810454297, 156111172, 108214345, 594083015, 721613382, 413639222, 199581479, 219296986, 983776208, 50034813, 434669652, 336761553, 553659069, 443256837, 867959007, 649693919, 829394710, 511124003, 801382432, 809258820, 440312724, 549557631, 57091967, 619973166, 38255131, 989252595, 296849831, 126449228, 992478958, 948085171, 398912012, 308493194, 585304989, 581850817, 704472537, 457658359, 706849064, 974235300, 322942033, 801441410, 806760539, 930211369, 674605925, 140615032, 804334982, 654022727, 747554604, 304695097, 670935186, 973200118, 899755340, 43016718, 33443894, 486649937, 183173093, 28680647, 612676891, 17478829, 208078434, 467131016, 651933212, 464433186, 3993644, 959280435, 310671435, 524438940, 540166082, 143663989, 984026973, 596317769, 299039541, 925611762, 115137245, 238184581, 798462400, 902062936, 499673997, 696053154, 121959061, 376644235, 378356623, 996412950, 115590297, 517087995, 817795384, 731733847, 61225249, 930096903, 292653780, 149516053, 503527083, 233497811, 781589564, 87992011, 514696635, 495015483, 151617728, 478098704, 773499685, 621536652, 787266199, 440325002, 249898342, 747360642, 671517137, 216648293, 686506084, 544204132, 949750238, 249236969, 319054830, 756596931, 233403453, 594672369, 158463779, 809106181, 249481644, 610711719, 262167344, 179138909, 270160113, 278492510, 490828032, 946977816, 803242084, 541036271, 624688984, 204404014, 881539240, 779609382, 561095932, 524976628, 888316278, 139701497, 712146362, 413036824, 810411985, 241441787, 247390036, 695355554, 122993697, 227371919, 399947791, 833892197, 899399938, 781528108, 656359733, 551706967, 845829828, 900357325, 1, 31, 525, 6351, 61037, 493071, 3466221, 21705119, 123102861, 640304911, 83941000, 859775332, 485271727, 929183599, 393442380, 976105677, 287805815, 238271867, 74391877, 765979021, 335546599, 709265303, 808915958, 907593582, 463983041, 147572225, 888153362, 391439968, 221443415, 801779213, 245226914, 866175931, 810047153, 267980729, 805674759, 955321032, 906824500, 367243333, 486256638, 145115859, 530769671, 290945081, 932311137, 51068986, 807551107, 185085629, 261181005, 959829857, 118218336, 295880881, 506261294, 848742193, 936582961, 153400705, 578662225, 341741810, 161659811, 816049772, 839223846, 559301757, 400427189, 216771109, 207016492, 505237766, 795055758, 945605740, 555992642, 907845643, 982951177, 401043526, 597396374, 84431994, 362552441, 746539639, 303946121, 357484364, 893505269, 526515449, 560103044, 121894895, 445706213, 592793631, 713670463, 810676671, 143889731, 392244416, 73126772, 488568958, 542583029, 752584772, 7383345, 155007498, 994039957, 804821801, 379264833, 525210782, 239847467, 126254398, 219331239, 753237922, 434345445, 635807399, 872366121, 133933893, 590603804, 32230684, 70841222, 840236255, 909722819, 689521789, 529248821, 178846494, 980363222, 548654005, 434479841, 697553680, 35011089, 544881135, 260563063, 695816358, 44173506, 726085055, 671716390, 781464159, 450226987, 146813053, 877951734, 991641337, 221699230, 419417817, 794832550, 810418558, 969705412, 219055178, 274301546, 503413612, 695160244, 74090275, 26176299, 695070748, 341801549, 897892431, 470380437, 3467372, 448525308, 439337134, 724845391, 9187155, 585558376, 372261444, 277930003, 34819054, 431482585, 279947765, 492267585, 818516372, 484582901, 390623889, 856573701, 179325546, 611189228, 688765384, 847931848, 534263758, 557397045, 116495491, 85868985, 610969731, 478650084, 585159686, 14772190, 776211983, 474268574, 460744792, 134988124, 912707317, 105964987, 809266690, 785401545, 161419686, 653370610, 499797235, 534961655, 323936668, 802659551, 370287438, 326963010, 342959476, 313044094, 148582386, 976795271, 120954501, 724957759, 860215558, 270001726, 640931921, 833230238, 701256342, 242231076, 286286219, 13632467, 253663042, 129411109, 603714672, 564008356, 523901279, 216864213, 524434304, 182659511, 983267072, 644616701, 707181007, 618980658, 405751838, 571460922, 136629759, 744395053, 539608518, 963053644, 97893406, 866038338, 265757870, 944699732, 964525924, 892464175, 168006507, 562926324, 742708490, 132927348, 526909479, 79557205, 129052432, 157042523, 659309142, 834183171, 802572815, 517259737, 256356803, 353227137, 87135975, 224995979, 596580540, 402931204, 515099940, 793833445, 691900231, 589149123, 114327507, 887760880, 389703467, 830251700, 783657579, 433484966, 412892473, 432995349, 911076886, 112628181, 1, 32, 558, 6940, 68502, 567920, 4095058, 26291268, 152836946, 814626856, 19929138, 508014078, 3627542, 383619686, 178749032, 257695016, 714018516, 472708243, 782289684, 785010736, 673452130, 967313791, 416615851, 594708501, 823838568, 374885539, 520875465, 462873691, 866641568, 110422771, 371334024, 597629306, 954905318, 192386746, 711820060, 202869372, 886359460, 670157944, 884126969, 502946720, 582271977, 402610790, 343533084, 511648372, 517557636, 170605372, 597697292, 829559995, 983984749, 601678152, 265076525, 200313780, 586898347, 936910249, 473920775, 97417050, 844866738, 973357211, 106398807, 531568235, 220592830, 72245680, 709223174, 966562898, 364453034, 204299565, 516186616, 388239153, 70201813, 72763421, 794896998, 14537122, 759848271, 370782607, 723372604, 610938893, 161728308, 212501210, 376508968, 271352258, 323852567, 552136716, 801650724, 615740271, 208656790, 224034222, 747809272, 617340476, 153891047, 285642015, 901118362, 123777425, 16228193, 623027527, 937436377, 60747289, 714381298, 882770713, 15381170, 999192137, 197256049, 480638655, 953137460, 883599778, 148656904, 722191509, 39402136, 582147050, 757441169, 260428827, 253172482, 508174417, 834955862, 157349819, 261175551, 247577251, 264652493, 595186522, 812752039, 875384578, 747313263, 224431706, 462673707, 39074204, 237357876, 896371707, 361524710, 10299862, 761952483, 924315000, 304463541, 831385606, 228637562, 845205390, 599099308, 177524018, 209006125, 256908838, 355221513, 792061054, 713446694, 397486564, 756107839, 527866716, 337624854, 575430320, 456754471, 959728018, 921786900, 102983773, 936936381, 473475121, 131588049, 189268154, 863126769, 700571091, 871530822, 832046604, 609629520, 45186676, 853387560, 464311797, 368430192, 151536782, 691919878, 176735598, 972465597, 804610607, 50289062, 722819065, 20410813, 11987321, 648373171, 889715409, 778512390, 280809979, 767453391, 155472064, 275305459, 296611231, 377220752, 229158487, 259857310, 987705391, 873889855, 448418244, 657467052, 301028637, 400332864, 304525446, 853531448, 201469133, 757430782, 288842043, 292821474, 389580374, 148645279, 450672899, 404696472, 399758661, 549392647, 972607841, 459482261, 344863732, 405989209, 14412475, 913865943, 988039851, 302203080, 293916756, 28383491, 502818531, 791480646, 619991127, 151573496, 311251301, 362738947, 457688580, 884177111, 390413172, 889218635, 530910268, 818241216, 542232757, 765042883, 885001834, 10229128, 574524301, 836418812, 984923781, 235783687, 868003012, 379478756, 832878398, 751487743, 496700139, 587857943, 624473538, 510088706, 778144708, 214176553, 953029206, 646822434, 252787767, 281229254, 401166205, 434753895, 343430684, 941989547, 465870277, 861407908, 387687010, 216509894, 375279811, 453878600, 982073623, 677731113, 95924240, 198468867, 861679672, 204003039, 472066136, 228890861, 880462406, 133638984, 924365283, 274136081, 742318625, 898640542, 85174164, 775817726, 982947180, 716729952, 1, 33, 592, 7564, 76624, 651480, 4814916, 31671996, 188578368, 29248753, 200002145, 508415428, 442411092, 823607844, 339155380, 84465338, 814093820, 347929398, 722645092, 146033429, 312847170, 460125097, 915837300, 530134554, 683613860, 22911398, 950166343, 297700883, 874171812, 779302544, 705201416, 91735442, 764568060, 448540109, 794383951, 50664826, 501387621, 764478731, 392332791, 697065547, 136584719, 904822171, 811342153, 498086442, 66346910, 903864157, 648069920, 294527566, 68277872, 192952288, 465503414, 89641650, 342876181, 975687654, 849073744, 732768838, 299144725, 960087859, 432060633, 521050995, 669642411, 783220798, 964761936, 888496451, 578822675, 774117896, 595815330, 556187991, 328078421, 497539038, 461150544, 593197759, 454579240, 228665398, 675695769, 189021504, 506127036, 683711210, 767254008, 372876392, 950363733, 781425867, 518441353, 618578159, 210702480, 146366158, 211092828, 25645664, 252569415, 768287264, 315751220, 46304131, 875313001, 63062094, 41563387, 521548621, 882111752, 325592507, 674715724, 754661696, 386558110, 154963091, 238088464, 48050421, 639662963, 70331570, 315682289, 290604457, 553625701, 114470501, 286499320, 302628334, 934963054, 90280656, 946037777, 701374947, 21339121, 663053978, 944685826, 452543047, 117230904, 560747251, 199227363, 16627409, 318622953, 147892287, 924956445, 813803967, 785002825, 524657750, 94619872, 228326183, 399365341, 370689535, 675442405, 908504726, 873312142, 624281896, 910865167, 214431914, 356568789, 649815619, 48684312, 203060656, 723151845, 388405201, 798060040, 729614446, 977682164, 533436928, 146813819, 149571082, 895803037, 777214043, 552248021, 204656845, 982800841, 733286978, 63964308, 481147156, 389291330, 76639625, 311176854, 441157810, 671041225, 83215916, 462900391, 792922861, 933493638, 911064426, 640299582, 658369868, 816565473, 95242536, 385493380, 848295064, 737403618, 437312030, 117969370, 718173112, 995019578, 309321859, 756181744, 40101942, 426476878, 702396178, 795715493, 835764511, 743326504, 209546865, 430615231, 826070511, 334341237, 118979238, 371120144, 839568659, 676120384, 72519, 845333099, 357629799, 910834209, 593346831, 104377605, 380654497, 634970517, 115890735, 793059350, 887063630, 651636452, 507749972, 783577804, 143656503, 242083869, 911105370, 970085702, 524972130, 465698950, 325374351, 536364599, 196104291, 139239152, 633851401, 256158579, 919175466, 894613648, 315818683, 5141779, 876022828, 934709255, 681050535, 191918360, 662583345, 207316521, 848780031, 272975543, 702356884, 769886013, 961041057, 6500208, 70262300, 494310602, 739703998, 384177576, 343193798, 693062586, 969762392, 66952659, 685150241, 630304511, 413041585, 515441116, 191001103, 912006289, 473846745, 605301455, 795067847, 856671001, 508821454, 735406667, 258084054, 117733205, 780290039, 23367661, 593944851, 692132515, 4650353, 187487602, 151055135, 898863554, 673507355, 215091232, 603704193, 594167428, 682519378, 496434131, 965159536, 430378180, 248402836, 470772870, 307340881, 347656961, 749714755, 122062081, 558277910, 169666679, 941915597, 277380477, 270070849, 652088255, 549544085, 1, 34, 627, 8224, 85440, 744480, 5635892, 37957128, 231322416, 291965329, 678229698, 199102832, 733159273, 432255582, 825398987, 945721657, 530531857, 605903605, 198451639, 405128341, 881104650, 95712824, 87475937, 88052462, 854657880, 671362129, 345256719, 279913923, 405600244, 791623773, 184158289, 548244621, 559931899, 811302745, 822463013, 829884052, 612803610, 114370483, 717655175, 250670751, 158660853, 996989593, 922821653, 403693850, 640224917, 726696528, 558324649, 504260316, 457498775, 235424755, 214797729, 595578763, 703649058, 668639597, 273743575, 830864733, 8621856, 152359528, 351252345, 54682531, 631863641, 533130514, 548187372, 212107229, 690348600, 269650465, 644636821, 588449397, 716956418, 569059993, 571818753, 620732748, 238441683, 628780105, 73251606, 77232245, 265685085, 860541096, 181038883, 995121568, 787161997, 984175916, 994855981, 70309595, 279951259, 412871815, 881913054, 268261177, 575207129, 196951994, 610045829, 705950877, 200402175, 179100085, 912730914, 795237101, 264189519, 756871237, 840795855, 477498958, 568161700, 101820158, 478938140, 546807900, 824972458, 320572966, 375535061, 712736750, 146215080, 296045377, 892271196, 198915619, 973312163, 292266224, 766955048, 774760742, 724672108, 189810671, 590576941, 955913056, 705860403, 956268133, 120026477, 977289531, 897970234, 594373646, 802624855, 16139526, 294245189, 661099173, 505327457, 687552139, 570417673, 288750674, 928298666, 124243321, 103493234, 782666425, 810561902, 479140046, 567654010, 66398299, 87173858, 171094018, 401077961, 201022453, 649177770, 751032860, 458665510, 583069945, 3741921, 644139368, 777863779, 427938859, 574083500, 968708036, 5259009, 14753514, 566158894, 428971413, 29779639, 601893398, 934948155, 463945886, 442386091, 787098075, 294593703, 467511028, 998601384, 749411810, 495421040, 283658473, 287441865, 687819162, 964614928, 353638623, 648210867, 238886215, 893364457, 158958124, 29345292, 800368429, 595552294, 572640574, 913495958, 705720935, 850127566, 83220185, 799386246, 848828465, 335228800, 498492912, 819731260, 972790229, 191002130, 289923062, 997108332, 479589354, 13686350, 377632380, 915241611, 38445376, 115515812, 312111610, 862313776, 36444206, 491509332, 899038496, 494299749, 577210085, 925017398, 377889538, 129014425, 544007299, 134491550, 77644047, 150186363, 549177782, 243194000, 889811949, 476414356, 302027816, 934223010, 116351600, 936035078, 728736728, 99057293, 233685532, 715949090, 484999785, 527817757, 40017975, 403976200, 963752121, 230480821, 165554215, 501580240, 480519751, 374582722, 588438105, 13652788, 835399525, 909982574, 63720437, 165170490, 768431894, 385829327, 268804006, 950180874, 398363435, 512876602, 149304949, 858796870, 305796565, 80654592, 209088881, 365995652, 741417209, 580938286, 849913699, 209592153, 430983500, 292682916, 89781822, 346251985, 899920810, 490814818, 319818650, 865676138, 199552930, 49606030, 396988194, 289382805, 394082926, 680976370, 125444750, 312554820, 11884810, 730982055, 36906819, 144996838, 532313029, 339360681, 509568859, 763509787, 79118993, 930179491, 756170211, 627420026, 161269793, 542072728, 498021200, 392693531, 523036960, 919765468, 367278574, 755839168, 466305341, 613534367, 534169086, 166110829, 107021592, 280650539, 268761091, 590645300, 269909358, 234042842, 1, 35, 663, 8921, 94988, 847688, 6568888, 45268120, 282195928, 611807809, 518705216, 990050297, 271051698, 122408000, 405189613, 94926808, 864141322, 53735275, 24011733, 736554738, 929218491, 904644261, 780020466, 504939462, 734736582, 905177688, 612557341, 964587741, 714487014, 841745335, 939266470, 221175663, 553510265, 427922711, 816845808, 551876447, 104782423, 432788437, 75343637, 98990584, 780296494, 401590023, 184896774, 39759619, 46187357, 134251301, 342702573, 517720, 358976055, 583636644, 962541900, 167548822, 161325057, 550357824, 277594189, 165080443, 231182951, 735855208, 908711807, 571176463, 42569340, 237272417, 790920442, 624258522, 720842250, 768667158, 451444080, 122083868, 366641147, 308868590, 806102171, 616667978, 212552319, 508058403, 321794596, 570313528, 460066496, 737582233, 710064955, 691296552, 63281621, 675218599, 955697061, 110510427, 512018248, 153536802, 745040214, 175960352, 594730127, 864516601, 686994354, 671193730, 758082482, 651219990, 268055455, 209604272, 794711886, 922988292, 233697499, 855180879, 757331520, 952855529, 712373324, 501054908, 610479660, 988305583, 359797155, 981016202, 392046260, 222705767, 339379031, 255395660, 760704862, 824907580, 377018926, 100950434, 568292199, 345612839, 702169410, 76425882, 316244660, 633878521, 345805531, 43908232, 498746978, 171201976, 618174067, 828038701, 451921110, 452033897, 911744318, 64098066, 83924105, 595571257, 147937863, 948006101, 514496555, 77289879, 282007238, 421799065, 804334778, 765393189, 193008022, 263503242, 355816072, 278012511, 227861525, 902054870, 618486736, 979710805, 971590402, 61042704, 664850817, 113175896, 488535341, 617582794, 612947413, 45804546, 259073867, 263038734, 265569066, 162645795, 60875191, 359494871, 979749311, 139358127, 29529290, 309151363, 279422923, 345089768, 87598058, 700337527, 479652910, 994907927, 933976635, 324751070, 167729179, 810904540, 230096199, 33195878, 559883815, 674302503, 158162721, 997344757, 974400760, 476723636, 933671908, 372458552, 487353300, 603836216, 903251923, 461631785, 620155186, 664707969, 139328434, 135802315, 547850780, 544085832, 243757336, 714792500, 277247444, 736724545, 7257213, 104433298, 33077964, 133546300, 658470668, 407613385, 15549086, 409602732, 220607605, 154437658, 434924060, 212726357, 432662346, 953726155, 55947205, 221865215, 896738564, 702917595, 219549259, 784888336, 998968443, 737927890, 111474776, 479544893, 204531672, 722344756, 339644359, 296335713, 172390948, 145219000, 740849986, 175518952, 876047366, 775536223, 909308844, 333180421, 96764559, 528034987, 396799645, 413114766, 622993858, 563074288, 710510893, 900874806, 315196225, 993816000, 623166550, 642968249, 328645521, 844280596, 556521945, 272458659, 580772239, 284457451, 186994948, 909094031, 935768265, 319893231, 114481887, 109302906, 586737223, 466388545, 717893242, 342269015, 164207650, 394855609, 330099455, 836592042, 939058426, 541984626, 852636994, 524042858, 358495217, 921118657, 464191254, 284341637, 363378706, 679058686, 917272314, 562488937, 105215359, 614330571, 404183151, 365378837, 280141835, 594380252, 79371576, 739360814, 210010442, 10232401, 449147207, 97531383, 696215921, 900156881, 51327507, 224992261, 946786023, 685932368, 729503576, 741723150, 479111191, 872812474, 454570174, 217639787, 553029674, 745481673, 194164134, 241094015, 672191097, 520725696, 177728245, 485102929, 511421076, 349030122, 157631252, 431267952, 813510823, 604978728, 799539100, 871169236, 265066919, 191499414, 52282294, 1, 36, 700, 9656, 105307, 961912, 7625652, 53738944, 342470612, 999200441, 797070294, 375863958, 9523173, 166271514, 481765400, 879554808, 535680694, 467340394, 413500052, 692064693, 580959888, 369347871, 169821810, 621921924, 137911737, 940784828, 741570244, 905517670, 551817302, 657369119, 721648393, 536831850, 500879720, 726253305, 296162041, 891225164, 880747817, 182180719, 544050763, 654393489, 357200480, 356889637, 635049309, 374948412, 486169649, 407475615, 51228607, 535369936, 325305756, 74215114, 944988254, 919680639, 647644667, 526651696, 763479161, 278201627, 103508412, 387580497, 561661113, 38190290, 310583115, 569811056, 351262691, 985051203, 403138813, 643132429, 289980808, 570569544, 550559442, 934893929, 352045239, 810200946, 61218795, 42358563, 89293505, 506603831, 400595820, 117891860, 469015294, 166372283, 320554017, 155147268, 955469333, 896730515, 826039051, 931193995, 36098122, 893366407, 522834450, 917130400, 759016216, 23584371, 48884561, 844352920, 604253909, 886656394, 548946691, 688504947, 972899398, 721435398, 409845929, 399680456, 284950632, 796741351, 217452678, 611033399, 592790059, 219084711, 504058472, 277505825, 120276345, 694287126, 35416589, 305976723, 447309020, 969824889, 565684997, 62139306, 857693940, 901163636, 262850397, 927594387, 721909425, 958991660, 471789360, 260033992, 544270783, 877013007, 153311613, 85679796, 660447085, 213261352, 954007371, 8266647, 75417194, 28241545, 733410215, 579803150, 41901427, 876245480, 900022334, 813145019, 668096269, 73987267, 175135030, 724217744, 139403302, 77167168, 775504145, 397863476, 816272710, 221129133, 242347768, 885383757, 728565085, 947647994, 605379205, 598139075, 269419404, 178994132, 603450690, 652850980, 19254430, 182635911, 57268581, 239936865, 878358438, 515315850, 141611162, 665647032, 700517198, 807335907, 965806030, 897617342, 773532343, 924389029, 419741954, 420757062, 581633294, 179995348, 34733596, 923518220, 731757774, 573741822, 531242380, 813544540, 336821038, 442738016, 551572674, 470067223, 638102335, 989538200, 956007535, 613954394, 401563904, 103519975, 569290006, 144046622, 689996849, 638589501, 358099514, 725282594, 691632053, 702244532, 284031792, 473014945, 465414316, 116886234, 142777936, 342518645, 138051544, 347505254, 57716395, 939744642, 114873890, 359397343, 671360195, 724489266, 683013222, 345781236, 550104449, 877003874, 63443231, 224660360, 658626409, 133687251, 933261032, 273131705, 48202694, 144323990, 559827621, 779609382, 930553156, 35267489, 493151974, 645090534, 517431516, 368634145, 540405134, 215255527, 144656993, 549192120, 659960465, 217236722, 742258783, 538378955, 211409043, 760044403, 389330065, 692548510, 583181570, 627949137, 829194932, 234693932, 651493437, 707321269, 828284674, 652751037, 873736576, 267300299, 729754896, 429920674, 875733754, 60888792, 225478637, 39002446, 407176220, 761384762, 131879783, 661443680, 51638267, 568172852, 186052558, 637968267, 556455031, 313451921, 238551452, 644714578, 449541818, 640800540, 923965193, 38909678, 41940756, 338485997, 888949941, 526610135, 48150535, 778944981, 480892059, 874500608, 900322190, 973783674, 468787609, 618167632, 913754856, 327797543, 845404908, 752246622, 831422464, 484541178, 501948673, 647306990, 882577308, 771072569, 171273117, 620085552, 385025714, 126556571, 472404266, 664907284, 284895728, 860747643, 285481155, 480968189, 426457284, 579997870, 253315436, 264967992, 325506073, 407074927, 289125366, 710111895, 168902913, 39893459, 264014099, 335462311, 284068808, 624620216, 265346008, 330183605, 301153063, 136165951, 223572391, 416076696, 791322793, 440956632, 812128221, 56870528, 529001955, 157225171, 153110824, 659760559, 934444871, 1, 37, 738, 10430, 116437, 1088001, 8818820, 63517016, 413577336, 466132154, 602224077, 950429493, 571044537, 948550192, 759622519, 360792951, 40404471, 549575252, 331339348, 353289303, 642561133, 959520386, 811439523, 113998222, 306747368, 686402540, 608623079, 625536502, 102898449, 513583096, 310389938, 861964034, 144673299, 459932354, 368865341, 656127608, 909171212, 807159815, 446679967, 582385365, 827063804, 980667706, 264330272, 600794253, 740948802, 906942889, 945728377, 18846332, 985664112, 7701519, 115050801, 870345183, 606442987, 443069595, 817056595, 621418778, 690512206, 255049968, 161633922, 402904753, 372549674, 317848199, 779510849, 454579621, 366999138, 955388684, 940196190, 710141532, 289889641, 400266971, 473006189, 518001144, 203532149, 277752196, 73653399, 957077834, 580796815, 797359407, 33679102, 974181950, 229170666, 221016673, 753153481, 718492334, 480056326, 134801483, 829292600, 87160542, 624566954, 157188714, 912350324, 248797376, 864861712, 311625650, 564724833, 638897879, 211767349, 670618766, 182357348, 406247054, 335828971, 235855014, 766599169, 873180801, 943988159, 797515463, 949064434, 37355164, 366387587, 992037332, 39085136, 457008562, 710738441, 147115812, 245127944, 221285308, 44913339, 750687382, 166494925, 487773254, 2533400, 294773545, 964749926, 838352064, 354747747, 983055334, 906311260, 773970452, 136280712, 732037766, 304757958, 868694356, 9717274, 686595153, 845171773, 715645486, 457517675, 868876321, 257821804, 398717354, 952878758, 459394839, 735151005, 982831573, 597714383, 483469574, 396276440, 147004054, 275175512, 449695021, 280047682, 322443740, 657859781, 236891682, 338855034, 771308208, 208042945, 611383416, 470020781, 959351211, 871193372, 314812327, 417008584, 157794928, 30304137, 772193806, 92880268, 735754383, 725090032, 678769251, 695572650, 713627047, 220917673, 996272940, 711499227, 615337951, 732510553, 265860373, 10346269, 946167168, 327969286, 691646116, 588894836, 556718107, 891256057, 29035235, 193826291, 413628097, 951441661, 812044940, 432676044, 866499015, 139084375, 351784477, 900166473, 781089061, 914118385, 818686834, 857340116, 329139077, 237478891, 284468211, 215304591, 458481845, 227432873, 865995208, 554027168, 463893384, 221077016, 374577314, 119759917, 360383422, 704486222, 404678036, 137104816, 809074680, 755219457, 826569646, 867839827, 768754773, 89100960, 257194726, 724398193, 973188469, 858913715, 18463743, 680309520, 450458743, 140048366, 764912130, 371007014, 456635116, 735728421, 778688084, 152973997, 434969799, 574794869, 212648988, 728361716, 542931287, 302379989, 751579729, 92390154, 220181191, 407743441, 315151252, 520426045, 407908622, 679231575, 395003916, 794034847, 347654216, 68808817, 829211530, 81601558, 162714123, 30761100, 394951130, 268715057, 283612447, 241955302, 623210420, 275963878, 159211117, 252162685, 595441437, 529655660, 437222092, 841111836, 179960886, 135660761, 917237477, 768051317, 444580903, 506791801, 487181239, 875489229, 680194597, 205928376, 680445786, 683783933, 969592088, 132367844, 396994570, 832926454, 630581401, 505495558, 385734337, 641541057, 95095471, 989574773, 911275608, 518514268, 282262989, 419271827, 469001628, 420271862, 947083037, 407529572, 59976989, 434008630, 863717239, 945875935, 75676474, 215313835, 250745830, 87811894, 264747800, 37018493, 98597371, 710706515, 142785594, 391940962, 336466122, 341268838, 21508490, 413865364, 232101532, 92701632, 8053527, 412757119, 757312194, 403681966, 949009531, 880975038, 37050684, 272465075, 678404684, 193438246, 672480427, 700064004, 142628578, 802581416, 279140871, 973655892, 800905741, 598005728, 935768930, 668573394, 207197197, 649003003, 270174246, 76144766, 315632510, 875459369, 359185050, 528086919, 473525359, 758981160, 249109513, 189948776, 344668617, 795917722, 549344159, 348920520, 486734532, 302843834, 285724416, 810790165, 350603652, 574459989, 873908008, 1, 38, 777, 11244, 128419, 1226846, 10161959, 74764168, 497121432, 26344483, 38234873, 423642505, 376339808, 863392989, 917340710, 353019266, 355701734, 828153534, 204362640, 374924405, 607928554, 963790885, 940721850, 687219775, 764705852, 876861874, 763291630, 981930457, 551085656, 980270580, 505906881, 983294521, 135354674, 135665519, 630173290, 212355830, 143623144, 227056594, 817242891, 163435465, 418550307, 731605596, 289566443, 285968813, 433396374, 290335437, 260134359, 257166798, 296375223, 99595679, 459082068, 507135523, 972388714, 133158519, 975205558, 982374421, 644050428, 996778111, 162109063, 746906113, 514292299, 926426755, 356009260, 196659267, 409916170, 325494529, 655002543, 558511285, 36446396, 471095084, 174722764, 671116976, 160891233, 868903396, 304037581, 23612943, 337881011, 234387037, 370561646, 356075504, 698718914, 535181667, 514726084, 815242029, 608023573, 448544035, 835833664, 991058290, 399256230, 20531824, 669361826, 539724566, 760387110, 830813942, 547045707, 178050500, 929198630, 6813905, 110412371, 858816899, 809729618, 833864785, 232951975, 485491061, 613385270, 553071180, 627954610, 952757220, 692906182, 748961577, 662247263, 52513186, 149763764, 145530822, 33882391, 453364543, 997405166, 992558694, 759602854, 84367345, 100239977, 854081961, 858205595, 486024240, 91555639, 177882871, 949083392, 519037398, 556513157, 228484413, 492836072, 589348909, 196163508, 266626335, 11245627, 157404436, 270481031, 638406640, 490889097, 527976504, 370488458, 823400678, 322868722, 206357234, 647142926, 768625346, 265191551, 148038615, 363341916, 267722164, 893118504, 738977503, 565582757, 762106365, 849369394, 766495732, 13155357, 515888816, 523640060, 647203814, 437352666, 546684558, 961386555, 7614498, 893885274, 936701598, 428062192, 113231261, 402917050, 409965843, 165984892, 799921270, 659405770, 509144023, 774701607, 842603658, 487390464, 251731862, 581859608, 922860080, 258383681, 201597752, 292594441, 460903867, 638298912, 848020590, 765105850, 965506327, 844776867, 575276415, 85481014, 653985938, 197424999, 197600210, 989591463, 112466859, 918937916, 878289962, 30252094, 561367106, 701604983, 794157139, 205106586, 358551581, 218730442, 820317821, 718077344, 742273426, 343977802, 723940137, 91227055, 889419899, 835334285, 445942872, 874169472, 806494972, 841559090, 34902341, 936247116, 742348345, 932764662, 776531786, 136341990, 609226011, 962126351, 692609037, 492230872, 512261831, 61424189, 202712100, 557188069, 23267751, 10862209, 780311892, 698216821, 610626474, 445698906, 548927052, 791636623, 278469086, 802570473, 843652647, 214889050, 950325814, 545811188, 732525066, 799299048, 547938769, 119233118, 836166054, 515368215, 821018309, 703809789, 385697728, 474302192, 326687407, 701322950, 753939342, 860741461, 608860184, 481069405, 497217661, 107822505, 538149776, 65872865, 267685484, 630211463, 833714775, 127007356, 988488267, 704390393, 326686679, 330510067, 968474337, 860095258, 865223840, 3530159, 602833824, 943838253, 510792598, 862215682, 804647558, 57277705, 379631476, 611335785, 827032941, 500396827, 166974973, 950996383, 97277257, 336237474, 527425945, 836169765, 13569792, 45600126, 103702022, 589110361, 158793934, 917834123, 750227633, 450511448, 228174293, 380815071, 984828008, 35225572, 19924799, 316530723, 169463852, 11894443, 83625994, 27918722, 725825514, 510537357, 901592447, 560692763, 386943274, 409576331, 409681305, 19743037, 901841314, 504205848, 287987501, 95070522, 999713439, 52172335, 458657276, 716446234, 960325619, 967217606, 29400294, 323715881, 571473809, 542099425, 838958945, 826022366, 215456133, 111542899, 27057122, 264098733, 414451664, 367598279, 660361161, 317432327, 788309656, 482969647, 453723335, 307123116, 46250346, 156036134, 550671015, 501877998, 918162544, 672414507, 744250791, 519150731, 449335541, 717241257, 798831268, 772517138, 286300330, 910111510, 66350225, 850058429, 996528049, 454249733, 463645138, 33673728, 195487971, 700828817, 25012182, 447505308, 968790402, 312778627, 684898658, 698549052, 965513947, 825161447, 410399245, 428579579, 669192144, 82412074, 1, 39, 817, 12099, 141295, 1379381, 11669611, 87657665, 594899060, 695536795, 226472285, 640458905, 794561570, 378189352, 472728269, 218438573, 56516519, 255055733, 845027144, 588332091, 652544873, 575593478, 251899261, 421780632, 446749115, 397384403, 967249876, 562965804, 307548860, 910064219, 267557957, 532097834, 694036707, 378870548, 124206593, 109699395, 5415029, 722948552, 875697847, 694452268, 7553293, 132421363, 106964105, 391245927, 870340375, 243365738, 69805673, 199865008, 75486973, 171179760, 109991897, 220793643, 513746719, 106419838, 540171765, 580499245, 759007158, 982900537, 645687882, 590392656, 601803737, 221575615, 697448067, 153409333, 368742411, 593478736, 779784392, 983542304, 533669091, 167997680, 729893362, 841704349, 760614624, 47743042, 998724205, 972938209, 77600320, 536850090, 695359058, 769331095, 966134679, 528777379, 695035445, 387545073, 911151592, 242062595, 521446824, 889535341, 920252167, 112865832, 806555197, 118151259, 625842139, 701618487, 790273468, 694977537, 572862214, 473466414, 246109368, 48621359, 353657541, 554932622, 499105369, 867797665, 487345603, 842033962, 519557065, 245850790, 335288378, 782811146, 892240358, 338051309, 826545456, 41171254, 334148733, 152569170, 144665017, 941279118, 897754414, 89241104, 416864510, 41530804, 299074740, 73588196, 959211062, 109470038, 500259918, 366443802, 403320596, 183957534, 992196343, 652194487, 652679636, 980112362, 896443763, 694053263, 85474084, 793481845, 36502549, 113761902, 13660255, 295744749, 768030597, 559676644, 267907464, 329732897, 34721556, 481917917, 470669881, 496023609, 35319413, 426881953, 436183525, 539581676, 797395436, 949513087, 636400441, 684066319, 283217124, 456809507, 742722246, 708837224, 1825110, 845476655, 721485134, 509524702, 571748192, 313097600, 164720049, 83489702, 463694600, 122519767, 438333196, 350973050, 742760174, 292313656, 699166885, 733491013, 480543050, 245749577, 741817620, 207993307, 244579067, 622422144, 604751887, 899189402, 151409381, 217727618, 880477312, 214663719, 394263729, 196688383, 548030201, 726215545, 464673145, 261250632, 625458514, 838784252, 982491280, 700533618, 585918514, 160625577, 639912412, 329107337, 639996475, 820595096, 822718095, 278815123, 496262265, 918547360, 8027724, 726754416, 823448457, 260321413, 863184482, 650858805, 276099402, 685460415, 954079520, 733965175, 676833996, 368637623, 143549481, 304621819, 472579474, 749596748, 116386311, 410243381, 633945382, 411647917, 177570608, 616578162, 767744928, 61290651, 523112125, 276619822, 15151789, 253528389, 167816966, 891846580, 541892511, 341041750, 391023167, 293092921, 243156326, 622723871, 473135257, 726189187, 379573236, 555335821, 257038714, 482079083, 723871307, 606515981, 65251208, 632383753, 147352575, 594192641, 924833549, 483314326, 808069004, 770319259, 427864560, 25642674, 464671587, 569308215, 637300329, 923466624, 23057035, 86870702, 983746124, 846059215, 574808201, 554549209, 446310553, 959681948, 778636627, 211592095, 516682914, 291911580, 587928798, 427680003, 894209596, 866648165, 679666232, 460484096, 854394115, 982195268, 822495481, 835383529, 431162040, 830468499, 195346596, 57036658, 866149457, 860543178, 818146210, 279107618, 892401239, 225036974, 868558986, 685134666, 744469605, 156127522, 187537334, 788919638, 909025900, 672187019, 217419201, 384265406, 616374282, 378322214, 141913342, 501653295, 461070473, 25985020, 589549638, 109433868, 888240019, 931367280, 762349235, 234613827, 765084315, 611038359, 758764450, 286873014, 382512476, 382119459, 20294058, 943700532, 211933192, 58390954, 180966724, 929698288, 805610393, 509211182, 866583662, 775212548, 88368846, 726939816, 185342247, 229877142, 705155204, 200856219, 36832958, 610458570, 660966337, 749737121, 592806565, 894272325, 480779946, 649154472, 88597955, 74084666, 744113332, 528684751, 282107891, 100372245, 756922141, 58776739, 981772435, 924634098, 951039927, 397719622, 577729727, 762973087, 736969640, 674672356, 297937804, 986319572, 149411109, 496025335, 118765897, 173573997, 13186371, 696131467, 139811703, 497652080, 238358226, 252091863, 126575962, 416549513, 112043953, 769546766, 210139961, 218718185, 975953506, 930028805, 845629302, 57030776, 852433935, 836915594, 400219298, 622051773, 829969111, 114603161, 10751254, 909008878, 579282117, 214070865, 563200757, 1, 40, 858, 12996, 155108, 1546584, 13357338, 102391268, 708914679, 491589996, 307979410, 602522471, 317222127, 290284759, 54099411, 989042041, 349750818, 106531062, 706143382, 63807262, 819412921, 144007031, 937903432, 671633208, 144280187, 535961584, 391683158, 665684992, 173615217, 173957993, 353557533, 689224661, 70346145, 249590014, 418977958, 826283746, 394602103, 916349862, 513826761, 491750575, 183159109, 757685121, 418341803, 274891227, 642914114, 790796259, 588464975, 740365449, 551222753, 10565934, 35820801, 515689568, 211177017, 828019707, 68961130, 155306993, 295844962, 698696703, 264483577, 967049520, 615265667, 559761896, 719262960, 509462378, 575657367, 591920899, 676732702, 723371825, 327050158, 311506131, 94078284, 608080285, 992236405, 137506625, 399044419, 458634324, 553334522, 801149022, 685520978, 446537546, 993927587, 293142441, 349812890, 364132070, 129851348, 857298051, 877404263, 877505804, 63808796, 43779853, 597054006, 757518688, 847719064, 814336009, 295491019, 566317327, 427355879, 99632937, 271930495, 211594531, 907085661, 370381473, 40651392, 893659649, 363630034, 486697292, 957988008, 762036357, 927839193, 855832860, 336383816, 307639758, 266751066, 682795763, 757933830, 702637096, 416587519, 241670221, 803239702, 991067388, 753770489, 69318095, 379601638, 829408102, 918333643, 833524181, 647446668, 999853061, 600717076, 736359930, 166694847, 912637361, 883248816, 334184966, 360770954, 907814459, 571070899, 760625736, 543003305, 12232839, 27415041, 235755079, 155935992, 895456358, 299525687, 387663753, 430722193, 845849975, 389897647, 157165043, 232374231, 709459451, 819494807, 873294798, 982307907, 723241456, 529916420, 190269000, 832006535, 157577121, 119818595, 751958343, 818604698, 923214476, 455357809, 664208514, 204222119, 358021985, 507909159, 532713722, 447934290, 550255949, 9030523, 204809569, 704696131, 798537153, 779574805, 146334295, 422444856, 763243391, 968318292, 409596303, 730176788, 661449533, 145680243, 291092743, 406566554, 840725280, 859336604, 385485264, 540592314, 491573347, 430591599, 799102625, 349645352, 953856191, 685505744, 968883032, 548153198, 991972402, 298640488, 335784052, 560792641, 200482497, 534424478, 835919822, 256133832, 789502694, 815463653, 367192054, 711296060, 505894941, 749371649, 586599852, 478956964, 771301542, 936596369, 641013477, 895880622, 275251735, 709512313, 675062513, 900057226, 864601515, 604121575, 213439255, 718556713, 352300658, 293209273, 62461535, 212741657, 925233457, 601757735, 357273411, 900952265, 337965737, 654516053, 138964736, 683012438, 388413281, 151113816, 328964247, 191920444, 84786019, 179152386, 346561188, 643354711, 718267295, 169193229, 252223726, 887596939, 657097686, 142103925, 40078284, 150004901, 459569297, 459199105, 789641065, 6481222, 858687076, 375816137, 147145108, 520309635, 748217920, 667457550, 716254093, 186260954, 725808394, 626037945, 743543562, 764478177, 601933842, 797462265, 777370200, 654651513, 156072819, 707272486, 178868661, 27986290, 925976600, 457000898, 540704905, 843382395, 769084631, 760118502, 476552208, 749317409, 710185045, 964800796, 516878606, 266237510, 913933501, 813693982, 336046538, 762072594, 997287607, 756174558, 615699332, 325935068, 478725181, 294206110, 71125626, 862744505, 369229533, 687983312, 908265361, 496504119, 960935105, 69879109, 315010091, 778995602, 757128123, 249975621, 699329744, 984761141, 255696873, 966070938, 214893935, 551564463, 316442626, 532269369, 314110968, 128028415, 969165598, 561496103, 817486578, 282697706, 480617072, 509205119, 834540584, 277705122, 660874354, 778117470, 366056531, 831243822, 903068403, 672944646, 441340373, 340680954, 617276976, 849516577, 560088434, 230800586, 10428026, 372559113, 922230949, 889642650, 244184042, 533938488, 841639506, 817920213, 336934324, 44823033, 565545678, 701086145, 241957483, 114182239, 850726147, 526783422, 115816117, 835376982, 659266467, 815849396, 168028335, 255187925, 748491938, 622185783, 663040863, 743392515, 163408177, 383060357, 31556416, 794030948, 934245344, 258437764, 379321408, 40236316, 660469577, 655665845, 690942361, 375378322, 568352979, 602028119, 317437606, 657543398, 100015852, 252684947, 481051042, 964341166, 522946308, 280791483, 467949044, 475945690, 972019230, 462068105, 580258224, 819125286, 65219413, 675919204, 938373431, 246074242, 416112669, 990084376, 992206586, 174382581, 694468435, 670357482, 52707698, 430228891, 194064984, 374269653, 873105421, 89789806, 360326019, 422866288, 247972613, 990139142, 766813630, 25619403, 929658745, 91230876, 1, 41, 900, 13936, 169902, 1729478, 15241768, 119176344, 841399673, 434809990, 446105964, 492649140, 758977149, 206041682, 323715565, 660084286, 595902939, 912996958, 734408694, 639760787, 253066665, 208103163, 518638879, 141246298, 316067064, 932295902, 638352197, 835906694, 518593201, 772224592, 710767801, 155069328, 87760296, 888628863, 85616127, 159719113, 852745152, 116208329, 603162784, 598162586, 214665773, 928212607, 364268988, 422947444, 91651894, 294508512, 306449339, 29129368, 721764444, 23720919, 155935808, 134434641, 906918132, 581645037, 673925534, 656820458, 712140580, 940311261, 639783029, 193680127, 625191701, 485391283, 454129733, 912047676, 531795443, 151893083, 16212124, 506754047, 491882623, 143293012, 25311790, 265858487, 730580376, 281408346, 313354998, 904477185, 246774679, 76212745, 790588368, 952519623, 156839403, 194467618, 872887052, 91963369, 534129628, 238356180, 632320800, 58443419, 722943306, 618550091, 33518175, 519583410, 960079192, 538023159, 305123951, 486152058, 294482726, 518323725, 455607677, 182021187, 748135143, 512410493, 35362801, 719659644, 317014598, 528329960, 583008290, 443175574, 659178079, 174647583, 349497845, 577399146, 818913619, 271472027, 656817275, 494680790, 969710982, 229444476, 267631925, 175671131, 35511369, 58752774, 135202754, 944159958, 464206230, 475819996, 314325811, 754861491, 276808552, 810159244, 91192489, 626570800, 590621471, 514780234, 305537247, 801654104, 149383516, 787215362, 114530579, 859617326, 613074050, 468568467, 919259772, 617744284, 340905322, 985953212, 372028816, 217079653, 938494776, 284906842, 769978385, 515786223, 285120775, 375534381, 675385916, 665832700, 133450834, 3874364, 408375526, 770616302, 276273159, 413928636, 723794836, 198571707, 678091222, 296508406, 529916658, 588863591, 413257244, 498474249, 915935032, 120501359, 836927142, 230121084, 774509032, 870826787, 489996192, 917057075, 196187219, 383821852, 922336284, 22274995, 748507616, 607632780, 183109949, 339998525, 507933598, 698781318, 498085612, 803731847, 473820207, 901546035, 302928184, 865394080, 114078163, 2199878, 779942965, 594445523, 91527221, 272107811, 718335802, 365412741, 52329171, 414520032, 494974650, 300177708, 811610962, 146810674, 337728819, 506402762, 403329973, 694340600, 766854981, 757139989, 188368338, 788752320, 918847437, 928046733, 527551285, 479184799, 517252899, 712149490, 791491255, 238449676, 667119615, 757940899, 445679476, 734062646, 326185889, 40504124, 623294475, 807102585, 697275776, 960233124, 90479243, 277423126, 459856976, 523164613, 283246190, 353589088, 214300387, 783487356, 692462518, 267488040, 851918218, 799153667, 810257248, 109085516, 633189413, 670646041, 913414538, 526057886, 701571781, 823895555, 366072317, 141394361, 832809290, 464577360, 305577012, 512815120, 121404516, 195457318, 321946163, 309097012, 239601477, 94799504, 314416433, 43085740, 639634392, 892727867, 559091131, 668748148, 422889784, 711508368, 676630033, 634668710, 364293294, 844937242, 751071408, 322260215, 891789141, 187899827, 511558264, 521391391, 670781806, 509672700, 51147255, 62331255, 681097643, 668432081, 698715101, 46454740, 726474418, 934462337, 72103891, 408373632, 957100449, 670661469, 786800623, 834620545, 287400489, 490496888, 497846381, 189806313, 912940390, 809020495, 703284720, 835793884, 605744360, 923348658, 214377202, 697918809, 343995053, 445012242, 544883273, 475774494, 73159748, 664916820, 945806189, 388033609, 184443581, 891139166, 132967061, 662232592, 630310273, 296941879, 926467100, 732662520, 755030683, 373067237, 200501225, 132039597, 621016442, 864116597, 199168443, 229224627, 19895297, 392227721, 512572983, 888183257, 954225811, 362992884, 408318299, 664465052, 828120392, 703374891, 61248349, 16358204, 241119413, 30565637, 838212406, 921697699, 543334430, 89858526, 273185879, 355471309, 304528048, 507574008, 476038937, 789196651, 57644735, 932966132, 292240565, 284284800, 198355642, 844613937, 375170024, 881957600, 108981244, 644631978, 730251746, 563646094, 15703371, 891969119, 462467018, 842418885, 184776107, 20489508, 525173823, 93913531, 199936707, 49296883, 500271791, 9386940, 42793104, 102301079, 299925062, 242848544, 157270543, 567750735, 512260765, 540910896, 473863432, 123756576, 867793612, 940752336, 189701376, 338838501, 163690216, 120916067, 790468763, 680974009, 939542025, 299064055, 752326705, 668302564, 775312490, 929999123, 713601128, 593704708, 595301628, 539445680, 220384571, 492539730, 572951883, 264745653, 946510661, 751486844, 372815432, 445849920, 481560920, 887629330, 46438187, 433046906, 550746520, 68280122, 549536967, 98170304, 942092421, 657076175, 85959544, 736296914, 244774210, 196059783, 968298850, 183375217, 810099519, 413635020, 636120983, 396309504, 740465895, 371532101, 1, 42, 943, 14920, 185722, 1929132, 17340642, 138243024, 994832181, 548192008, 829424358, 702470585, 488681655, 275370643, 835638795, 810867407, 286977068, 950047225, 83539435, 44629372, 288790619, 507410843, 264046736, 483012816, 672138691, 875194556, 651203850, 66911617, 918075656, 674825734, 94581776, 415282344, 303997379, 819537616, 622429217, 698967413, 751254549, 420414807, 687830513, 601402264, 434289505, 724948167, 754889253, 808542135, 995391960, 178813332, 724416372, 177739106, 814105099, 753597104, 45856871, 272275296, 786414287, 511285559, 160720229, 317562390, 790336119, 868224061, 359611251, 78736463, 773457035, 927802445, 421722380, 116775238, 364696053, 502866895, 626441652, 490807991, 713262576, 797949369, 598695934, 260170588, 82830001, 494545919, 272206045, 443643728, 598266021, 33015507, 884148700, 307476402, 959867411, 216334812, 800291904, 985570368, 488188448, 107147695, 538136243, 662412600, 979298525, 134498654, 226734918, 727004323, 749341953, 119616289, 344235011, 179701806, 771727176, 867138213, 462181714, 886155872, 120844409, 637609736, 732957723, 950929297, 917858187, 787591285, 658307576, 752393246, 363474545, 410621001, 994736846, 177814531, 780475306, 862888709, 592093607, 579502147, 557845688, 288775481, 603183203, 577960148, 788283409, 673824051, 683888139, 877184660, 633236685, 114600324, 443874806, 243845462, 737247494, 816215602, 301818289, 678209727, 613605938, 858234475, 818583083, 638002191, 955539556, 166659792, 402119583, 136117938, 121601666, 755992562, 47984728, 295575049, 499852111, 307179145, 332974068, 315732357, 716712867, 640162541, 867854182, 934376752, 313718034, 59903781, 946384843, 119557570, 525136020, 151571916, 798992199, 641098837, 260839275, 993458171, 824535499, 355644177, 761912070, 816737774, 16159145, 269418274, 606453921, 360745230, 8968332, 697762673, 987763777, 660889863, 735951723, 644168107, 694447061, 112348183, 530007620, 3042837, 764274326, 848173528, 194620935, 635775962, 259196720, 713828904, 940082694, 457694335, 838811079, 742877821, 825043434, 999682813, 323541591, 50872352, 337477908, 513975090, 485543671, 991738379, 437900643, 771900426, 686428428, 563411325, 914169111, 935692665, 43568184, 490175371, 749564693, 101137943, 245839802, 603981104, 626386341, 386920859, 413292672, 913439917, 70347116, 434898910, 144090153, 824132212, 891175519, 132402569, 347193520, 969072546, 16729602, 608672301, 618817500, 911982521, 688615529, 732174336, 500282116, 497352932, 456415575, 878875953, 316115544, 915703538, 598465482, 596140294, 730305232, 164832432, 897815573, 166896959, 324516472, 764718824, 566396641, 914517008, 874306816, 779763109, 852306547, 611269114, 292511571, 915381300, 758955270, 257373679, 74625589, 121789415, 230596845, 205840454, 916544901, 23902587, 416402779, 293269031, 510816400, 975368660, 955188220, 72244504, 561311434, 137072009, 127537010, 860723336, 883260674, 394382836, 913512596, 497775666, 206616201, 483790701, 11643758, 543373789, 107216374, 536706614, 345207484, 197739695, 416959310, 802020491, 883579389, 155472766, 707726533, 878636875, 137339984, 387604391, 170286771, 862464509, 93116703, 698306089, 277231574, 157624181, 518482505, 545923209, 301838767, 429107456, 65466197, 400869145, 603396151, 201146053, 29560436, 908247428, 740900666, 645622178, 468181946, 182006817, 585006092, 39427009, 901513909, 575103140, 643739693, 969005418, 413112711, 121940507, 949419798, 274176335, 533655948, 73448571, 447893873, 303200166, 406062958, 327948494, 399154885, 680966803, 676784794, 346165530, 118434942, 634041854, 219847494, 927409557, 731595298, 204066166, 484721091, 397391612, 62697528, 613046235, 363210072, 588627148, 359818291, 176675393, 710790103, 31891420, 193284227, 13322649, 80677012, 364175866, 156203486, 303397217, 540753075, 969185318, 762928705, 479974322, 873609278, 714679223, 243389411, 893917661, 730412727, 540295939, 380888528, 199480073, 111615382, 501213077, 699982545, 83674978, 340471893, 589623231, 135448371, 354059110, 416125008, 490338358, 869847423, 644581498, 153365962, 261322947, 680966984, 400282844, 542955010, 604680600, 412088220, 680278649, 139286485, 860834305, 469429775, 280658323, 253030904, 2560916, 10309871, 297479762, 823144855, 871982081, 47058346, 963847165, 382927224, 356584190, 324565827, 306141977, 910279795, 453817674, 601981427, 979339306, 222338413, 904561649, 382529080, 408856660, 854658577, 411827225, 670817056, 827144476, 223389693, 471934610, 930635535, 587441381, 722797748, 95690794, 663628478, 287716698, 646651719, 701670514, 288321331, 90367689, 303151955, 540716833, 449495113, 614473847, 768187147, 779428778, 859329178, 317839203, 24311574, 208713726, 534909824, 569617669, 779723332, 951823587, 262620278, 508684571, 644816282, 124674019, 369884532, 146396384, 993989514, 828097325, 353947367, 356630001, 483119775, 36683277, 829372562, 480348153, 416969202, 237164413, 917166508, 673670902, 955993972, 550159722, 115253791, 571208381, 883450110, 234414978, 338605160, 465632072, 975880238, 1, 43, 987, 15949, 202614, 2146662, 19672862, 159841410, 171958174, 857707214, 674952199, 863564473, 694487987, 218927913, 150857334, 64522123, 242512102, 726888439, 233627107, 811786714, 114239005, 343074532, 372330107, 720689358, 467711835, 904517093, 48140523, 445520536, 151023837, 477389409, 167654505, 524330326, 826025786, 750662832, 873751815, 63739722, 191556854, 667326112, 50500515, 441625511, 782830742, 400734038, 564497630, 921910383, 845548941, 368028935, 749018447, 103585045, 796556849, 628596101, 868979841, 539520158, 627354569, 90231323, 417433082, 56768496, 355579497, 422451590, 886349503, 72956900, 803725461, 415871073, 683643384, 621063238, 193330057, 325926450, 277754812, 24871409, 448472012, 886190243, 823962291, 441987145, 894908057, 837390023, 862747763, 91512877, 722912649, 93349481, 545810047, 913016979, 515556016, 298546360, 734212089, 844284728, 136068973, 71028614, 122223407, 751306630, 44843394, 423748616, 386401231, 812571458, 811253207, 883210298, 108253088, 777750730, 94398075, 357510258, 341016668, 444595182, 421469474, 846006439, 697364303, 430219357, 145159, 329923811, 555736286, 145037472, 50858159, 758063180, 409311835, 199515197, 849732459, 429458586, 110831608, 601311986, 405029768, 899721594, 362036575, 3616348, 447767827, 718164293, 455022502, 154627334, 632024645, 923207902, 841801838, 418932384, 595460287, 460605434, 188513457, 767682601, 51793196, 194981425, 929803954, 504733978, 22197692, 870666331, 333136663, 819520200, 530915500, 599537526, 53266589, 48676597, 387019415, 413134249, 89916173, 988538195, 741237674, 580557472, 340811443, 13472882, 840030352, 781975641, 296220934, 702357371, 942050407, 935085214, 845987731, 799577627, 872670633, 692587304, 440284632, 702895036, 10589510, 109084537, 901549736, 680965380, 523560865, 14608855, 766098800, 955736031, 229070295, 918139336, 762087315, 15060087, 769624318, 210516326, 269537431, 932448778, 651446512, 367308406, 624037144, 927670291, 415521073, 854675140, 947034643, 395133007, 858104556, 792426709, 918444166, 282314711, 96653546, 423079321, 469451942, 792999037, 308400615, 330587501, 691818222, 53917678, 568461122, 362577365, 775464857, 904714011, 845440210, 795470521, 568880508, 666239878, 183860147, 125507811, 545400921, 401495311, 3467092, 430876347, 332849310, 96436924, 957680475, 836934713, 150232592, 891109199, 995835861, 145792868, 255284669, 853681633, 801676454, 45857933, 127560794, 137690320, 534209092, 436059291, 890838261, 134212816, 302504982, 936257832, 761720727, 269396963, 28197218, 59083210, 947207164, 442972791, 384169121, 488722025, 351406087, 443097712, 82956552, 698141640, 145942108, 188889308, 734290094, 387705377, 912805029, 973822420, 47485510, 507370861, 221674431, 786661915, 91335607, 856760661, 173031704, 864904090, 599152735, 495185408, 938099393, 556362344, 990758140, 995900803, 254599934, 462199704, 5008078, 665636661, 527028350, 642386127, 1829553, 551952980, 424017355, 108488740, 701380336, 806666866, 700141562, 59441909, 362171728, 894757457, 445400929, 773238426, 127546419, 723395394, 338826564, 332919619, 340737249, 850054615, 184058121, 13063831, 278558952, 698063140, 498777528, 72607237, 345269132, 902279995, 183690503, 772520236, 708689187, 233896476, 458831695, 230994551, 41124197, 206351350, 689101399, 262700029, 620939252, 892377787, 428085255, 694339277, 213848040, 916329377, 192795757, 474268014, 561285670, 220016093, 638297144, 193877561, 647642810, 64716523, 5417153, 709160560, 438820650, 471896153, 456049785, 424945489, 102312939, 179871925, 155527933, 66018018, 519349428, 575834851, 366155295, 196027859, 709388961, 444696414, 108229719, 111474967, 169464130, 765045351, 916818004, 674916990, 958919968, 932259128, 849009441, 829390390, 846317162, 253991616, 482990034, 163822353, 775754269, 532037321, 49173712, 212326050, 301906174, 678424573, 534302771, 375782334, 160287870, 855370313, 341617592, 25457804, 708941176, 246832732, 903916100, 546588049, 96029971, 706821232, 940560978, 101534792, 337492719, 856837601, 613769045, 707646199, 812028723, 616833643, 679800396, 535428679, 224426630, 413895724, 784683428, 431644219, 111092914, 661756720, 639659700, 41894591, 68359952, 43802473, 952730000, 823133424, 376059765, 707785553, 822330735, 771301262, 948220958, 908479296, 864547297, 515908783, 27167717, 175015260, 401476125, 721945851, 298498970, 707819205, 838011772, 889483594, 356594984, 693435347, 967781679, 401435494, 355846180, 333596320, 628919505, 303558980, 984974994, 113643042, 89409518, 612893129, 122412730, 114900098, 810658251, 247580260, 945287301, 609126629, 492005778, 772356444, 361927818, 440145503, 858752994, 174471327, 210890472, 769016792, 638211867, 546015263, 377533141, 892710683, 705066724, 412035898, 913706912, 989583745, 102815427, 296051463, 435828877, 627348761, 994079761, 369313875, 909339708, 172995194, 816793393, 474860389, 821690532, 962160124, 246051373, 970475428, 561698902, 165844443, 708639335, 918973613, 861542417, 207950600, 197794802, 563223285, 448456804, 787570186, 926930606, 566070711, 279041721, 162328562, 287318056, 191225488, 14318341, 585550504, 409974535, 697728497, 891226405, 200433586, 381575055, 638337683, 483277973, 755030264, 867834356, 962849947, 821535631, 1, 44, 1032, 17024, 220625, 2383232, 22258540, 184242832, 375813872, 392612893, 231706087, 882424931, 687132034, 689650073, 577977876, 303878988, 24310937, 406963663, 625468735, 582435950, 41660062, 421950986, 98962940, 938709884, 758565048, 969234571, 703952131, 900436492, 658647225, 285611947, 399326780, 419454732, 205387170, 983950227, 49990302, 189001672, 62673927, 586296391, 184361166, 506353667, 438069708, 256171907, 825943859, 951340167, 368115756, 522855639, 198647246, 263328246, 450011807, 434855284, 725807775, 648411666, 18383140, 128787399, 387148373, 905324825, 158891954, 656234845, 213026076, 490012707, 365468167, 200221292, 298615515, 290107567, 35072337, 317672326, 60118064, 676291945, 898619095, 494511021, 35193707, 681989460, 255539191, 6318676, 181981289, 309123618, 769843578, 942743189, 29734288, 954472400, 463236670, 747980714, 175643037, 260101113, 77874147, 589524374, 710018290, 567729062, 854908844, 767838566, 521233813, 535397022, 395450772, 519565978, 430844324, 691804767, 750969410, 915664434, 335442962, 327801393, 599337662, 151524696, 372580414, 756807473, 202845724, 578628778, 324772867, 495203100, 594805038, 176866440, 134364432, 797477913, 981614510, 128692174, 938852792, 42148884, 122641852, 370944239, 473851910, 935488807, 532851475, 689984371, 438315593, 696398812, 66001022, 428174065, 54501471, 80878480, 666016821, 47295976, 813797397, 317765605, 714997505, 258919731, 82884010, 661027522, 582655484, 361252385, 24311003, 432884688, 368733632, 23821090, 792526029, 846601436, 536812192, 29313630, 382435159, 426147993, 517181759, 645690342, 270896281, 775661220, 283600768, 240876557, 135665693, 104458079, 616729602, 497103691, 828815240, 86098789, 998656307, 754065783, 488969594, 91503702, 52278308, 883359011, 733253122, 448869387, 985543203, 116773170, 582006344, 860482711, 481797421, 498040658, 240829616, 836032529, 195942841, 508465042, 970760583, 262117458, 515914406, 802808161, 784332475, 374122343, 146224696, 841597534, 586439935, 244148601, 788204315, 767547799, 776362337, 510076278, 624681830, 364806405, 36907700, 539421266, 800828005, 512242954, 899834647, 163376162, 50294413, 18654970, 84289561, 55576943, 421249957, 34930346, 752291330, 162276973, 265235612, 648593820, 174309283, 472188614, 715911113, 367773012, 121970433, 269868616, 883985007, 980070897, 514347496, 412293057, 574601560, 116830355, 45453500, 562859501, 189078677, 827602581, 712444490, 316586780, 733065979, 840949184, 60074648, 135398686, 424428452, 321968689, 410040315, 273128858, 471407472, 574966766, 873880166, 875045586, 51088331, 163730111, 878321231, 726127318, 966070068, 992549896, 363335253, 89848987, 723352311, 66759579, 406269326, 227087300, 150259572, 36586234, 121181736, 671327424, 433664784, 948164313, 657988535, 451431758, 352880293, 341991927, 179834471, 17796695, 709446365, 576526708, 534876965, 620591563, 749402589, 628280366, 213414310, 982746106, 780180633, 458647121, 527146575, 210950823, 363805011, 571210392, 912463620, 153315485, 532024632, 427468951, 230879114, 869803861, 964025520, 480715223, 895116735, 766188327, 419338263, 475074013, 158183698, 899486620, 551866464, 830407504, 385674668, 305150124, 25769566, 438519248, 46473036, 427624180, 723264512, 651472006, 264633252, 457374493, 476392005, 982968243, 594462543, 141658727, 489344824, 433530156, 442633667, 193279091, 506366676, 618868695, 731227096, 902261819, 499005142, 38842574, 647293009, 470120821, 963932040, 826530559, 427769181, 52186234, 243569284, 806914289, 77294303, 605077946, 125786816, 193185124, 669741115, 146483601, 421911450, 244025223, 607708016, 920909811, 503255382, 458139691, 962827176, 614853461, 60315827, 350564197, 429760397, 252570002, 854719144, 336843776, 342192419, 596659989, 924243516, 172320579, 980212083, 387574794, 749118912, 796421442, 338721201, 731277700, 423355068, 842226704, 398877706, 643899462, 276311394, 413568057, 530987554, 558156380, 825270018, 71652153, 764304967, 575174245, 41877959, 189656159, 729954858, 472722511, 759829544, 285982254, 921037034, 543320666, 873711613, 829723375, 146980729, 88768980, 242470712, 9284436, 325379730, 426922557, 253585643, 473459335, 496125795, 212116723, 579959160, 525505189, 681915634, 797942363, 691505794, 454823298, 342255990, 994255712, 284908161, 275004161, 935102263, 472107098, 948357256, 856671615, 528973823, 649773881, 963952149, 308388016, 911396221, 251193820, 721175020, 199750213, 907595892, 491208059, 66513541, 911357998, 28185931, 408941602, 745821213, 601730782, 8869191, 260152446, 11616084, 492782894, 282010506, 115926945, 586669273, 760307966, 135350671, 730510115, 701832702, 230080848, 284697593, 182609947, 968668397, 822892958, 20031466, 582030222, 113170973, 44631330, 117449096, 742186715, 393019551, 475653487, 44400405, 854169605, 417464027, 638137059, 767027912, 156446839, 993857936, 340495049, 620457258, 138844665, 409760846, 178352112, 82788960, 388732194, 649306589, 798058368, 662337136, 564354859, 463324080, 651997437, 151329929, 798760314, 140393196, 82249686, 534814725, 624568021, 130746531, 950081340, 74895509, 582830295, 80288213, 896322580, 930247101, 961634195, 343840503, 151542664, 791653321, 891526646, 512046490, 292522561, 321986893, 483787584, 926080170, 410378864, 504638099, 532986681, 138953386, 701001827, 64586773, 800287681, 592917926, 845148767, 612516645, 103437292, 360749745, 802262044, 905182790, 741928176, 827192105, 608668686, 275550867, 759837767, 768468707, 652063776, 969103143, 1, 45, 1078, 18146, 239803, 2640055, 25119048, 211741156, 609749448, 185787670, 784612981, 979654374, 245960280, 15201333, 958496287, 21110097, 315107827, 742613444, 350112648, 551346765, 22689059, 646342016, 52427180, 113726997, 20972491, 531552248, 493279562, 92962089, 319571072, 658193556, 921146440, 975234478, 32484025, 175484024, 620442122, 566033382, 228886883, 301912152, 137109958, 37427138, 531183271, 684452057, 239066445, 806400806, 345167706, 766401402, 659593100, 342864185, 793254425, 754419464, 829307575, 253460669, 788296808, 455700810, 203460090, 299960617, 672027544, 662169751, 130171479, 226661975, 16040291, 641167104, 11608362, 92735361, 828424038, 151425031, 757058935, 838944903, 705030989, 271605017, 832315720, 525711262, 695893337, 524834613, 616761109, 89325780, 498691877, 390082387, 413410547, 86170624, 733987779, 857386717, 121183471, 378540433, 791481061, 602874536, 895775257, 706223069, 9499, 916233199, 610175789, 305910126, 402086898, 380865911, 987929263, 784720236, 752249361, 533065111, 750214951, 512527924, 120069833, 497034065, 691332267, 542878776, 324018841, 841280375, 368737196, 213532423, 972352910, 856518833, 695976280, 832491001, 482258020, 288928023, 37469870, 669147935, 728824530, 312167670, 98462828, 664815478, 37466991, 488559701, 805407681, 555656112, 449333572, 115257333, 422614443, 217564969, 709154128, 523463461, 73425486, 892488653, 72758100, 139084611, 245397266, 356349189, 258341975, 374070936, 726599734, 907199192, 145474167, 868900328, 80767170, 435742131, 604761267, 550372021, 238314098, 858506407, 406280874, 734533546, 294613351, 569709112, 578499728, 811514468, 971780315, 806793934, 105431100, 109183449, 48863833, 577768093, 679710969, 415227663, 41263734, 575857153, 381654592, 178237376, 962188807, 96401085, 816699360, 379978, 698529453, 815682387, 657011537, 324418972, 693645417, 573047105, 308103161, 882958960, 454854080, 319280881, 638681315, 366562235, 558670399, 767575020, 418970310, 599121706, 533764150, 589341596, 935247125, 342450103, 752510984, 17885861, 270962366, 936052758, 754048953, 578853463, 395299411, 975776432, 660809842, 714104917, 664542262, 888472526, 460099640, 981638523, 92874960, 177231620, 389704303, 815325394, 892076514, 810821143, 435904186, 382196425, 459031152, 355917826, 128881343, 657597142, 768648132, 489510758, 615223177, 785945817, 514595120, 566588750, 607013232, 187911920, 428934627, 690400146, 385480557, 274884476, 214574226, 202705516, 78809920, 768678876, 104566183, 54811645, 783466377, 78714677, 225394661, 571378521, 194681502, 425310485, 768219090, 304793231, 206900396, 615627160, 652872143, 605935098, 888495311, 608958308, 684600222, 150382009, 670451269, 632074742, 29926906, 676412361, 727588975, 541140282, 152873820, 396851079, 644404346, 44361987, 675992732, 795525664, 898044746, 408945421, 518637916, 428148139, 754863856, 398182352, 901207212, 713356422, 978366083, 314876385, 700685480, 450639991, 507197672, 750335365, 694787156, 659670168, 536065922, 58255852, 874808151, 601680063, 300562698, 308983506, 144763409, 291800793, 77526020, 485403753, 904665596, 240987930, 592380858, 131116194, 318805303, 40941643, 253699630, 655235690, 431599614, 508389196, 766960976, 64307752, 83604788, 642165815, 298107337, 143184667, 782909601, 97135064, 800759539, 594114128, 462420032, 946857620, 578998109, 847963761, 556321528, 57391815, 681855904, 181815656, 486333346, 837072759, 524567487, 328595763, 549915998, 810586503, 921107919, 625157836, 520890292, 832156974, 502972509, 844559735, 189855766, 821823028, 625190873, 310510259, 495827691, 683011136, 462720297, 218315456, 558392392, 789434995, 973556645, 730884239, 996176654, 617108310, 869866261, 672230385, 823462275, 454316955, 569646417, 836576125, 486906178, 189726176, 941091111, 447563926, 715506888, 259006307, 152570437, 178255829, 705545293, 756368978, 655390691, 445318929, 656847742, 582354283, 964611397, 757172000, 601301680, 424348696, 51484783, 19240319, 282677827, 308226295, 848392338, 155829926, 371112122, 224524783, 972970693, 890401898, 186586738, 229535528, 744395297, 436751188, 287103606, 767393594, 221149011, 725319915, 148703291, 142739608, 565503173, 66967587, 579759051, 568848401, 146971072, 400042251, 42796974, 930117091, 516575412, 958322295, 49672443, 25502320, 669481138, 837449618, 7837933, 569472200, 125364493, 253977071, 938687542, 347213905, 923213402, 374713215, 103889249, 423021360, 42560340, 446498368, 893011213, 263552847, 473020638, 594960497, 638188472, 306243047, 631678307, 460262893, 114330448, 196301356, 120279822, 408786998, 213927614, 687965452, 221650209, 761159253, 159653422, 237951119, 705996510, 183076481, 962207888, 939920456, 729428244, 527536009, 933629825, 48104537, 426892607, 222940406, 156477133, 294062878, 856995315, 562470362, 935041969, 210948751, 968306167, 842365144, 520781012, 542464204, 753086923, 742421303, 62000597, 644679235, 71406991, 633199433, 272647461, 452692051, 412108892, 971466694, 51102980, 982720545, 17172841, 800141833, 835541670, 112517201, 389287762, 451060806, 667438631, 372888210, 71363616, 925222882, 974951293, 516878304, 717488009, 957226897, 42671831, 558776576, 623171604, 305500795, 631070922, 102790598, 482941055, 578335399, 805101814, 173951677, 379242816, 368922629, 730730546, 873191134, 654555294, 282999571, 122452789, 92227034, 843713012, 807240125, 801145367, 399481174, 81195926, 292593849, 487745170, 77737545, 120468361, 275563695, 294725580, 329691567, 323060707, 128192468, 940264172, 278390124, 237020514, 693096287, 868976326, 357620751, 777387506, 600499325, 283061659, 552760619, 551343042, 374674126, 67456147, 355451755, 309520773, 188033652, 438124708, 963234900, 524570431, 966112342, 609641134, 592345761, 1, 46, 1125, 19316, 260197, 2918394, 28277069, 242654144, 877454212, 274093151, 658806941, 733787098, 12686768, 373279778, 972151771, 700803085, 323660829, 529034010, 15342046, 14519348, 617205005, 151932388, 986173050, 673700068, 544467810, 964286681, 515278420, 556139518, 340574896, 558301369, 203169010, 995039572, 456888812, 641435231, 165153057, 140522292, 660622205, 195293121, 536816710, 963078287, 7389104, 204944482, 754195920, 468292992, 782743724, 983001140, 866703245, 496885028, 44229335, 385957410, 278539952, 468949573, 420982388, 313452346, 869856814, 98935497, 204399132, 112520568, 660616311, 229799510, 228233497, 492491671, 631417681, 54933646, 149425728, 621332861, 339088208, 164640489, 629238436, 824895721, 154091091, 876001533, 408513031, 998443240, 581987593, 639413342, 564182232, 919538600, 946772636, 882410774, 972663920, 656083562, 92818, 266781815, 775781699, 746031288, 222736672, 245153398, 853395663, 612580130, 998160370, 644539418, 268757618, 522753001, 961290581, 775849265, 167666621, 207332842, 699178165, 754169098, 895892786, 110804927, 209717022, 224332021, 783584762, 168756823, 846734143, 820517435, 567375827, 214226237, 514413130, 94334242, 56417678, 452070622, 302779049, 643793464, 45275321, 465081583, 721848633, 905142006, 304646178, 594655979, 909007937, 734286949, 886228757, 175346016, 613908391, 543890160, 182181133, 880150750, 840065256, 833202286, 948664835, 99995047, 986587901, 143761895, 873393215, 472341142, 369663112, 813013714, 860504625, 731747262, 545041246, 583231233, 427381591, 37913038, 537312918, 219404202, 592801409, 727962123, 878247573, 121527391, 62101177, 856133295, 688561557, 4927109, 639161755, 216890863, 944378755, 396352437, 878653962, 905668778, 386987830, 935008847, 899701147, 100650401, 955831377, 336099358, 325599961, 655390214, 368725260, 410912881, 868037904, 255016544, 51552711, 320078126, 868474642, 332377928, 241406268, 35418479, 170587950, 775390874, 598922434, 616742075, 563583865, 362204509, 606438997, 894815935, 49721736, 43588534, 841088924, 703571407, 258771291, 525460849, 233015242, 491199815, 325653075, 858892862, 519655123, 115437087, 727491564, 149427446, 582972761, 204458210, 871579136, 737982490, 129452738, 424878982, 856725917, 336920826, 730532856, 841738688, 738232572, 913319995, 816486040, 235770118, 427698004, 930569686, 569011751, 212446463, 508105319, 803897811, 496189040, 948372030, 432798655, 784691260, 809769369, 691850475, 577558004, 62715847, 947764060, 196109904, 506172286, 447735266, 980867772, 417186123, 46557919, 986790130, 277584037, 822619391, 621076591, 388367593, 68342324, 236699370, 119970164, 657351210, 878868802, 794459312, 436412351, 290870119, 503296346, 564802634, 58773734, 218770767, 842309450, 694735121, 712067611, 605426442, 634737321, 598847809, 189964014, 104895974, 463967300, 12836011, 374171101, 422839429, 769990513, 562838372, 23465799, 935303296, 758855803, 832260567, 373886738, 362866660, 831747060, 745193763, 842521525, 971131364, 323409153, 328965945, 810807795, 987986960, 514599613, 697337301, 518676386, 255182547, 320862033, 438306682, 656059329, 246817307, 296427451, 518314128, 212813255, 401599307, 322632262, 651271379, 102975853, 978392574, 171788197, 425477753, 865141598, 200230496, 352371432, 128877128, 483645145, 487174027, 207964600, 565016864, 366179929, 769999162, 980709292, 279413092, 778963675, 322935221, 775556840, 152203885, 621120920, 754303914, 144652778, 603456104, 397495432, 911648885, 161631342, 183072379, 436197254, 410415743, 654211646, 998944149, 660332881, 659092994, 407158213, 993390015, 62237745, 342306369, 807083806, 460112259, 598009122, 34231667, 354435262, 237881432, 155417941, 495370397, 996923439, 566380833, 854227389, 702509945, 42544433, 284265702, 294553519, 149363293, 27077251, 84953964, 442875086, 52560456, 900402134, 145229989, 73758817, 191009440, 854994962, 638721915, 122661714, 185868970, 77283521, 869275152, 18655948, 313026284, 709600476, 473812539, 310414874, 881320952, 952459523, 248120422, 525865505, 878780555, 987277088, 840681160, 676792790, 412115993, 140030918, 974129475, 721196483, 656805079, 905290349, 47935904, 451920705, 209356056, 551066765, 377150442, 379611973, 957219941, 151470005, 815021467, 645207971, 427463516, 863082600, 325313522, 124436219, 624577057, 614877838, 455973640, 851822937, 25478672, 694724523, 841056623, 311625157, 733217559, 234679922, 488590424, 672460808, 393534712, 496209755, 929085969, 673429468, 675205481, 477828672, 541309112, 421475544, 478494486, 773959869, 620756099, 817295158, 343366608, 474968096, 138789669, 1261477, 581929663, 193727536, 890932863, 10823177, 566850894, 774883564, 16714666, 326523886, 969386350, 297903394, 330603328, 602435368, 640131734, 422205271, 722651837, 536164302, 931111157, 119137488, 728875089, 985577117, 985476890, 17918009, 917723365, 472997173, 89115107, 916366434, 502538821, 230961609, 303908854, 617061492, 736625515, 131713887, 339453221, 738950163, 633262610, 426758031, 238112917, 779917917, 838020550, 66019448, 650675847, 778117049, 610691432, 213274580, 385410347, 146924004, 364868172, 467790003, 719723336, 134820272, 752419541, 477278067, 249134595, 704095466, 475445405, 736299900, 879265925, 152926089, 845846141, 495967193, 279498385, 571884448, 188818617, 160584873, 477296264, 718325160, 376134972, 29944771, 994040918, 900529668, 502667072, 63109761, 493032874, 781301515, 461834757, 82343644, 481132313, 514447042, 33858163, 779555233, 748165656, 15592733, 72424287, 572256728, 868353288, 210902382, 873738113, 462082508, 116372507, 317994063, 320661573, 43412947, 698165915, 782179405, 544478699, 376533191, 591100852, 669522818, 718785967, 689856669, 868867194, 692259782, 326169003, 372530014, 278822874, 245059471, 536750832, 337386716, 351509954, 600150419, 771930319, 812137400, 268506281, 52663290, 576040882, 250206016, 182636529, 238498760, 83748189, 556944302, 408365242, 877381661, 687598532, 206936328, 93325077, 375585930, 311118119, 840250578, 1, 47, 1173, 20535, 281857, 3219563, 31756649, 277324867, 182983217, 698763572, 224340727, 130185913, 938338213, 457596872, 500667258, 726272186, 242531386, 490324006, 697265581, 186365736, 123707347, 149163288, 89978475, 985283339, 584841356, 785509005, 693590689, 256394211, 919078587, 671307265, 271140497, 146527772, 508423202, 678732983, 767147115, 418422439, 470469749, 411147184, 246424306, 580998273, 228726677, 964726100, 955513349, 444565758, 668191949, 622619432, 792082487, 929348032, 601983375, 875985614, 424117930, 730694027, 740975250, 920167707, 500437835, 690210005, 493329701, 913508192, 695611331, 515433292, 682059417, 760833644, 299135864, 144219873, 937695856, 872711671, 176916492, 348891212, 334587033, 49595521, 749704350, 806067034, 773327860, 183297942, 590517602, 642228939, 275941227, 305722242, 165986509, 644370063, 71211109, 994092320, 193064301, 728492690, 76982066, 397536959, 240992716, 459846893, 745186728, 715105963, 864528752, 8495685, 753272988, 61740216, 691254120, 133693721, 536597663, 806042634, 964981978, 37162518, 164112239, 637759779, 841824460, 829311498, 573961610, 622092127, 856298148, 23010232, 90428839, 608194623, 46765621, 381935126, 362962166, 452925715, 585602790, 768818647, 88708532, 942042803, 418311021, 521378251, 499003594, 126819649, 281499536, 951375086, 146412815, 883657287, 598780576, 163659546, 959278876, 560517421, 665346319, 929162776, 164983787, 77699826, 451232846, 342897676, 483260356, 399557298, 954841649, 593150358, 617703430, 292815034, 3827776, 631211917, 629217856, 387782790, 117795063, 964508694, 824603912, 347867132, 217932218, 808071571, 466159291, 919428338, 306867765, 310085680, 347929669, 103137973, 445637697, 645585557, 573817817, 596387955, 672995733, 578127218, 402908135, 115353766, 244018895, 365778204, 555835033, 188328988, 247770780, 214263457, 844226086, 575129810, 998900133, 642186262, 886066131, 9933705, 609621463, 398319031, 223920768, 209742125, 519163806, 74615456, 814536291, 217678251, 205417278, 306418059, 464475526, 330591049, 614947407, 841330174, 17421893, 462387593, 572435987, 550253368, 393354277, 125715312, 124567536, 533400012, 599797708, 528236566, 670562226, 867851657, 488086533, 312725786, 238592338, 37063455, 385067665, 487783197, 118051898, 700641656, 71282753, 435781034, 103306472, 894876554, 845215295, 848516, 105817111, 455104275, 971250603, 659938256, 173306291, 702024160, 716038595, 487118454, 170680030, 880373959, 881689085, 153725278, 74926408, 143593976, 537712434, 635112688, 530810156, 750175992, 211491335, 495469862, 938874667, 906814766, 530322450, 654580872, 345961757, 642596517, 63791230, 944154048, 670877958, 937127089, 186748489, 915912734, 209561832, 276486399, 229476817, 558761321, 226557040, 227364465, 312169979, 745218623, 741668605, 732242764, 141121784, 862165956, 612899824, 26577011, 945385273, 251793938, 946782241, 731260038, 244678083, 406380914, 904932224, 539791264, 681567161, 903979395, 522313639, 307479666, 592336384, 274405785, 808155145, 116439879, 610551965, 466693001, 783212908, 356926408, 441684284, 460337698, 929744044, 6376955, 718008169, 946348344, 771828366, 973818233, 895371075, 977137826, 380169268, 772257849, 31334848, 472603919, 411133545, 814229722, 268412684, 269984826, 925865608, 465876593, 90547760, 192297128, 107314233, 564985934, 624177562, 939350415, 164843750, 127698384, 375467125, 733175906, 272735725, 449176665, 148653187, 981408173, 518395662, 539465581, 376426572, 523018009, 244326749, 117372211, 788925566, 998562683, 66998700, 958836224, 912519308, 243826028, 372775429, 817271079, 249393258, 980817911, 290157076, 803249202, 54296904, 967950499, 259586185, 891527285, 197070576, 229312354, 227197980, 799697366, 938796541, 780082061, 90937344, 484280959, 41280132, 365255061, 357940368, 463355056, 931322797, 484716584, 549219150, 927360223, 836260928, 974511964, 168938341, 138740543, 617041490, 552137623, 940491117, 311751083, 797191757, 581186247, 747525174, 464341615, 45074367, 877273095, 118604361, 820377975, 651223472, 330450797, 299712101, 798402816, 155978336, 76119913, 279749437, 94544299, 576902970, 337821847, 762491092, 205421212, 628488971, 912880168, 293200919, 74345429, 106904237, 117214135, 997309646, 440117215, 601730010, 44099662, 275878624, 579837056, 734358196, 740396992, 105320711, 497734455, 593389397, 892951024, 375888233, 469355971, 904918031, 759963217, 159920933, 656339936, 82028185, 635763012, 494109863, 887577439, 747214684, 51704021, 870514178, 310168296, 344440919, 671389360, 63636271, 867520663, 253359253, 809561479, 515218518, 735486509, 595414813, 855063768, 809133514, 296905455, 403829884, 13706060, 521945271, 406722813, 508410711, 177195219, 735377028, 927006199, 631467156, 561281245, 747357347, 2938426, 465345595, 461810717, 851331500, 936133185, 709629669, 764183492, 336958888, 999734612, 886346709, 929391292, 283117585, 489898780, 493902211, 377860665, 233672406, 313970515, 130449778, 925311516, 829665465, 27964512, 47478431, 502231137, 77997958, 450616449, 231073347, 922519036, 577962078, 74763491, 840109600, 825429573, 325716083, 462423227, 684091307, 610980133, 146344297, 230702558, 840583842, 568780809, 837872774, 467777629, 918753619, 868791683, 692922864, 937076083, 487643358, 553595896, 717484731, 882361644, 739294901, 547711612, 781629368, 821302751, 368923697, 499416921, 374122329, 146178192, 867117817, 743635071, 435195107, 43377741, 23687167, 878990481, 99110158, 262344925, 137035868, 292609610, 625408058, 171070693, 281506530, 350758492, 515834894, 237732608, 828774443, 840832942, 431386878, 857791323, 291378943, 894741249, 559570546, 881728336, 216217018, 497590589, 210577047, 706853900, 528807154, 595327246, 243687205, 679896105, 276389715, 520651743, 981854062, 782051052, 628779694, 482906971, 308000266, 98460224, 329039027, 663453182, 866909422, 358447817, 756042580, 103701857, 530184673, 82157052, 864831037, 833622836, 129557279, 680891914, 903510655, 223117879, 584910098, 872789802, 683398377, 818673921, 424793316, 162530200, 461191009, 233747923, 764377859, 866276050, 20068038, 599500015, 419525268, 504837656, 702339633, 161478719, 731429464, 9977417, 955013204, 944736389, 868359658, 303235910, 570685307, 762022093, 973456873, 491776893, 191155949, 1, 48, 1222, 21804, 304834, 3544928, 35583250, 316123172, 530785426, 505824986, 901343166, 615485588, 789348648, 698747334, 657848248, 964586458, 476943547, 698458295, 801769019, 257736525, 542576587, 933572174, 9542546, 488292838, 779820677, 404677231, 568188493, 931045218, 340825658, 205993974, 185959269, 78058729, 445883053, 431770274, 625502333, 180277174, 804167964, 894493650, 995189957, 934651928, 779076648, 286076285, 196236261, 433504295, 796345349, 46608071, 262327913, 615865530, 569486410, 232121371, 86175778, 154003167, 455565337, 592635041, 449778081, 946011559, 315342730, 523152035, 660192808, 984322053, 918448908, 362530845, 976500024, 826353996, 979299043, 20455239, 106430716, 169990095, 856925551, 339927417, 872925000, 454748405, 844111855, 778706572, 953334777, 367875579, 54603227, 952723870, 746089521, 114899675, 378338080, 515017450, 901556480, 75514717, 118586517, 750778341, 164215503, 398032943, 932771419, 175973529, 371281707, 414155738, 136305212, 176477492, 529591042, 473449712, 104580388, 917944592, 711611694, 275529831, 657391663, 618370464, 182199238, 863262145, 671572410, 926093081, 964697471, 20599847, 886336884, 976845790, 332330830, 936899217, 469444206, 333826539, 382006323, 404644652, 86283892, 711449573, 711524895, 240243757, 137744674, 52585102, 502954368, 568353873, 424768720, 673699213, 453807002, 277591996, 614231800, 858886730, 933633627, 855960053, 795294602, 320736325, 160050137, 741837408, 875372187, 933116510, 439299086, 339530899, 998809886, 988163112, 414204450, 626581582, 425958595, 547450689, 257877182, 25212376, 487090639, 693248108, 736165691, 261048117, 530252319, 667332870, 224234420, 283256778, 493030047, 381167115, 959191937, 567700201, 408470930, 456733167, 877572444, 640070139, 177231251, 53889209, 630925282, 764167042, 903138510, 822950867, 161878067, 741376139, 620673064, 828400388, 989198090, 398235498, 335164252, 650259410, 895482301, 288920533, 986020511, 960531109, 692510577, 743863232, 159848129, 639142915, 658806616, 286815941, 569150064, 996156909, 474086872, 377428234, 108191201, 968576455, 934066962, 520785392, 648351310, 322768543, 500047228, 717012630, 366640002, 617370336, 747113890, 647615517, 420668064, 485924194, 28548015, 242698362, 20265134, 481161073, 780894508, 716872330, 925052871, 809234518, 209608950, 454869307, 42621234, 266915957, 548835092, 11648368, 200676498, 803279760, 609790836, 522043768, 787672824, 264643232, 571421826, 762085826, 854807719, 119023111, 660310435, 945098645, 838260736, 592383406, 728604232, 586121308, 18945549, 62079587, 8000021, 137221342, 936745518, 867913927, 937623778, 183088542, 624248829, 606106136, 815005922, 728188591, 164502140, 885086995, 646575964, 60630781, 250914884, 619961376, 835493684, 1794097, 350786557, 222634027, 605402916, 871984975, 140157610, 784428245, 701028584, 784157139, 199990301, 49282014, 806191394, 544636448, 696393844, 625422532, 306981977, 200109353, 819880255, 622554727, 966234587, 1715755, 884432882, 186517679, 414057470, 559202957, 356291776, 440462056, 76496043, 54502936, 82793754, 693820485, 333532789, 139408482, 538301356, 908601203, 663844984, 277481039, 494620179, 126148065, 101563902, 543304970, 40138848, 255494176, 250466774, 181548534, 183041503, 553027506, 468172977, 571880068, 685135214, 70030015, 431414252, 965377675, 285528459, 577690235, 3039911, 424468115, 149219671, 315258608, 442938842, 340124780, 620577523, 697442435, 606981307, 195766252, 513624332, 160814831, 144529981, 626344971, 929525101, 167384034, 985564306, 757660450, 674490248, 404160553, 218780132, 253152109, 588527766, 276135385, 293545669, 229980166, 406532593, 544661736, 944987368, 74067610, 979465423, 367319108, 691015763, 308068787, 270297211, 892899529, 571121326, 682341094, 508186314, 992592910, 570463576, 551864557, 443417375, 102996223, 180706669, 66278518, 547390018, 97982020, 377733797, 642211092, 809569594, 442856622, 912786312, 563198351, 549331531, 576357131, 891027263, 77805689, 816522985, 731749256, 313952972, 411776160, 795006290, 22615421, 348238413, 716260746, 223962550, 78670864, 47765882, 267128253, 587371111, 927656165, 192469863, 806624234, 136996971, 759497678, 646978177, 833527505, 472805550, 754214240, 960030895, 232746388, 490616131, 420542303, 904038549, 210637836, 74285318, 144447351, 742135765, 244372617, 87595635, 852731251, 594678505, 794681848, 228154101, 363702627, 673985808, 239196945, 836249623, 602064792, 462168907, 430511049, 331217937, 84426505, 529390112, 953694258, 768941491, 296949641, 617567965, 759210871, 554347066, 314959464, 855978152, 459336095, 416019714, 554419893, 643616814, 307318600, 193723511, 342506504, 737708842, 961578294, 644413804, 283651295, 449519877, 262823100, 438065978, 195660179, 15479674, 929627357, 712657286, 867475048, 618979059, 615899609, 290553872, 46585860, 675146342, 899293157, 138576244, 932939832, 413352510, 228638502, 577046541, 52412367, 271101119, 704058715, 716195674, 113738084, 976781966, 417637854, 201849275, 137988263, 703452509, 833173534, 774723430, 98520292, 647910333, 702073064, 101667724, 93613248, 4773372, 993672667, 598539625, 298728331, 547262186, 609550837, 42278975, 203431476, 764589375, 791435299, 273439277, 15186943, 247517820, 332116413, 672582410, 88991345, 573172714, 370502342, 495515460, 486357723, 529038430, 112617630, 9655079, 54905538, 630913486, 94540925, 694069860, 101033114, 601510215, 405093272, 877399916, 606786230, 712700446, 365826653, 440611748, 222502187, 628732942, 260127071, 415183336, 331627148, 603111841, 484627861, 252203062, 603610758, 918118836, 775502591, 558836403, 458735214, 903545723, 229008632, 239177179, 70767308, 751925156, 652119146, 980361868, 450630793, 63075950, 714904102, 795480239, 196855664, 446357279, 343343138, 751184330, 353543327, 265335039, 291055365, 141693974, 952501609, 772988967, 982806649, 295006336, 142133453, 389243658, 551050114, 837354729, 288032982, 926886748, 940810321, 996269340, 544323652, 123254721, 449847916, 164321665, 408440169, 540527971, 235735087, 384560805, 888470688, 711171300, 414716347, 219479361, 559050803, 610845133, 321258507, 296543705, 253557800, 771631909, 466270561, 966519146, 100544233, 474799959, 147649345, 956135303, 808272257, 279282920, 472357219, 422709994, 530025514, 999788009, 64593897, 709199531, 479060735, 311654131, 943520011, 427742758, 799287390, 782392773, 191335024, 830990096, 336010037, 237942831, 237453992, 695887098, 398366572, 529644737, 344086296, 862051533, 684436865, 317549101, 968659087, 366641438, 1, 49, 1272, 23124, 329180, 3895908, 39783804, 359447204, 925733384, 746545659, 165655001, 158091124, 719304162, 111160209, 171158550, 935012406, 874008903, 988755604, 608336289, 351327718, 211049418, 970686245, 441380023, 920727544, 396494781, 218114186, 934368772, 753990221, 203263446, 488226646, 946324350, 642441651, 816607227, 122420091, 629716118, 498106515, 488881569, 100763230, 814241373, 430998026, 986590664, 188596813, 238499794, 887765759, 719310391, 819612870, 840885905, 584773429, 811468143, 396065785, 368868801, 299761844, 617462619, 308704442, 206242421, 833439007, 106715469, 970135543, 972244832, 66232618, 207050932, 577078708, 955731123, 103929249, 632790957, 297717977, 280927805, 856143814, 140717794, 889342899, 570959166, 553036683, 311778062, 833874032, 321035571, 629235909, 60666525, 19636232, 889773198, 837811568, 283828621, 499062871, 459250525, 468391935, 389843786, 80632526, 462481073, 859711240, 66143264, 831825780, 518914304, 998480225, 496960804, 480385724, 483317701, 923742113, 771054094, 630267330, 478946945, 527928962, 674723787, 882998613, 123711144, 324674723, 964132061, 961988031, 65215295, 858250635, 924300325, 577545014, 241841560, 172586320, 726876085, 210684082, 897202470, 742850020, 161301259, 120853804, 344539574, 836860211, 667275920, 72688787, 930704832, 179668299, 861726583, 168665810, 834696469, 672920894, 419563732, 302874180, 454615268, 934181182, 119694911, 779976833, 216225187, 244379028, 586838513, 942544272, 397970796, 155525782, 435250288, 609294947, 697035870, 790138207, 313089121, 451259481, 904475234, 15500998, 428233316, 352796372, 805867626, 355791012, 191743365, 390372515, 86113794, 224579645, 34292553, 472538607, 244805809, 799547326, 350596592, 550928379, 248605526, 858957317, 809083222, 418025439, 717379009, 843111164, 748566980, 795763411, 344249103, 246799165, 468081584, 533360568, 97839725, 814208152, 370784820, 149643652, 648814350, 586462723, 179226570, 323415874, 413399345, 830824722, 901264775, 785155020, 673315179, 883230707, 320461657, 209574161, 896187167, 641537195, 580708044, 615201169, 907420567, 226969633, 44823693, 653925850, 618905940, 556249274, 683808190, 595045606, 406684866, 817926872, 498013040, 741888764, 255307898, 750076370, 226664326, 45791371, 138249186, 182084615, 925519009, 32002450, 507648904, 36302093, 164244320, 134446595, 176304234, 443232913, 204696272, 377207389, 330407781, 317016375, 255990328, 346121343, 776903928, 865285835, 180645765, 94169320, 523805568, 66571932, 958229276, 706032441, 157122799, 174128102, 265560802, 960871567, 814597354, 840895548, 702037, 848074074, 17426708, 276377856, 55696613, 206160180, 32721003, 453495162, 587538197, 204676036, 610254246, 936113705, 842825687, 202272844, 145230437, 624393323, 739106533, 700708897, 523328161, 691038973, 656087189, 213848962, 927815456, 921255504, 609475698, 113463094, 529085932, 807792149, 579407091, 163833313, 694176222, 471399591, 346973697, 718259544, 297359882, 892552532, 451373341, 120883534, 8029910, 624607649, 606649877, 815313728, 231664869, 673443919, 615486405, 94571095, 110823650, 950289120, 646876432, 928906934, 684469503, 297251947, 919054473, 285157267, 967739040, 274416446, 465229888, 656873003, 825576691, 53305194, 539107135, 609069516, 669008004, 585520763, 526072937, 91836656, 101778461, 538228891, 424599066, 719851020, 234795290, 701214554, 914481398, 497763115, 504286064, 212679726, 409710596, 134500525, 154608785, 554889670, 267547678, 851784437, 749366191, 681515762, 587313005, 604179607, 297539881, 51380469, 30897443, 988568867, 430543091, 168358864, 325894509, 131217074, 122226126, 289735266, 2541560, 697428098, 339809826, 339814711, 568813016, 256466301, 865405619, 710940331, 7424767, 660900037, 729644940, 444, 450105203, 690939247, 459755659, 92556107, 42398758, 782901298, 483436309, 73995240, 784415989, 602791285, 655683750, 744368335, 684929720, 939318197, 1937536, 94209990, 544006669, 195169186, 297173575, 151918090, 559870646, 425964491, 818978660, 571568643, 60393204, 415731654, 547756555, 991386612, 383053326, 997830526, 963081859, 107336308, 898219937, 906988404, 550036125, 981857264, 691293427, 481189647, 501756531, 316529056, 476096058, 168221459, 165690115, 553028411, 960794528, 453386272, 963889156, 71983103, 494867184, 462967097, 635240847, 989817132, 23786457, 968645733, 163475174, 884798755, 971346358, 8231228, 947835970, 751371876, 21594745, 702982989, 997528759, 30899466, 874470660, 839706683, 64336797, 183002010, 415355406, 851375333, 802315034, 662347966, 459017349, 83113197, 807783874, 686211775, 665742332, 548408223, 38712773, 947065654, 224142524, 544199777, 554457822, 161813447, 59932464, 324817969, 826816639, 159675767, 610260222, 802832692, 962264291, 230527850, 654881259, 493134625, 56109407, 491401533, 163680598, 892934948, 889185132, 78662275, 741528574, 616484511, 204394884, 120980232, 4959172, 884202370, 468625389, 987185268, 797914336, 292935354, 542176515, 965256954, 25044127, 701524209, 669825969, 264620823, 983915826, 463815578, 325409981, 142164710, 946513145, 626025918, 890502327, 456729879, 921471703, 889764153, 10834930, 550258959, 888111963, 456661896, 560525119, 254574198, 379302005, 359197537, 748972811, 432885247, 174603143, 495215302, 304225805, 499574, 89067439, 956588800, 479903186, 900293862, 918419160, 874312513, 779518268, 750190343, 34999197, 204187488, 29703716, 310295240, 212734818, 705461990, 880565621, 542764103, 578132976, 871657196, 920555643, 635330221, 603836039, 905337022, 446003049, 531829391, 914627500, 109964459, 793773872, 883594493, 588890899, 761763418, 850946563, 47045637, 406265955, 398330580, 175033998, 98562597, 74022406, 109783010, 888406279, 62923507, 851720727, 920064661, 659715101, 731241623, 740764931, 68490942, 26861674, 832409630, 156628069, 65837301, 277330611, 504531610, 621094682, 513712789, 824543274, 863846088, 522929299, 50674845, 205053841, 391074024, 703020653, 598865065, 977680558, 126857946, 571772915, 596794646, 195429545, 328266420, 36051456, 451216030, 522276964, 948367998, 561406981, 389510759, 585943971, 108053297, 459413669, 288907310, 136029766, 802792879, 520247265, 414339912, 337619243, 597859489, 40005835, 350918, 321070418, 199829979, 141119131, 515535428, 350920730, 314377413, 808898947, 900198037, 799762368, 570476717, 244997759, 402733111, 626061442, 103647198, 938528989, 898060580, 652361018, 641847472, 149112119, 134262079, 887185896, 606038263, 859408453, 950373236, 692335861, 405660442, 565431386, 959094106, 393940636, 423632434, 612413824, 143336067, 663257107, 9730523, 471491852, 112828340, 936303905, 998673093, 55233966, 416039620, 144081002, 565258672, 539355694, 202448366, 14002378, 539019751, 307827209, 288622328, 788194350, 570120788, 965430343, 472467292}; signed main() { int n, k; cin >> n >> k; if (k % 2 == 1 || n == 0 || k > (n / 2) * (n + 1)) cout << 0 << endl; else cout << ans[pos[n - 1] + k / 2] << endl; return 0; }
replace
1,559
1,560
1,559
1,560
0
p02975
Python
Runtime Error
import sys from collections import Counter N = int(input()) C = Counter(list(map(int, input().split()))) if len(C) == 1 and C[0] == N: print("Yes") elif len(C) == 2 and N % 3 == 0 and C[0] == N // 3 and N - [0] == 2 * N // 3: print("Yes") elif len(C) == 3 and N % 3 == 0: b = 0 for c in C.most_common(): if c[1] != N // 3: print("No") sys.exit() b ^= c[0] if b == 0: print("Yes") else: print("No") else: print("No")
import sys from collections import Counter N = int(input()) C = Counter(list(map(int, input().split()))) if len(C) == 1 and C[0] == N: print("Yes") elif len(C) == 2 and N % 3 == 0 and C[0] == N // 3 and N - C[0] == 2 * N // 3: print("Yes") elif len(C) == 3 and N % 3 == 0: b = 0 for c in C.most_common(): if c[1] != N // 3: print("No") sys.exit() b ^= c[0] if b == 0: print("Yes") else: print("No") else: print("No")
replace
7
8
7
8
0
p02975
Python
Runtime Error
from collections import defaultdict n = int(input()) a = tuple(map(int, input().split())) can = True if n % 3 == 0: d = defaultdict(int) for aa in a: d[aa] += 1 m = n // 3 t = [] for number, cnt in d.items(): if cnt % m != 0: can = False break else: for _ in range(cnt // m): t.append(number) # print(t) if any(t[(0 + i) % 3] ^ t[(1 + i) % 3] != t[(2 + i) % 3] for i in range(3)): can = False else: if any(aa != 0 for aa in a): can = False print("Yes" if can else "No")
from collections import defaultdict n = int(input()) a = tuple(map(int, input().split())) can = True if n % 3 == 0: d = defaultdict(int) for aa in a: d[aa] += 1 m = n // 3 t = [] for number, cnt in d.items(): if cnt % m != 0: can = False break else: for _ in range(cnt // m): t.append(number) else: if any(t[(0 + i) % 3] ^ t[(1 + i) % 3] != t[(2 + i) % 3] for i in range(3)): can = False else: if any(aa != 0 for aa in a): can = False print("Yes" if can else "No")
replace
20
23
20
23
0
p02975
C++
Runtime Error
#pragma comment(linker, "/stack:200000000") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include <bits/stdc++.h> using namespace std; #define MP make_pair #define ALL(x) (x).begin(), (x).end() #define SZ(x) (int((x.size()))) #define fi first #define se second #define REP(i, a, n) for (int(i) = (a); (i) < (n); (i)++) #define PER(i, a, n) for (int(i) = (n)-1; (i) >= (a); (i)--) typedef long double ld; typedef long long ll; typedef vector<int> VI; typedef pair<int, int> PII; typedef pair<ll, ll> PLL; typedef vector<ll> VL; typedef vector<PLL> VPL; typedef vector<PII> VPI; // #ifndef ONLINE_JUDGE #define dbb(x) \ { cerr << #x << " = " << x << "\t"; } #define db(x) \ { \ dbb(x); \ cerr << endl; \ } #define db2(x, y) \ { \ dbb(x); \ dbb(y); \ cerr << endl; \ } #define db3(x, y, z) \ { \ dbb(x); \ dbb(y); \ dbb(z); \ cerr << endl; \ } // #else // #define dbb(x) ; // #define db(x) ; // #define db2(x,y) ; // #define db3(x,y,z) ; // #endif const ll MOD = 1000000007ll; ll powmod(ll a, ll b) { ll res = 1; a %= MOD; assert(b >= 0); for (; b; b >>= 1) { if (b & 1) res = res * a % MOD; a = a * a % MOD; } return res; } template <typename t1, typename t2> inline bool upmax(t1 &a, t2 b) { if (a < (t1)b) { a = (t1)b; return true; } else return false; } template <typename t1, typename t2> inline bool upmin(t1 &a, t2 b) { if (a > (t1)b) { a = (t1)b; return true; } else return false; } template <typename T> inline T gcd(T a, T b) { return b ? gcd(b, a % b) : a; } template <typename T> inline T lcm(T a, T b) { return a * (b / gcd(a, b)); } template <typename T> inline T sqr(T a) { return a * a; } int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}; int dy[] = {0, 1, 0, -1, 1, -1, 1, -1}; int dkx[] = {-1, -1, 1, 1, -2, -2, 2, 2}; int dky[] = {-2, 2, -2, 2, -1, 1, -1, 1}; const int INF = 1000000404; const ll LINF = 1e18 * (1ll); const ld PI = 3.14159265358979323846; const ld EPS = 1e-9; const int SQ = 318; int timer = 0; #define N 100100 int a[N]; void solve() { int n; cin >> n; map<int, int> cnt; REP(i, 0, n) { cin >> a[i]; cnt[a[i]]++; } sort(a, a + n); if (a[n - 1] == 0) { cout << "Yes"; return; } int A = a[0]; int B = a[n / 2]; int C = a[n - 1]; if (n % 3 == 0 && SZ(cnt) == 2) { if (A == 0 && cnt[A] == n / 3 && cnt[B] == 2 * n / 3) { cout << "Yes" << endl; return; } } if (n % 3 == 0 && SZ(cnt) == 3) { if (cnt[A] == cnt[B] && cnt[B] == cnt[C] && cnt[A] == n / 3) { if ((A ^ B) == C || (A ^ C) == B) { cout << "Yes" << endl; return; } } } cout << "No"; } int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #else // freopen("mantan.in", "r", stdin); // freopen("mantan.out", "w", stdout); #endif ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t = 1; // cin >> t; for (int i = 1; i <= t; i++) { solve(); } return 0; }
#pragma comment(linker, "/stack:200000000") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include <bits/stdc++.h> using namespace std; #define MP make_pair #define ALL(x) (x).begin(), (x).end() #define SZ(x) (int((x.size()))) #define fi first #define se second #define REP(i, a, n) for (int(i) = (a); (i) < (n); (i)++) #define PER(i, a, n) for (int(i) = (n)-1; (i) >= (a); (i)--) typedef long double ld; typedef long long ll; typedef vector<int> VI; typedef pair<int, int> PII; typedef pair<ll, ll> PLL; typedef vector<ll> VL; typedef vector<PLL> VPL; typedef vector<PII> VPI; // #ifndef ONLINE_JUDGE #define dbb(x) \ { cerr << #x << " = " << x << "\t"; } #define db(x) \ { \ dbb(x); \ cerr << endl; \ } #define db2(x, y) \ { \ dbb(x); \ dbb(y); \ cerr << endl; \ } #define db3(x, y, z) \ { \ dbb(x); \ dbb(y); \ dbb(z); \ cerr << endl; \ } // #else // #define dbb(x) ; // #define db(x) ; // #define db2(x,y) ; // #define db3(x,y,z) ; // #endif const ll MOD = 1000000007ll; ll powmod(ll a, ll b) { ll res = 1; a %= MOD; assert(b >= 0); for (; b; b >>= 1) { if (b & 1) res = res * a % MOD; a = a * a % MOD; } return res; } template <typename t1, typename t2> inline bool upmax(t1 &a, t2 b) { if (a < (t1)b) { a = (t1)b; return true; } else return false; } template <typename t1, typename t2> inline bool upmin(t1 &a, t2 b) { if (a > (t1)b) { a = (t1)b; return true; } else return false; } template <typename T> inline T gcd(T a, T b) { return b ? gcd(b, a % b) : a; } template <typename T> inline T lcm(T a, T b) { return a * (b / gcd(a, b)); } template <typename T> inline T sqr(T a) { return a * a; } int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}; int dy[] = {0, 1, 0, -1, 1, -1, 1, -1}; int dkx[] = {-1, -1, 1, 1, -2, -2, 2, 2}; int dky[] = {-2, 2, -2, 2, -1, 1, -1, 1}; const int INF = 1000000404; const ll LINF = 1e18 * (1ll); const ld PI = 3.14159265358979323846; const ld EPS = 1e-9; const int SQ = 318; int timer = 0; #define N 100100 int a[N]; void solve() { int n; cin >> n; map<int, int> cnt; REP(i, 0, n) { cin >> a[i]; cnt[a[i]]++; } sort(a, a + n); if (a[n - 1] == 0) { cout << "Yes"; return; } int A = a[0]; int B = a[n / 2]; int C = a[n - 1]; if (n % 3 == 0 && SZ(cnt) == 2) { if (A == 0 && cnt[A] == n / 3 && cnt[B] == 2 * n / 3) { cout << "Yes" << endl; return; } } if (n % 3 == 0 && SZ(cnt) == 3) { if (cnt[A] == cnt[B] && cnt[B] == cnt[C] && cnt[A] == n / 3) { if ((A ^ B) == C || (A ^ C) == B) { cout << "Yes" << endl; return; } } } cout << "No"; } int main() { #ifndef ONLINE_JUDGE #else // freopen("mantan.in", "r", stdin); // freopen("mantan.out", "w", stdout); #endif ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t = 1; // cin >> t; for (int i = 1; i <= t; i++) { solve(); } return 0; }
replace
146
148
146
147
-11
p02975
C++
Time Limit Exceeded
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <unordered_map> #define LL long long using namespace std; #define MAXN 200005 #define pp 1000000007 // set<int> s; unordered_map<int, int> m; int nums[MAXN]; int main() { int n; bool flag = true; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &nums[i]); if (m.find(nums[i]) == m.end()) m.insert({nums[i], 1}); else { m[nums[i]]++; } // s.insert(nums[i]); if (nums[i] != 0) flag = false; } if (flag) { printf("Yes"); return 0; } int ans = 0; if (n > 3) { if (n % 3 == 0) { if (m.size() > 3) { printf("No"); return 0; } else { for (auto i : m) { while (i.second != 0) { ans ^= i.first; i.second -= n / 3; } } } if (ans == 0) { printf("Yes"); return 0; } else { printf("No"); return 0; } } else { printf("No"); return 0; } } else { if ((nums[0] ^ nums[1]) == nums[2]) { printf("Yes"); return 0; } else { printf("No"); return 0; } } return 0; }
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> #include <unordered_map> #define LL long long using namespace std; #define MAXN 200005 #define pp 1000000007 // set<int> s; unordered_map<int, int> m; int nums[MAXN]; int main() { int n; bool flag = true; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &nums[i]); if (m.find(nums[i]) == m.end()) m.insert({nums[i], 1}); else { m[nums[i]]++; } // s.insert(nums[i]); if (nums[i] != 0) flag = false; } if (flag) { printf("Yes"); return 0; } int ans = 0; if (n > 3) { if (n % 3 == 0) { if (m.size() > 3) { printf("No"); return 0; } else { for (auto i : m) { while (i.second != 0) { ans ^= i.first; i.second -= n / 3; if (i.second < 0) { printf("No"); return 0; } } } } if (ans == 0) { printf("Yes"); return 0; } else { printf("No"); return 0; } } else { printf("No"); return 0; } } else { if ((nums[0] ^ nums[1]) == nums[2]) { printf("Yes"); return 0; } else { printf("No"); return 0; } } return 0; }
insert
44
44
44
48
TLE
p02975
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int n; int a[300001]; int b[100001]; int main() { scanf("%d", &n); for (int i = 1; i <= n; i++) scanf("%d", &a[i]); int k = 1; sort(a + 1, a + 1 + n); a[n + 1] = -2; for (int i = 1; a[i + 1] != -2 && i < 300001; i++) if (a[i] == a[i + 1]) { a[n + k] = a[i]; a[i] = -1; a[n + k + 1] = -2; k++; } for (int i = 1, j = 1; i <= n; i++) { while (a[j] == -1) j++; b[i] = a[j]; j++; } int flag = 0; for (int i = 1; i + 2 <= n; i++) if ((b[i] ^ b[i + 1]) != b[i + 2]) { flag = 1; break; } if ((b[n - 1] ^ b[n]) != b[1]) { flag = 1; } if (flag) printf("No\n"); else printf("Yes\n"); return 0; }
#include <bits/stdc++.h> using namespace std; int n; int a[300001]; int b[100001]; int main() { scanf("%d", &n); for (int i = 1; i <= n; i++) scanf("%d", &a[i]); int s = 0; for (int i = 1; i <= n; i++) s = s ^ a[i]; if (s) printf("No\n"); else printf("Yes\n"); return 0; }
replace
12
38
12
16
0
p02975
C++
Runtime Error
#include <bits/stdc++.h> #include <queue> #include <stack> using namespace std; typedef pair<long long int, long long int> pa; #define resize(A) A.resize(unique(A.begin(), A.end()) - A.begin()) #define pb push_back #define MAX 200005 long long int MOD = 1e9 + 7; long long int INF = 1e18; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); long long int i, j, k = 0, l = 0, r = 0, m = 0, n, p = 0, cnt = 0, cnt1 = 0, x, y, z = 0, a, b, low, mid, high, ans = 0, maxi = 0, mini = INF, t; cin >> n; long long int A[n]; map<long long int, long long int> ma; map<long long int, long long int>::iterator it; for (i = 0; i < n; i++) { cin >> A[i]; ma[A[i]]++; if (A[i] == 0) cnt++; } if (cnt == n) cout << "Yes\n"; else if (n % 3 == 0) { if (ma.size() == 2) { r = n / 3; vector<pa> V; for (it = ma.begin(); it != ma.end(); it++) { V.push_back({it->second, it->first}); } sort(V.begin(), V.end()); if (V[1].first == 2 * r && V[i].second == 0) { cout << "Yes\n"; } else cout << "No\n"; } else if (ma.size() == 3) { r = n / 3; vector<pa> V; for (it = ma.begin(); it != ma.end(); it++) { V.push_back({it->second, it->first}); } sort(V.begin(), V.end()); k = 0; k = k ^ V[0].second ^ V[1].second ^ V[2].second; if (V[0].first == r && V[1].first == r && V[2].first == r && k == 0) { cout << "Yes\n"; } else cout << "No\n"; } else cout << "No\n"; } else cout << "No\n"; }
#include <bits/stdc++.h> #include <queue> #include <stack> using namespace std; typedef pair<long long int, long long int> pa; #define resize(A) A.resize(unique(A.begin(), A.end()) - A.begin()) #define pb push_back #define MAX 200005 long long int MOD = 1e9 + 7; long long int INF = 1e18; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); long long int i, j, k = 0, l = 0, r = 0, m = 0, n, p = 0, cnt = 0, cnt1 = 0, x, y, z = 0, a, b, low, mid, high, ans = 0, maxi = 0, mini = INF, t; cin >> n; long long int A[n]; map<long long int, long long int> ma; map<long long int, long long int>::iterator it; for (i = 0; i < n; i++) { cin >> A[i]; ma[A[i]]++; if (A[i] == 0) cnt++; } if (cnt == n) cout << "Yes\n"; else if (n % 3 == 0) { if (ma.size() == 2) { r = n / 3; vector<pa> V; for (it = ma.begin(); it != ma.end(); it++) { V.push_back({it->second, it->first}); } sort(V.begin(), V.end()); if (V[1].first == 2 * r && V[0].second == 0) { cout << "Yes\n"; } else cout << "No\n"; } else if (ma.size() == 3) { r = n / 3; vector<pa> V; for (it = ma.begin(); it != ma.end(); it++) { V.push_back({it->second, it->first}); } sort(V.begin(), V.end()); k = 0; k = k ^ V[0].second ^ V[1].second ^ V[2].second; if (V[0].first == r && V[1].first == r && V[2].first == r && k == 0) { cout << "Yes\n"; } else cout << "No\n"; } else cout << "No\n"; } else cout << "No\n"; }
replace
41
42
41
42
0
p02975
C++
Runtime Error
/*Lucky_Glass*/ #include <algorithm> #include <cstdio> #include <cstring> #include <map> using namespace std; const int N = 8e4; int cas, n; long long A[N + 3]; map<long long, int> cnt; bool Solve2() { int stk[5] = {}, nstk = 0; for (map<long long, int>::iterator it = cnt.begin(); it != cnt.end(); it++) { if (it->second != n / 3 * 2 && it->second != n / 3) return false; if (it->second == n / 3 * 2) stk[++nstk] = it->first, stk[++nstk] = it->first; else stk[++nstk] = it->first; } sort(stk + 1, stk + 4); do { if ((stk[3] ^ stk[1]) == stk[2] && (stk[1] ^ stk[2]) == stk[3] && (stk[2] ^ stk[3]) == stk[1]) return true; } while (next_permutation(stk + 1, stk + 4)); return false; } bool Solve3() { int stk[5] = {}, nstk = 0; for (map<long long, int>::iterator it = cnt.begin(); it != cnt.end(); it++) { if (it->second != n / 3) return false; stk[++nstk] = it->first; } sort(stk + 1, stk + 4); do { if ((stk[3] ^ stk[1]) == stk[2] && (stk[1] ^ stk[2]) == stk[3] && (stk[2] ^ stk[3]) == stk[1]) return true; } while (next_permutation(stk + 1, stk + 4)); return false; } int main() { // freopen("circle.in","r",stdin); // freopen("circle.out","w",stdout); // scanf("%d",&cas); cas = 1; while (cas--) { cnt.clear(); scanf("%d", &n); // bool fail=false; for (int i = 1; i <= n; i++) { scanf("%lld", &A[i]); cnt[A[i]]++; } if (cnt.size() > 3) { printf("No\n"); continue; } switch (cnt.size()) { case 1: if (cnt.begin()->first == 0) printf("Yes\n"); else printf("No\n"); break; case 2: printf("%s\n", Solve2() ? "Yes" : "No"); break; case 3: printf("%s\n", Solve3() ? "Yes" : "No"); break; } } return 0; } /* 15: 001111 24: 011000 44: 101100 15 * 10 24 * 10 15 24 15 24 44 44 24 24 15 44 44 15 15 44 15 15 15 24 44 24 44 44 44 24 24 24 15 24 15 44 */
/*Lucky_Glass*/ #include <algorithm> #include <cstdio> #include <cstring> #include <map> using namespace std; const int N = 1e5; int cas, n; long long A[N + 3]; map<long long, int> cnt; bool Solve2() { int stk[5] = {}, nstk = 0; for (map<long long, int>::iterator it = cnt.begin(); it != cnt.end(); it++) { if (it->second != n / 3 * 2 && it->second != n / 3) return false; if (it->second == n / 3 * 2) stk[++nstk] = it->first, stk[++nstk] = it->first; else stk[++nstk] = it->first; } sort(stk + 1, stk + 4); do { if ((stk[3] ^ stk[1]) == stk[2] && (stk[1] ^ stk[2]) == stk[3] && (stk[2] ^ stk[3]) == stk[1]) return true; } while (next_permutation(stk + 1, stk + 4)); return false; } bool Solve3() { int stk[5] = {}, nstk = 0; for (map<long long, int>::iterator it = cnt.begin(); it != cnt.end(); it++) { if (it->second != n / 3) return false; stk[++nstk] = it->first; } sort(stk + 1, stk + 4); do { if ((stk[3] ^ stk[1]) == stk[2] && (stk[1] ^ stk[2]) == stk[3] && (stk[2] ^ stk[3]) == stk[1]) return true; } while (next_permutation(stk + 1, stk + 4)); return false; } int main() { // freopen("circle.in","r",stdin); // freopen("circle.out","w",stdout); // scanf("%d",&cas); cas = 1; while (cas--) { cnt.clear(); scanf("%d", &n); // bool fail=false; for (int i = 1; i <= n; i++) { scanf("%lld", &A[i]); cnt[A[i]]++; } if (cnt.size() > 3) { printf("No\n"); continue; } switch (cnt.size()) { case 1: if (cnt.begin()->first == 0) printf("Yes\n"); else printf("No\n"); break; case 2: printf("%s\n", Solve2() ? "Yes" : "No"); break; case 3: printf("%s\n", Solve3() ? "Yes" : "No"); break; } } return 0; } /* 15: 001111 24: 011000 44: 101100 15 * 10 24 * 10 15 24 15 24 44 44 24 24 15 44 44 15 15 44 15 15 15 24 44 24 44 44 44 24 24 24 15 24 15 44 */
replace
7
8
7
8
0
p02975
C++
Runtime Error
#include <bits/stdc++.h> #define MAXN 10000 using namespace std; typedef long long ll; int main() { // freopen("t.txt","r",stdin); int n; cin >> n; int a[10002]; for (int i = 1; i <= n; i++) cin >> a[i]; int t = a[1], kq; for (int i = 2; i <= n; i++) { t = t ^ a[i]; } if (t == 0) { cout << "Yes"; return 0; } cout << "No"; return 0; }
#include <bits/stdc++.h> #define MAXN 10000 using namespace std; typedef long long ll; int main() { // freopen("t.txt","r",stdin); int n; cin >> n; int a[100002]; for (int i = 1; i <= n; i++) cin >> a[i]; int t = a[1], kq; for (int i = 2; i <= n; i++) { t = t ^ a[i]; } if (t == 0) { cout << "Yes"; return 0; } cout << "No"; return 0; }
replace
11
12
11
12
0
p02975
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using llong = long long; using ldbl = long double; using lpair = pair<llong, llong>; #define ALL(x) x.begin(), x.end() const llong inf = 1100100100100100ll; const llong mod = 1e9 + 7; int main() { llong N; vector<llong> a; map<llong, llong> m; cin >> N; a.resize(N); for (int i = 0; i < N; ++i) { cin >> a[i]; m[a[i]]++; } if (m.size() == 1 && m[0] > 0) { cout << "Yes" << endl; } else if (N % 3 != 0) { cout << "No" << endl; } else { if (m.size() != 3) { return 1; cout << "No" << endl; } else { map<llong, llong> mm; vector<llong> v; for (auto it = m.begin(); it != m.end(); ++it) { v.push_back(it->first); mm[it->second]++; } if (mm.size() != 1) { cout << "No" << endl; } else { if ((v[0] ^ v[2]) == v[1] && (v[1] ^ v[0]) == v[2] && (v[2] ^ v[1]) == v[0]) { cout << "Yes" << endl; } else { cout << "No" << endl; } } } } return 0; }
#include <bits/stdc++.h> using namespace std; using llong = long long; using ldbl = long double; using lpair = pair<llong, llong>; #define ALL(x) x.begin(), x.end() const llong inf = 1100100100100100ll; const llong mod = 1e9 + 7; int main() { llong N; vector<llong> a; map<llong, llong> m; cin >> N; a.resize(N); for (int i = 0; i < N; ++i) { cin >> a[i]; m[a[i]]++; } if (m.size() == 1 && m[0] > 0) { cout << "Yes" << endl; } else if (N % 3 != 0) { cout << "No" << endl; } else { if (m.size() != 3) { if (m[0] == N / 3) { cout << "Yes" << endl; } else { cout << "No" << endl; } } else { map<llong, llong> mm; vector<llong> v; for (auto it = m.begin(); it != m.end(); ++it) { v.push_back(it->first); mm[it->second]++; } if (mm.size() != 1) { cout << "No" << endl; } else { if ((v[0] ^ v[2]) == v[1] && (v[1] ^ v[0]) == v[2] && (v[2] ^ v[1]) == v[0]) { cout << "Yes" << endl; } else { cout << "No" << endl; } } } } return 0; }
replace
30
32
30
35
0
p02975
C++
Runtime Error
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <vector> using namespace std; #define LL long long LL read() { LL f = 1, x = 0; char c = getchar(); while (c < '0' || '9' < c) { if (c == '-') f = -1; c = getchar(); } while ('0' <= c && c <= '9') x = (x << 3) + (x << 1) + c - '0', c = getchar(); return f * x; } #define MAXN 80000 #define INF 0x3f3f3f3f int cnt[10]; LL a[MAXN + 5], b[MAXN + 5]; int main() { // freopen("circle.in","r",stdin); // freopen("circle.out","w",stdout); int T = 1; while (T--) { int n = read(); memset(cnt, 0, sizeof(cnt)); bool f = 1; for (int i = 1; i <= n; i++) { b[i] = a[i] = read(); if (a[i]) f = 0; } if (f) { puts("Yes"); continue; } sort(b + 1, b + n + 1); int m = unique(b + 1, b + n + 1) - (b + 1); if (m >= 4) { puts("No"); continue; } for (int t = 1; t <= m; t++) for (int i = 1; i <= n; i++) if (b[t] == a[i]) cnt[t]++; sort(cnt + 1, cnt + m + 1); if (m == 1) puts("No"); if (m == 2) { if (n % 3 == 0) { if (cnt[1] == n / 3 && cnt[2] == n / 3 * 2 && b[1] == 0) puts("Yes"); else puts("No"); } else puts("No"); } if (m == 3) { if (n % 3 == 0) { if (cnt[1] == n / 3 && cnt[2] == n / 3 && cnt[3] == n / 3 && (b[1] == (b[2] ^ b[3]))) puts("Yes"); else puts("No"); } else puts("No"); } } return 0; }
#include <algorithm> #include <climits> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <vector> using namespace std; #define LL long long LL read() { LL f = 1, x = 0; char c = getchar(); while (c < '0' || '9' < c) { if (c == '-') f = -1; c = getchar(); } while ('0' <= c && c <= '9') x = (x << 3) + (x << 1) + c - '0', c = getchar(); return f * x; } #define MAXN 100000 #define INF 0x3f3f3f3f int cnt[10]; LL a[MAXN + 5], b[MAXN + 5]; int main() { // freopen("circle.in","r",stdin); // freopen("circle.out","w",stdout); int T = 1; while (T--) { int n = read(); memset(cnt, 0, sizeof(cnt)); bool f = 1; for (int i = 1; i <= n; i++) { b[i] = a[i] = read(); if (a[i]) f = 0; } if (f) { puts("Yes"); continue; } sort(b + 1, b + n + 1); int m = unique(b + 1, b + n + 1) - (b + 1); if (m >= 4) { puts("No"); continue; } for (int t = 1; t <= m; t++) for (int i = 1; i <= n; i++) if (b[t] == a[i]) cnt[t]++; sort(cnt + 1, cnt + m + 1); if (m == 1) puts("No"); if (m == 2) { if (n % 3 == 0) { if (cnt[1] == n / 3 && cnt[2] == n / 3 * 2 && b[1] == 0) puts("Yes"); else puts("No"); } else puts("No"); } if (m == 3) { if (n % 3 == 0) { if (cnt[1] == n / 3 && cnt[2] == n / 3 && cnt[3] == n / 3 && (b[1] == (b[2] ^ b[3]))) puts("Yes"); else puts("No"); } else puts("No"); } } return 0; }
replace
25
26
25
26
0
p02975
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL_DEBUG #include "LOCAL_DEBUG.hpp" #endif #define int long long void fail() { cout << "No" << endl; exit(0); } signed main() { int n; cin >> n; vector<int> a(n); map<int, int> mp; for (int i = 0; i < n; i++) { cin >> a[i]; mp[a[i]]++; } if (mp[0] == n) { cout << "Yes" << endl; return 0; } if (n % 3 != 0) fail(); if (mp.size() == 2) { if (mp[0] != n / 3) fail(); } else { vector<int> vec; for (auto p : mp) { if (p.first != 0 && p.second == n / 3) vec.push_back(p.first); } if (vec[0] ^ vec[1] ^ vec[2] != 0) fail(); } cout << "Yes" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL_DEBUG #include "LOCAL_DEBUG.hpp" #endif #define int long long void fail() { cout << "No" << endl; exit(0); } signed main() { int n; cin >> n; vector<int> a(n); map<int, int> mp; for (int i = 0; i < n; i++) { cin >> a[i]; mp[a[i]]++; } if (mp[0] == n) { cout << "Yes" << endl; return 0; } if (n % 3 != 0) fail(); if (mp.size() == 2) { if (mp[0] != n / 3) fail(); } else { vector<int> vec; for (auto p : mp) { if (p.first != 0 && p.second == n / 3) vec.push_back(p.first); } if (vec.size() != 3 || (vec[0] ^ vec[1] ^ vec[2]) != 0) fail(); } cout << "Yes" << endl; return 0; }
replace
39
40
39
40
0
p02975
C++
Runtime Error
#include <bits/stdc++.h> int main() { using namespace std; size_t N; cin >> N; unordered_map<unsigned long, size_t> mp; for (unsigned long i = 0, a; i < N; ++i) { cin >> a; ++mp[a]; } if (mp.size() > 3) return 0 & puts("No"); if (mp.size() == 1) return 0 & puts(mp[0] == N ? "Yes" : "No"); if (mp.size() == 2) return 0 & puts(mp[0] * 3 == N ? "Yes" : "No"); if (mp.size() == 3) { vector<unsigned long> a; for (const auto &i : mp) { if (i.second * 3 != N) return 0 & puts("No"); a.push_back(i.first); } assert(0); puts(a[0] ^ a[1] == a[2] ? "Yes" : "No"); } return 0; }
#include <bits/stdc++.h> int main() { using namespace std; size_t N; cin >> N; unordered_map<unsigned long, size_t> mp; for (unsigned long i = 0, a; i < N; ++i) { cin >> a; ++mp[a]; } if (mp.size() > 3) return 0 & puts("No"); if (mp.size() == 1) return 0 & puts(mp[0] == N ? "Yes" : "No"); if (mp.size() == 2) return 0 & puts(mp[0] * 3 == N ? "Yes" : "No"); if (mp.size() == 3) { vector<unsigned long> a; for (const auto &i : mp) { if (i.second * 3 != N) return 0 & puts("No"); a.push_back(i.first); } puts((a[0] ^ a[1]) == a[2] ? "Yes" : "No"); } return 0; }
replace
24
26
24
25
-6
8866038d-cc79-4ae4-9136-26c7a7111b18.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02975/C++/s059737996.cpp:21: int main(): Assertion `0' failed.
p02975
C++
Runtime Error
// sjq #include <algorithm> #include <cstdio> #include <cstring> #include <stack> #include <vector> using namespace std; typedef long long LL; const int N = 80000; int n; LL a[N + 5]; int C[N + 5]; vector<LL> V; int main() { // freopen("circle.in", "r", stdin); // freopen("circle.out", "w", stdout); int T; // scanf("%d", &T); T = 1; while (T--) { V.clear(); C[0] = 0; scanf("%d", &n); for (register int i = 1; i <= n; i++) { scanf("%lld", &a[i]); C[i] = 0; } bool p = 1; for (register int i = 1; i <= n; i++) { int f = -1; for (register int j = V.size() - 1; j >= 0; j--) if (V[j] == a[i]) f = j; if (!~f) { V.push_back(a[i]); C[V.size() - 1] = 1; if (V.size() > 3) { p = 0; break; } } else C[f]++; } if (!p) { printf("No\n"); continue; } if (V.size() == 1) { if (V[0] == 0) printf("Yes\n"); else printf("No\n"); continue; } if (n % 3) { if (V.size() == 1 && V[0] == 0) printf("Yes\n"); printf("No\n"); continue; } if (V.size() > 3) { printf("No\n"); continue; } if (V.size() == 2) { if (V[0] == 0 && C[0] == n / 3) printf("Yes\n"); else if (V[1] == 0 && C[1] == n / 3) printf("Yes\n"); else printf("No\n"); continue; } if (V.size() == 3) { if (V[0] ^ V[1] ^ V[2]) printf("No\n"); else if (C[0] == C[1] && C[1] == C[2]) printf("Yes\n"); else printf("No\n"); continue; } } return 0; }
// sjq #include <algorithm> #include <cstdio> #include <cstring> #include <stack> #include <vector> using namespace std; typedef long long LL; const int N = 100000; int n; LL a[N + 5]; int C[N + 5]; vector<LL> V; int main() { // freopen("circle.in", "r", stdin); // freopen("circle.out", "w", stdout); int T; // scanf("%d", &T); T = 1; while (T--) { V.clear(); C[0] = 0; scanf("%d", &n); for (register int i = 1; i <= n; i++) { scanf("%lld", &a[i]); C[i] = 0; } bool p = 1; for (register int i = 1; i <= n; i++) { int f = -1; for (register int j = V.size() - 1; j >= 0; j--) if (V[j] == a[i]) f = j; if (!~f) { V.push_back(a[i]); C[V.size() - 1] = 1; if (V.size() > 3) { p = 0; break; } } else C[f]++; } if (!p) { printf("No\n"); continue; } if (V.size() == 1) { if (V[0] == 0) printf("Yes\n"); else printf("No\n"); continue; } if (n % 3) { if (V.size() == 1 && V[0] == 0) printf("Yes\n"); printf("No\n"); continue; } if (V.size() > 3) { printf("No\n"); continue; } if (V.size() == 2) { if (V[0] == 0 && C[0] == n / 3) printf("Yes\n"); else if (V[1] == 0 && C[1] == n / 3) printf("Yes\n"); else printf("No\n"); continue; } if (V.size() == 3) { if (V[0] ^ V[1] ^ V[2]) printf("No\n"); else if (C[0] == C[1] && C[1] == C[2]) printf("Yes\n"); else printf("No\n"); continue; } } return 0; }
replace
10
11
10
11
0
p02975
C++
Runtime Error
#include <algorithm> #include <cassert> #include <chrono> #include <cmath> #include <cstdio> #include <ctime> #include <functional> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <sstream> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; namespace { using Integer = long long; //__int128; template <class T, class S> istream &operator>>(istream &is, pair<T, S> &p) { return is >> p.first >> p.second; } template <class T> istream &operator>>(istream &is, vector<T> &vec) { for (T &val : vec) is >> val; return is; } template <class T> istream &operator,(istream &is, T &val) { return is >> val; } template <class T, class S> ostream &operator<<(ostream &os, const pair<T, S> &p) { return os << p.first << " " << p.second; } template <class T> ostream &operator<<(ostream &os, const vector<T> &vec) { for (size_t i = 0; i < vec.size(); i++) os << vec[i] << (i == vec.size() - 1 ? "" : " "); return os; } template <class T> ostream &operator,(ostream &os, const T &val) { return os << " " << val; } template <class H> void print(const H &head) { cout << head; } template <class H, class... T> void print(const H &head, const T &...tail) { cout << head << " "; print(tail...); } template <class... T> void println(const T &...values) { print(values...); cout << endl; } template <class H> void eprint(const H &head) { cerr << head; } template <class H, class... T> void eprint(const H &head, const T &...tail) { cerr << head << " "; eprint(tail...); } template <class... T> void eprintln(const T &...values) { eprint(values...); cerr << endl; } class range { Integer start_, end_, step_; public: struct range_iterator { Integer val, step_; range_iterator(Integer v, Integer step) : val(v), step_(step) {} Integer operator*() { return val; } void operator++() { val += step_; } bool operator!=(range_iterator &x) { return step_ > 0 ? val < x.val : val > x.val; } }; range(Integer len) : start_(0), end_(len), step_(1) {} range(Integer start, Integer end) : start_(start), end_(end), step_(1) {} range(Integer start, Integer end, Integer step) : start_(start), end_(end), step_(step) {} range_iterator begin() { return range_iterator(start_, step_); } range_iterator end() { return range_iterator(end_, step_); } }; inline string operator"" _s(const char *str, size_t size) { return move(string(str)); } constexpr Integer my_pow(Integer x, Integer k, Integer z = 1) { return k == 0 ? z : k == 1 ? z * x : (k & 1) ? my_pow(x * x, k >> 1, z * x) : my_pow(x * x, k >> 1, z); } constexpr Integer my_pow_mod(Integer x, Integer k, Integer M, Integer z = 1) { return k == 0 ? z % M : k == 1 ? z * x % M : (k & 1) ? my_pow_mod(x * x % M, k >> 1, M, z * x % M) : my_pow_mod(x * x % M, k >> 1, M, z); } constexpr unsigned long long operator"" _ten(unsigned long long value) { return my_pow(10, value); } inline int k_bit(Integer x, int k) { return (x >> k) & 1; } // 0-indexed mt19937 mt(chrono::duration_cast<chrono::nanoseconds>( chrono::steady_clock::now().time_since_epoch()) .count()); template <class T> string join(const vector<T> &v, const string &sep) { stringstream ss; for (size_t i = 0; i < v.size(); i++) { if (i > 0) ss << sep; ss << v[i]; } return ss.str(); } inline string operator*(string s, int k) { string ret; while (k) { if (k & 1) ret += s; s += s; k >>= 1; } return ret; } } // namespace constexpr long long mod = 9_ten + 7; int main() { long long n; cin >> n; vector<long long> a(n); cin >> a; if (count(a.begin(), a.end(), 0) == n) { println("Yes"); return 0; } if (n % 3 != 0) { println("No"); return 0; } long long t = n / 3; map<long long, long long> cnt; for (long long i = 0; i < n; i++) { cnt[a[i]]++; } for (long long i = 1; i < n; i++) { long long x = a[0]; long long y = a[i]; long long z = x ^ y; long long w = y ^ z; if (x != w) continue; if (cnt[x] >= t && cnt[y] >= t && cnt[z] >= t) { println("Yes"); return 0; } } assert(false); println("No"); return 0; }
#include <algorithm> #include <cassert> #include <chrono> #include <cmath> #include <cstdio> #include <ctime> #include <functional> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <sstream> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; namespace { using Integer = long long; //__int128; template <class T, class S> istream &operator>>(istream &is, pair<T, S> &p) { return is >> p.first >> p.second; } template <class T> istream &operator>>(istream &is, vector<T> &vec) { for (T &val : vec) is >> val; return is; } template <class T> istream &operator,(istream &is, T &val) { return is >> val; } template <class T, class S> ostream &operator<<(ostream &os, const pair<T, S> &p) { return os << p.first << " " << p.second; } template <class T> ostream &operator<<(ostream &os, const vector<T> &vec) { for (size_t i = 0; i < vec.size(); i++) os << vec[i] << (i == vec.size() - 1 ? "" : " "); return os; } template <class T> ostream &operator,(ostream &os, const T &val) { return os << " " << val; } template <class H> void print(const H &head) { cout << head; } template <class H, class... T> void print(const H &head, const T &...tail) { cout << head << " "; print(tail...); } template <class... T> void println(const T &...values) { print(values...); cout << endl; } template <class H> void eprint(const H &head) { cerr << head; } template <class H, class... T> void eprint(const H &head, const T &...tail) { cerr << head << " "; eprint(tail...); } template <class... T> void eprintln(const T &...values) { eprint(values...); cerr << endl; } class range { Integer start_, end_, step_; public: struct range_iterator { Integer val, step_; range_iterator(Integer v, Integer step) : val(v), step_(step) {} Integer operator*() { return val; } void operator++() { val += step_; } bool operator!=(range_iterator &x) { return step_ > 0 ? val < x.val : val > x.val; } }; range(Integer len) : start_(0), end_(len), step_(1) {} range(Integer start, Integer end) : start_(start), end_(end), step_(1) {} range(Integer start, Integer end, Integer step) : start_(start), end_(end), step_(step) {} range_iterator begin() { return range_iterator(start_, step_); } range_iterator end() { return range_iterator(end_, step_); } }; inline string operator"" _s(const char *str, size_t size) { return move(string(str)); } constexpr Integer my_pow(Integer x, Integer k, Integer z = 1) { return k == 0 ? z : k == 1 ? z * x : (k & 1) ? my_pow(x * x, k >> 1, z * x) : my_pow(x * x, k >> 1, z); } constexpr Integer my_pow_mod(Integer x, Integer k, Integer M, Integer z = 1) { return k == 0 ? z % M : k == 1 ? z * x % M : (k & 1) ? my_pow_mod(x * x % M, k >> 1, M, z * x % M) : my_pow_mod(x * x % M, k >> 1, M, z); } constexpr unsigned long long operator"" _ten(unsigned long long value) { return my_pow(10, value); } inline int k_bit(Integer x, int k) { return (x >> k) & 1; } // 0-indexed mt19937 mt(chrono::duration_cast<chrono::nanoseconds>( chrono::steady_clock::now().time_since_epoch()) .count()); template <class T> string join(const vector<T> &v, const string &sep) { stringstream ss; for (size_t i = 0; i < v.size(); i++) { if (i > 0) ss << sep; ss << v[i]; } return ss.str(); } inline string operator*(string s, int k) { string ret; while (k) { if (k & 1) ret += s; s += s; k >>= 1; } return ret; } } // namespace constexpr long long mod = 9_ten + 7; int main() { long long n; cin >> n; vector<long long> a(n); cin >> a; if (count(a.begin(), a.end(), 0) == n) { println("Yes"); return 0; } if (n % 3 != 0) { println("No"); return 0; } long long t = n / 3; map<long long, long long> cnt; for (long long i = 0; i < n; i++) { cnt[a[i]]++; } for (long long i = 1; i < n; i++) { long long x = a[0]; long long y = a[i]; long long z = x ^ y; long long w = y ^ z; if (x != w) continue; if (cnt[x] >= t && cnt[y] >= t && cnt[z] >= t) { println("Yes"); return 0; } } println("No"); return 0; }
delete
168
169
168
168
0
p02975
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/detail/standard_policies.hpp> using namespace __gnu_pbds; using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define endl "\n" const int MAX = 100005; const long long mod = 1.0e9 + 7; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #ifndef ONLINE_JUDGE freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout); #endif ll n, i; cin >> n; ll arr[n], x = 0; for (i = 0; i < n; i++) { cin >> arr[i]; x = x ^ arr[i]; } if (x == 0) { cout << "Yes" << endl; } else cout << "No" << endl; return 0; }
#include <bits/stdc++.h> #include <ext/pb_ds/detail/standard_policies.hpp> using namespace __gnu_pbds; using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; #define endl "\n" const int MAX = 100005; const long long mod = 1.0e9 + 7; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ll n, i; cin >> n; ll arr[n], x = 0; for (i = 0; i < n; i++) { cin >> arr[i]; x = x ^ arr[i]; } if (x == 0) { cout << "Yes" << endl; } else cout << "No" << endl; return 0; }
delete
14
18
14
14
-11
p02975
C++
Time Limit Exceeded
typedef long long ll; #include <bits/stdc++.h> using namespace std; template <typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val) { std::fill((T *)array, (T *)(array + N), val); } ll askx(ll a, ll b) { ll ans = 0; for (int i = 0; i < 30; i++) { if (b & (1 << i)) { if (a & (1 << i)) { } else { ans |= (1 << i); } } else { if (a & (1 << i)) { ans |= (1 << i); } else { } } } return ans; } ll n; bool saiki(ll now, ll a, ll b, map<ll, ll> c) { if (now == n) { return true; } bool ok = false; ll x = askx(a, b); if (c[x] > 0) { c[x]--; if (saiki(now + 1, b, x, c)) { ok = true; } else { c[x]++; } } return ok; } int main() { ll a[100010]; std::cin >> n; std::map<ll, ll> cou; for (int i = 0; i < n; i++) { std::cin >> a[i]; cou[a[i]]++; } for (int i = 1; i < n; i++) { if (cou[askx(a[0], a[i])] > 0 && cou[askx(a[i], a[0])] > 0) { cou[a[0]]--; cou[a[i]]--; if (saiki(2, a[0], a[i], cou)) { std::cout << "Yes" << std::endl; return 0; } cou[a[0]]++; cou[a[i]]++; } } std::cout << "No" << std::endl; }
typedef long long ll; #include <bits/stdc++.h> using namespace std; template <typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val) { std::fill((T *)array, (T *)(array + N), val); } ll askx(ll a, ll b) { ll ans = 0; for (int i = 0; i < 30; i++) { if (b & (1 << i)) { if (a & (1 << i)) { } else { ans |= (1 << i); } } else { if (a & (1 << i)) { ans |= (1 << i); } else { } } } return ans; } ll n; bool saiki(ll now, ll a, ll b, map<ll, ll> c) { if (now == n) { return true; } bool ok = false; ll x = askx(a, b); if (c[x] > 0) { c[x]--; if (saiki(now + 1, b, x, c)) { ok = true; } else { c[x]++; } } return ok; } int main() { ll a[100010]; std::cin >> n; std::map<ll, ll> cou; for (int i = 0; i < n; i++) { std::cin >> a[i]; cou[a[i]]++; } for (int i = 0; i < 30; i++) { ll c1, c0; c1 = 0; c0 = 0; for (int j = 0; j < n; j++) { if (a[j] & (1 << i)) { c1++; } else { c0++; } } if (c1 == 2 * c0 || c0 == n) { continue; } else { std::cout << "No" << std::endl; return 0; } } for (int i = 1; i < n; i++) { if (cou[askx(a[0], a[i])] > 0 && cou[askx(a[i], a[0])] > 0) { cou[a[0]]--; cou[a[i]]--; if (saiki(2, a[0], a[i], cou)) { std::cout << "Yes" << std::endl; return 0; } cou[a[0]]++; cou[a[i]]++; } } std::cout << "No" << std::endl; }
insert
55
55
55
74
TLE
p02975
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> A(n); map<int, int> cnt; for (int i = 0; i < n; i++) { cin >> A[i]; cnt[A[i]] += 1; } if (cnt[0] == n) { cout << "Yes" << endl; return 0; } if (n % 3 != 0) { cout << "No" << endl; return 0; } vector<int> all; for (auto &p : cnt) { for (int i = 0; i < p.second / (n / 3); i++) { all.push_back(p.first); } } if (all.size() == 3 & (all[0] ^ all[1] ^ all[2]) == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> A(n); map<int, int> cnt; for (int i = 0; i < n; i++) { cin >> A[i]; cnt[A[i]] += 1; } if (cnt[0] == n) { cout << "Yes" << endl; return 0; } if (n % 3 != 0) { cout << "No" << endl; return 0; } vector<int> all; for (auto &p : cnt) { for (int i = 0; i < p.second / (n / 3); i++) { all.push_back(p.first); } } if (all.size() == 3 && (all[0] ^ all[1] ^ all[2]) == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
replace
27
28
27
28
0
p02975
C++
Runtime Error
#include <cstdio> #include <iostream> #include <string> #include <utility> #include <vector> using namespace std; int No() { cout << "No"; return 0; } int Yes() { cout << "Yes"; return 0; } int main() { int a[3][2] = {}, n; cin >> n; for (int i = 0; i < n; i++) { int tmp; cin >> tmp; for (int j = 0; j <= 3; j++) { if (j == 3) { return No(); } if (a[j][1] == 0) { a[j][0] = tmp; a[j][1]++; break; } else if (a[j][0] == tmp) { a[j][1]++; break; } } } if (a[2][1] != 0) { // if (a[0][1] != a[1][1]) return No(); if (a[1][1] != a[2][1]) return No(); a[0][0] = 1 / 0; if (a[0][0] ^ a[1][0] != a[2][0]) return No(); return Yes(); } else if (a[1][1] != 0) { if (a[0][0] == 0) { if (a[0][1] * 2 != a[1][1]) return No(); return Yes(); } if (a[1][0] == 0) { if (a[1][1] * 2 != a[0][1]) return No(); return Yes(); } return No(); } else if (a[0][1] != 0) { // if (a[0][0] != 0) return No(); return Yes(); } }
#include <cstdio> #include <iostream> #include <string> #include <utility> #include <vector> using namespace std; int No() { cout << "No"; return 0; } int Yes() { cout << "Yes"; return 0; } int main() { int a[3][2] = {}, n; cin >> n; for (int i = 0; i < n; i++) { int tmp; cin >> tmp; for (int j = 0; j <= 3; j++) { if (j == 3) { return No(); } if (a[j][1] == 0) { a[j][0] = tmp; a[j][1]++; break; } else if (a[j][0] == tmp) { a[j][1]++; break; } } } if (a[2][1] != 0) { // if (a[0][1] != a[1][1]) return No(); if (a[1][1] != a[2][1]) return No(); if ((a[0][0] ^ a[1][0]) != a[2][0]) return No(); return Yes(); } else if (a[1][1] != 0) { if (a[0][0] == 0) { if (a[0][1] * 2 != a[1][1]) return No(); return Yes(); } if (a[1][0] == 0) { if (a[1][1] * 2 != a[0][1]) return No(); return Yes(); } return No(); } else if (a[0][1] != 0) { // if (a[0][0] != 0) return No(); return Yes(); } }
replace
39
41
39
40
-8
p02975
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10; int t, n, a[N], b[N], num[N], tot, c; map<int, int> cnt, tmp; void solve() { if (tot > 3) { puts("No"); return; } else if (tot == 1) { if (num[0] == 0) { puts("Yes"); return; } else { puts("No"); return; } } else { bool ok = 1; do { ok = 1; tmp = cnt; b[1] = num[0]; tmp[num[0]]--; b[2] = num[1]; tmp[num[1]]--; for (int i = 3; i <= n && ok; ++i) { bool upd = 0; for (int j = 0; j < 3 && !upd; ++j) { if (tmp[num[j]] > 0 && (num[j] ^ b[i - 2]) == b[i - 1]) { b[i] = num[j]; tmp[num[j]]--; upd = 1; } } if (!upd) ok = 0; } if (ok && (b[n] ^ b[n - 1]) != b[1]) ok = 0; if (ok) break; } while (num, num + tot); if (ok) puts("Yes"); else puts("No"); } } int main() { scanf("%d", &n); for (int i = 1; i <= n; ++i) { scanf("%d", &a[i]); if (!cnt.count(a[i])) num[tot++] = a[i]; cnt[a[i]]++; } solve(); return 0; }
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10; int t, n, a[N], b[N], num[N], tot, c; map<int, int> cnt, tmp; void solve() { if (tot > 3) { puts("No"); return; } else if (tot == 1) { if (num[0] == 0) { puts("Yes"); return; } else { puts("No"); return; } } else { bool ok = 1; do { ok = 1; tmp = cnt; b[1] = num[0]; tmp[num[0]]--; b[2] = num[1]; tmp[num[1]]--; for (int i = 3; i <= n && ok; ++i) { bool upd = 0; for (int j = 0; j < 3 && !upd; ++j) { if (tmp[num[j]] > 0 && (num[j] ^ b[i - 2]) == b[i - 1]) { b[i] = num[j]; tmp[num[j]]--; upd = 1; } } if (!upd) ok = 0; } if (ok && (b[n] ^ b[n - 1]) != b[1]) ok = 0; if (ok) break; } while (next_permutation(num, num + tot)); if (ok) puts("Yes"); else puts("No"); } } int main() { scanf("%d", &n); for (int i = 1; i <= n; ++i) { scanf("%d", &a[i]); if (!cnt.count(a[i])) num[tot++] = a[i]; cnt[a[i]]++; } solve(); return 0; }
replace
42
43
42
43
TLE
p02975
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; const int MAXN = 1e5 + 5; int n, a[MAXN]; map<int, int> num; vector<int> vals; int main() { scanf("%d", &n); bool doZero = false; for (int i = 0; i < n; ++i) { scanf("%d", &a[i]); num[a[i]]++; if (a[i] == 0) doZero = true; } if (n % 3 == 0) { if (num.size() > 3) { printf("No\n"); } else if (num.size() == 3) { // All should equal vector<int> vals, nums; for (auto i : num) { vals.push_back(i.first); nums.push_back(i.second); assert(i.second > 0); } assert(nums.size() == 3); if (nums[0] == nums[1] && nums[1] == nums[2] && vals[0] ^ vals[1] == vals[2]) { assert(false); printf("Yes\n"); } else { printf("No\n"); } } else if (num.size() == 2) { vector<int> vals, nums; for (auto i : num) { vals.push_back(i.first); nums.push_back(i.second); } bool valid = true; assert(nums.size() == 2); if (vals[0] == 0) { if (2 * nums[0] != nums[1]) valid = false; } else if (vals[1] == 0) { if (2 * nums[1] != nums[0]) valid = false; } else { valid = false; } if (valid) printf("Yes\n"); else printf("No\n"); } else { if (doZero) { printf("Yes\n"); } else { printf("No\n"); } } } else { if (num.size() == 1 && doZero) { printf("Yes\n"); } else { printf("No\n"); } } }
#include "bits/stdc++.h" using namespace std; const int MAXN = 1e5 + 5; int n, a[MAXN]; map<int, int> num; vector<int> vals; int main() { scanf("%d", &n); bool doZero = false; for (int i = 0; i < n; ++i) { scanf("%d", &a[i]); num[a[i]]++; if (a[i] == 0) doZero = true; } if (n % 3 == 0) { if (num.size() > 3) { printf("No\n"); } else if (num.size() == 3) { // All should equal vector<int> vals, nums; for (auto i : num) { vals.push_back(i.first); nums.push_back(i.second); assert(i.second > 0); } assert(nums.size() == 3); if (nums[0] == nums[1] && nums[1] == nums[2] && (vals[0] ^ vals[1]) == vals[2]) { printf("Yes\n"); } else { printf("No\n"); } } else if (num.size() == 2) { vector<int> vals, nums; for (auto i : num) { vals.push_back(i.first); nums.push_back(i.second); } bool valid = true; assert(nums.size() == 2); if (vals[0] == 0) { if (2 * nums[0] != nums[1]) valid = false; } else if (vals[1] == 0) { if (2 * nums[1] != nums[0]) valid = false; } else { valid = false; } if (valid) printf("Yes\n"); else printf("No\n"); } else { if (doZero) { printf("Yes\n"); } else { printf("No\n"); } } } else { if (num.size() == 1 && doZero) { printf("Yes\n"); } else { printf("No\n"); } } }
replace
31
33
31
32
-6
243a2eb5-cb0e-4235-976c-e0bcb59e4879.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02975/C++/s340144915.cpp:32: int main(): Assertion `false' failed.
p02975
C++
Runtime Error
// Ruthless Coding #include <bits/stdc++.h> #define uni(x) (x).resize(unique(ALL(x)) - (x).begin()) #define fprint(v) \ for (auto x : v) \ cout << x << ' ' #define ALL(x) (x).begin(), (x).end() #define PI 3.14159265358979323846 #define MP(x, y) make_pair(x, y) #define SZ(x) int((x).size()) #define PB(x) push_back(x) #define ld long double #define ll long long #define S second #define F first #define nl '\n' using namespace std; void __print(int x) { cerr << x; } void __print(long x) { cerr << x; } void __print(long long x) { cerr << x; } void __print(unsigned x) { cerr << x; } void __print(unsigned long x) { cerr << x; } void __print(unsigned long long x) { cerr << x; } void __print(float x) { cerr << x; } void __print(double x) { cerr << x; } void __print(long double x) { cerr << x; } void __print(char x) { cerr << '\'' << x << '\''; } void __print(const char *x) { cerr << '\"' << x << '\"'; } void __print(const string &x) { cerr << '\"' << x << '\"'; } void __print(bool x) { cerr << (x ? "true" : "false"); } template <typename T, typename V> void __print(const pair<T, V> &x) { cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}'; } template <typename T> void __print(const T &x) { int f = 0; cerr << '{'; for (auto &i : x) cerr << (f++ ? "," : ""), __print(i); cerr << "}"; } void _print() { cerr << "]\n"; } template <typename T, typename... V> void _print(T t, V... v) { __print(t); if (sizeof...(v)) cerr << ", "; _print(v...); } #ifndef ONLINE_JUDGE #define debug(x...) \ cerr << "[" << #x << "] = ["; \ _print(x) #else #define debug(x...) #endif mt19937_64 rnd; const int N = 2e5 + 5; int main() { ios_base::sync_with_stdio(0); cin.tie(0); freopen("test_11.txt", "r", stdin); int n; cin >> n; vector<int> a(n); map<int, int> mp; for (auto &x : a) { cin >> x; mp[x]++; } sort(ALL(a)); uni(a); if (SZ(a) == 1) { if (a[0] == 0) { cout << "Yes"; } else { cout << "No"; } } else if (SZ(a) == 2) { if (a[0] == 0 && n % 3 == 0 && mp[0] == n / 3) { cout << "Yes"; } else { cout << "No"; } } else if (SZ(a) == 3 && n % 3 == 0) { if ((a[0] ^ a[1] ^ a[2]) == 0) { if (mp[a[0]] == n / 3 && mp[a[1]] == n / 3 && mp[a[2]] == n / 3) { cout << "Yes"; } else { cout << "No"; } } else { cout << "No"; } } else { cout << "No"; } return 0; } /* *** Most Impo.. -> check base case always 1. Overflow Check (*, +) 2. Index check (0 - based or 1 - based) 3. Check for n = 1, 2, 3, 4.... 4. Corner Cases */
// Ruthless Coding #include <bits/stdc++.h> #define uni(x) (x).resize(unique(ALL(x)) - (x).begin()) #define fprint(v) \ for (auto x : v) \ cout << x << ' ' #define ALL(x) (x).begin(), (x).end() #define PI 3.14159265358979323846 #define MP(x, y) make_pair(x, y) #define SZ(x) int((x).size()) #define PB(x) push_back(x) #define ld long double #define ll long long #define S second #define F first #define nl '\n' using namespace std; void __print(int x) { cerr << x; } void __print(long x) { cerr << x; } void __print(long long x) { cerr << x; } void __print(unsigned x) { cerr << x; } void __print(unsigned long x) { cerr << x; } void __print(unsigned long long x) { cerr << x; } void __print(float x) { cerr << x; } void __print(double x) { cerr << x; } void __print(long double x) { cerr << x; } void __print(char x) { cerr << '\'' << x << '\''; } void __print(const char *x) { cerr << '\"' << x << '\"'; } void __print(const string &x) { cerr << '\"' << x << '\"'; } void __print(bool x) { cerr << (x ? "true" : "false"); } template <typename T, typename V> void __print(const pair<T, V> &x) { cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}'; } template <typename T> void __print(const T &x) { int f = 0; cerr << '{'; for (auto &i : x) cerr << (f++ ? "," : ""), __print(i); cerr << "}"; } void _print() { cerr << "]\n"; } template <typename T, typename... V> void _print(T t, V... v) { __print(t); if (sizeof...(v)) cerr << ", "; _print(v...); } #ifndef ONLINE_JUDGE #define debug(x...) \ cerr << "[" << #x << "] = ["; \ _print(x) #else #define debug(x...) #endif mt19937_64 rnd; const int N = 2e5 + 5; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n; cin >> n; vector<int> a(n); map<int, int> mp; for (auto &x : a) { cin >> x; mp[x]++; } sort(ALL(a)); uni(a); if (SZ(a) == 1) { if (a[0] == 0) { cout << "Yes"; } else { cout << "No"; } } else if (SZ(a) == 2) { if (a[0] == 0 && n % 3 == 0 && mp[0] == n / 3) { cout << "Yes"; } else { cout << "No"; } } else if (SZ(a) == 3 && n % 3 == 0) { if ((a[0] ^ a[1] ^ a[2]) == 0) { if (mp[a[0]] == n / 3 && mp[a[1]] == n / 3 && mp[a[2]] == n / 3) { cout << "Yes"; } else { cout << "No"; } } else { cout << "No"; } } else { cout << "No"; } return 0; } /* *** Most Impo.. -> check base case always 1. Overflow Check (*, +) 2. Index check (0 - based or 1 - based) 3. Check for n = 1, 2, 3, 4.... 4. Corner Cases */
delete
68
69
68
68
0
p02975
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <map> using namespace std; #define N 80005 #define ll long long int t, n; ll a[N]; int main() { // freopen("circle.in","r",stdin); // freopen("circle.out","w",stdout); // scanf("%d",&t); // while(t--) //{ int k = 0; scanf("%d", &n); for (int i = 1; i <= n; i++) scanf("%lld", &a[i]), k ^= a[i]; if (k != 0) { printf("No\n"); // continue; } // sort(a+1,a+n+1); else { printf("Yes\n"); } //} }
#include <algorithm> #include <cstdio> #include <map> using namespace std; #define N 100005 #define ll long long int t, n; ll a[N]; int main() { // freopen("circle.in","r",stdin); // freopen("circle.out","w",stdout); // scanf("%d",&t); // while(t--) //{ int k = 0; scanf("%d", &n); for (int i = 1; i <= n; i++) scanf("%lld", &a[i]), k ^= a[i]; if (k != 0) { printf("No\n"); // continue; } // sort(a+1,a+n+1); else { printf("Yes\n"); } //} }
replace
4
5
4
5
0
p02975
C++
Runtime Error
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <vector> using namespace std; typedef long long ll; bool solve(int N, vector<int> &a) { map<int, int> s; for (int i = 0; i < N; i++) { s[a[i]]++; } pair<int, int> v[3]; int j = 0; for (auto it = s.begin(); it != s.end(); ++it, j++) { v[j] = *it; } if (s.size() == 3) { if (v[0].second == v[1].second && v[1].second == v[2].second) { if ((v[0].first ^ v[1].first ^ v[2].first) == 0) { return true; } } return false; } else if (s.size() == 2) { if (v[0].second < v[1].second) { swap(v[0], v[1]); } if (v[0].second == v[1].second * 2) { if ((v[0].first ^ v[0].first ^ v[1].first) == 0) { return true; } } return false; } else { if (v[0].first == 0) { return true; } return false; } } int main() { int N; scanf("%d", &N); vector<int> a(N); for (int i = 0; i < N; i++) { scanf("%d", &a[i]); } printf("%s\n", solve(N, a) ? "Yes" : "No"); }
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <vector> using namespace std; typedef long long ll; bool solve(int N, vector<int> &a) { map<int, int> s; for (int i = 0; i < N; i++) { s[a[i]]++; } if (s.size() > 3) { return false; } pair<int, int> v[3]; int j = 0; for (auto it = s.begin(); it != s.end(); ++it, j++) { v[j] = *it; } if (s.size() == 3) { if (v[0].second == v[1].second && v[1].second == v[2].second) { if ((v[0].first ^ v[1].first ^ v[2].first) == 0) { return true; } } return false; } else if (s.size() == 2) { if (v[0].second < v[1].second) { swap(v[0], v[1]); } if (v[0].second == v[1].second * 2) { if ((v[0].first ^ v[0].first ^ v[1].first) == 0) { return true; } } return false; } else { if (v[0].first == 0) { return true; } return false; } } int main() { int N; scanf("%d", &N); vector<int> a(N); for (int i = 0; i < N; i++) { scanf("%d", &a[i]); } printf("%s\n", solve(N, a) ? "Yes" : "No"); }
insert
18
18
18
21
0
p02975
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <unordered_map> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> num; map<int, int> nums; for (int i = 0; i < n; i++) { int t; cin >> t; num.push_back(t); if (nums.find(t) != nums.end()) { nums[t]++; } else { nums[t] = 1; } } sort(num.begin(), num.end()); num.erase(unique(num.begin(), num.end()), num.end()); for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (i == j) continue; int a = num[i]; int b = num[j]; map<int, int> nums2 = nums; nums2[a]--; nums2[b]--; int first = a; int prev = a; int cur = b; for (int k = 2; k < n + 1; k++) { int next = prev ^ cur; if (k != n) { if (nums2.find(next) == nums2.end() || nums2[next] == 0) { break; } prev = cur; cur = next; nums2[next]--; } else { if (next == first) { cout << "Yes" << endl; return 0; } } } } } cout << "No" << endl; return 0; }
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <unordered_map> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> num; map<int, int> nums; for (int i = 0; i < n; i++) { int t; cin >> t; num.push_back(t); if (nums.find(t) != nums.end()) { nums[t]++; } else { nums[t] = 1; } } int a = 0; for (int i = 0; i < n; i++) { a ^= num[i]; } if (a != 0) { cout << "No" << endl; return 0; } sort(num.begin(), num.end()); num.erase(unique(num.begin(), num.end()), num.end()); for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (i == j) continue; int a = num[i]; int b = num[j]; map<int, int> nums2 = nums; nums2[a]--; nums2[b]--; int first = a; int prev = a; int cur = b; for (int k = 2; k < n + 1; k++) { int next = prev ^ cur; if (k != n) { if (nums2.find(next) == nums2.end() || nums2[next] == 0) { break; } prev = cur; cur = next; nums2[next]--; } else { if (next == first) { cout << "Yes" << endl; return 0; } } } } } cout << "No" << endl; return 0; }
insert
22
22
22
30
TLE
p02975
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define finish(x) return cout << x << endl, 0 #define ll long long int n; vector<int> a; vector<int> calc(int x, int y) { vector<int> ret = {x, y}; for (int i = 0; i < n - 2; i++) { ret.push_back(ret[(int)ret.size() - 2] ^ ret.back()); } return ret; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cin >> n; a.resize(n); for (auto &i : a) cin >> i; set<int> s(a.begin(), a.end()); if (s.size() > 3) finish("No"); for (auto &i : a) { for (auto &j : a) { vector<int> c = calc(i, j); map<int, int> cnt; for (auto &i : a) cnt[i]++; bool ok = 1; for (auto &i : c) { if (cnt[i] == 0) ok = 0; cnt[i]--; } if (ok) finish("Yes"); } } cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; #define finish(x) return cout << x << endl, 0 #define ll long long int n; vector<int> a; vector<int> calc(int x, int y) { vector<int> ret = {x, y}; for (int i = 0; i < n - 2; i++) { ret.push_back(ret[(int)ret.size() - 2] ^ ret.back()); } return ret; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cin >> n; a.resize(n); for (auto &i : a) cin >> i; set<int> s(a.begin(), a.end()); if (s.size() > 3) finish("No"); for (auto &i : s) { for (auto &j : s) { vector<int> c = calc(i, j); map<int, int> cnt; for (auto &i : a) cnt[i]++; bool ok = 1; for (auto &i : c) { if (cnt[i] == 0) ok = 0; cnt[i]--; } if (ok) finish("Yes"); } } cout << "No" << endl; }
replace
25
27
25
27
TLE
p02975
C++
Runtime Error
#include <bits/stdc++.h> //----***やべーやつら***---- using namespace std; #define int long long //----***型定義***---- using ll = long long; using P = pair<int, int>; //----***Like a Pythonista***---- #define REP(ii, jj, nn) for (ll ii = jj; ii < (nn); ii++) #define RREP(ii, nn, jj) for (ll ii = nn; jj < ii; ii--) #define each(i, ...) for (auto &&i : __VA_ARGS__) #define ALL(vec) (vec).begin(), (vec).end() #define sum(...) accumulate(ALL(__VA_ARGS__), 0LL) #define dsum(...) accumulate(ALL(__VA_ARGS__), 0.0) #define vec(type, name, ...) vector<type> name(__VA_ARGS__) template <class T> inline auto max(const T &a) { return *max_element(ALL(a)); } template <class T> inline auto min(const T &a) { return *min_element(ALL(a)); } inline ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } inline ll lcm(ll a, ll b) { ll g = gcd(a, b); return a / g * b; } //----***定数***---- #define MOD 1000000007 #define INF 100000000000000000 #define EPS 1e-9 const vector<vector<int>> DXY = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}; //----***パーツ***---- #define fi first #define se second #define pb push_back #define re return #define br break //----***入出力***--- void print() { std::cout << "\n"; } template <class T> void print(const T &x) { std::cout << x << "\n"; } template <class T, class... Args> void print(const T &x, const Args &...args) { std::cout << x << " "; print(args...); } #define debug(var) \ do { \ std::cerr << #var << " ↓ " \ << "\n"; \ view(var); \ } while (0); #define dbg cerr << "🥺🥺🥺🥺🥺🥺" << endl; template <typename T> void view(T e) { std::cout << e << std::endl; } template <typename T> void view(const std::vector<T> &v) { for (const auto &e : v) { std::cout << e << " "; } std::cout << std::endl; } template <typename T> void view(const std::vector<std::vector<T>> &vv) { for (const auto &v : vv) { view(v); } } //----***初期時読み込み***---- struct initial { initial() { cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(15); }; } initial_; signed main() { int N; cin >> N; map<int, int> mp; int a; REP(i, 0, N) { cin >> a; mp[a]++; } if (mp[0] == N) { print("Yes"); re 0; } if (N % 3 != 0) { print("No"); re 0; } vector<int> keys; each(m, mp) { for (int i = 0; i < m.second / (N / 3); i++) { keys.pb(m.first); } } if ((keys.size() == 3) && (keys[0] ^ keys[1] ^ keys[keys[2]] == 0)) { print("Yes"); re 0; } print("No"); }
#include <bits/stdc++.h> //----***やべーやつら***---- using namespace std; #define int long long //----***型定義***---- using ll = long long; using P = pair<int, int>; //----***Like a Pythonista***---- #define REP(ii, jj, nn) for (ll ii = jj; ii < (nn); ii++) #define RREP(ii, nn, jj) for (ll ii = nn; jj < ii; ii--) #define each(i, ...) for (auto &&i : __VA_ARGS__) #define ALL(vec) (vec).begin(), (vec).end() #define sum(...) accumulate(ALL(__VA_ARGS__), 0LL) #define dsum(...) accumulate(ALL(__VA_ARGS__), 0.0) #define vec(type, name, ...) vector<type> name(__VA_ARGS__) template <class T> inline auto max(const T &a) { return *max_element(ALL(a)); } template <class T> inline auto min(const T &a) { return *min_element(ALL(a)); } inline ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } inline ll lcm(ll a, ll b) { ll g = gcd(a, b); return a / g * b; } //----***定数***---- #define MOD 1000000007 #define INF 100000000000000000 #define EPS 1e-9 const vector<vector<int>> DXY = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}; //----***パーツ***---- #define fi first #define se second #define pb push_back #define re return #define br break //----***入出力***--- void print() { std::cout << "\n"; } template <class T> void print(const T &x) { std::cout << x << "\n"; } template <class T, class... Args> void print(const T &x, const Args &...args) { std::cout << x << " "; print(args...); } #define debug(var) \ do { \ std::cerr << #var << " ↓ " \ << "\n"; \ view(var); \ } while (0); #define dbg cerr << "🥺🥺🥺🥺🥺🥺" << endl; template <typename T> void view(T e) { std::cout << e << std::endl; } template <typename T> void view(const std::vector<T> &v) { for (const auto &e : v) { std::cout << e << " "; } std::cout << std::endl; } template <typename T> void view(const std::vector<std::vector<T>> &vv) { for (const auto &v : vv) { view(v); } } //----***初期時読み込み***---- struct initial { initial() { cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(15); }; } initial_; signed main() { int N; cin >> N; map<int, int> mp; int a; REP(i, 0, N) { cin >> a; mp[a]++; } if (mp[0] == N) { print("Yes"); re 0; } if (N % 3 != 0) { print("No"); re 0; } vector<int> keys; each(m, mp) { for (int i = 0; i < m.second / (N / 3); i++) { keys.pb(m.first); } } if (keys.size() == 3 && (keys[0] ^ keys[1] ^ keys[2]) == 0) { print("Yes"); re 0; } print("No"); }
replace
102
103
102
103
0
p02975
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef string str; typedef vector<int> vint; typedef vector<double> vdou; typedef vector<ll> vll; typedef vector<vint> vvint; typedef vector<str> vstr; typedef pair<int, int> pii; typedef vector<pii> vpii; #define REP(i, n) for (ll(i) = 0; (i) < (ll)(n); i++) #define FOR(i, a, b) for (ll(i) = a; (i) < (ll)b; i++) #define ALL(v) (v).begin(), (v).end() #define MOD 1000000007 #define NIL -1 #define FI first #define SE second #define MP make_pair #define PB push_back #define SZ(x) (ll) x.size() #define SP(x) setprecision((ll)x) const int INF = 1e9; const ll LINF = 1e18; const double EPS = 1e-9; const double PI = M_PI; const int dx[4] = {1, 0, -1, 0}; const int dy[4] = {0, 1, 0, -1}; ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } // 最大公約数 ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } // 最小公倍数 //------------------------------------------------- // void yes() { cout << "Yes" << endl; } void no() { cout << "No" << endl; } //------------------------------------------------- // メモ /* */ //------------------------------------------------- int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vll num(n); set<ll> S; REP(i, n) { cin >> num[i]; S.insert(num[i]); } if (SZ(S) >= 4) { no(); } else { while (1) { } } return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef string str; typedef vector<int> vint; typedef vector<double> vdou; typedef vector<ll> vll; typedef vector<vint> vvint; typedef vector<str> vstr; typedef pair<int, int> pii; typedef vector<pii> vpii; #define REP(i, n) for (ll(i) = 0; (i) < (ll)(n); i++) #define FOR(i, a, b) for (ll(i) = a; (i) < (ll)b; i++) #define ALL(v) (v).begin(), (v).end() #define MOD 1000000007 #define NIL -1 #define FI first #define SE second #define MP make_pair #define PB push_back #define SZ(x) (ll) x.size() #define SP(x) setprecision((ll)x) const int INF = 1e9; const ll LINF = 1e18; const double EPS = 1e-9; const double PI = M_PI; const int dx[4] = {1, 0, -1, 0}; const int dy[4] = {0, 1, 0, -1}; ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } // 最大公約数 ll lcm(ll a, ll b) { return a / gcd(a, b) * b; } // 最小公倍数 //------------------------------------------------- // void yes() { cout << "Yes" << endl; } void no() { cout << "No" << endl; } //------------------------------------------------- // メモ /* */ //------------------------------------------------- int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vll num(n); set<ll> S; REP(i, n) { cin >> num[i]; S.insert(num[i]); } if (SZ(S) >= 4) { no(); } else { if (SZ(S) == 1) { auto itr = S.begin(); ll a = (*itr); bool f = (ll)(a ^ a) == a; if (f) { yes(); } else { no(); } } else if (SZ(S) == 2) { auto itr = S.begin(); ll a = (*itr); itr++; ll b = (*itr); int cnta = 0; int cntb = 0; REP(i, n) { if (num[i] == a) { cnta++; } else { cntb++; } } if (2 * cnta == cntb && (ll)(a ^ b) == b) { yes(); } else { no(); } } else { auto itr = S.begin(); ll a = (*itr); itr++; ll b = (*itr); itr++; ll c = (*itr); if ((ll)(a ^ b) != c) { no(); return 0; } int cnta = 0; int cntb = 0; int cntc = 0; REP(i, n) { if (num[i] == a) { cnta++; } else if (num[i] == b) { cntb++; } else if (num[i] == c) { cntc++; } } if (max({cnta, cntb, cntc}) == min({cnta, cntb, cntc})) { yes(); } else { no(); } } } return 0; }
replace
65
66
65
121
TLE
p02975
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i <= (b); ++i) #define rrep(i, a, b) for (int i = (a); i >= (b); --i) #define PB push_back #define MP make_pair #define PII pair<int, int> typedef long long LL; const LL MOD = 998244353; const int INF = 0x3fffffff; const int N = 100010; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int n, x; int main() { #ifndef ONLINE_JUDGE freopen("test.in", "r", stdin); #endif ios::sync_with_stdio(false); cin.tie(0); cin >> n; map<int, int> cnt; rep(i, 1, n) cin >> x, cnt[x]++; if (cnt.size() <= 3) { int a[4], b[4], m = 0; for (auto x : cnt) { a[++m] = x.first; b[m] = x.second; } // rep(i,1,m)cout<<a[i]<<" "<<b[i]<<endl; bool flag = false; if (m == 1 && a[1] == 0) flag = true; if (m == 2 && b[1] == b[2] * 2 && (a[1] ^ a[1] ^ a[2]) == 0) flag = true; if (m == 2 && b[1] * 2 == b[2] && (a[1] ^ a[2] ^ a[2]) == 0) flag = true; if (m == 3 && b[1] == b[2] && b[1] == b[3] && (a[1] ^ a[2] ^ a[3]) == 0) flag = true; if (flag) { cout << "Yes\n"; return 0; } } cout << "No\n"; return 0; }
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i <= (b); ++i) #define rrep(i, a, b) for (int i = (a); i >= (b); --i) #define PB push_back #define MP make_pair #define PII pair<int, int> typedef long long LL; const LL MOD = 998244353; const int INF = 0x3fffffff; const int N = 100010; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); int n, x; int main() { ios::sync_with_stdio(false); cin.tie(0); cin >> n; map<int, int> cnt; rep(i, 1, n) cin >> x, cnt[x]++; if (cnt.size() <= 3) { int a[4], b[4], m = 0; for (auto x : cnt) { a[++m] = x.first; b[m] = x.second; } // rep(i,1,m)cout<<a[i]<<" "<<b[i]<<endl; bool flag = false; if (m == 1 && a[1] == 0) flag = true; if (m == 2 && b[1] == b[2] * 2 && (a[1] ^ a[1] ^ a[2]) == 0) flag = true; if (m == 2 && b[1] * 2 == b[2] && (a[1] ^ a[2] ^ a[2]) == 0) flag = true; if (m == 3 && b[1] == b[2] && b[1] == b[3] && (a[1] ^ a[2] ^ a[3]) == 0) flag = true; if (flag) { cout << "Yes\n"; return 0; } } cout << "No\n"; return 0; }
delete
16
19
16
16
0
p02975
C++
Time Limit Exceeded
#include <algorithm> #include <array> #include <cmath> #include <cstdio> #include <map> #include <memory.h> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; void re(int &x); template <class T> void re(std::vector<T> &a); void pr(const char *x); void ps(); template <class T, class... Ts> void ps(const T &t, const Ts &...ts); #ifdef FFDBG #else #define dbg(x...) dsfdsfsdfasd #endif typedef vector<int> vi; int n; void solve() { re(n); vi a(n); re(a); vi h(n, -1); h[0] = 0; for (int i = 2; i != 0; i = (i + 2) % n) { h[i] = (h[(i + n - 2) % n] ^ a[(i + n - 1) % n]); } if ((h[0] ^ h[n - 2]) != a[n - 1]) { ps("No"); return; } if (h[1] == -1) { h[1] = 0; for (int i = 3; i != 0; i = (i + 2) % n) { h[i] = (h[(i + n - 2) % n] ^ a[(i + n - 1) % n]); } if ((h[1] ^ h[n - 1]) != a[0]) { ps("No"); return; } } ps("Yes"); } int main() { solve(); } void re(int &x) { scanf("%d", &x); } template <class T> void re(std::vector<T> &a) { for (int i = 0; i < a.size(); i++) re(a[i]); } void pr(const char *x) { printf("%s", x); } void ps() { pr("\n"); } template <class T, class... Ts> void ps(const T &t, const Ts &...ts) { pr(t); if (sizeof...(ts)) pr(" "); ps(ts...); }
#include <algorithm> #include <array> #include <cmath> #include <cstdio> #include <map> #include <memory.h> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; void re(int &x); template <class T> void re(std::vector<T> &a); void pr(const char *x); void ps(); template <class T, class... Ts> void ps(const T &t, const Ts &...ts); #ifdef FFDBG #else #define dbg(x...) dsfdsfsdfasd #endif typedef vector<int> vi; int n; void solve() { re(n); vi a(n); re(a); vi h(n, -1); h[0] = 0; for (int i = 2; i != 0; i = (i + 2) % n) { h[i] = (h[(i + n - 2) % n] ^ a[(i + n - 1) % n]); } if ((h[0] ^ h[n - 2]) != a[n - 1]) { ps("No"); return; } if (h[1] == -1) { h[1] = 0; for (int i = 3; i != 1; i = (i + 2) % n) { h[i] = (h[(i + n - 2) % n] ^ a[(i + n - 1) % n]); } if ((h[1] ^ h[n - 1]) != a[0]) { ps("No"); return; } } ps("Yes"); } int main() { solve(); } void re(int &x) { scanf("%d", &x); } template <class T> void re(std::vector<T> &a) { for (int i = 0; i < a.size(); i++) re(a[i]); } void pr(const char *x) { printf("%s", x); } void ps() { pr("\n"); } template <class T, class... Ts> void ps(const T &t, const Ts &...ts) { pr(t); if (sizeof...(ts)) pr(" "); ps(ts...); }
replace
52
53
52
53
TLE
p02975
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define int ll #define REP(i, n) for (int i = 0; i < n; ++i) #define ALL(name) name.begin(), name.end() #define SORT(name) sort(name.begin(), name.end()) #define ZERO(p) memset(p, 0, sizeof(p)) #define MINUS(p) memset(p, -1, sizeof(p)) #if 1 #define DBG(fmt, ...) printf(fmt, ##__VA_ARGS__) #else #define DBG(fmt, ...) #endif const ll LLINF = (1LL << 60); const int INF = (1LL << 30); const double DINF = std::numeric_limits<double>::infinity(); const int MOD = 1000000007; #define MAX_N 100010 ll N; vector<ll> A; map<ll, ll> A_map; signed main() { cin.tie(0); cout.tie(0); ios::sync_with_stdio(false); cin >> N; A.resize(N); REP(i, N) { cin >> A[i]; A_map[A[i]]++; } if (A_map.size() == 3) { vector<ll> val(3); ll j = 0; for (auto &a_tmp : A_map) { if (a_tmp.second != N / 3) { printf("No\n"); return 0; } val[j] = a_tmp.first; j++; } if (val[0] == (val[1] ^ val[2]) && val[1] == (val[0] ^ val[2]) && val[2] == (val[1] ^ val[0])) { printf("Yes\n"); return 0; } } else if (A_map.size() == 2) { assert(false); } else if (A_map.size() == 1) { for (auto &a_tmp : A_map) { if (a_tmp.first != 0) { printf("No\n"); } else { printf("Yes\n"); } return 0; } } printf("No\n"); return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define int ll #define REP(i, n) for (int i = 0; i < n; ++i) #define ALL(name) name.begin(), name.end() #define SORT(name) sort(name.begin(), name.end()) #define ZERO(p) memset(p, 0, sizeof(p)) #define MINUS(p) memset(p, -1, sizeof(p)) #if 1 #define DBG(fmt, ...) printf(fmt, ##__VA_ARGS__) #else #define DBG(fmt, ...) #endif const ll LLINF = (1LL << 60); const int INF = (1LL << 30); const double DINF = std::numeric_limits<double>::infinity(); const int MOD = 1000000007; #define MAX_N 100010 ll N; vector<ll> A; map<ll, ll> A_map; signed main() { cin.tie(0); cout.tie(0); ios::sync_with_stdio(false); cin >> N; A.resize(N); REP(i, N) { cin >> A[i]; A_map[A[i]]++; } if (A_map.size() == 3) { vector<ll> val(3); ll j = 0; for (auto &a_tmp : A_map) { if (a_tmp.second != N / 3) { printf("No\n"); return 0; } val[j] = a_tmp.first; j++; } if (val[0] == (val[1] ^ val[2]) && val[1] == (val[0] ^ val[2]) && val[2] == (val[1] ^ val[0])) { printf("Yes\n"); return 0; } } else if (A_map.size() == 2) { vector<ll> val(2); for (auto &a_tmp : A_map) { if (a_tmp.first == 0) { val[0] = a_tmp.second; } else { val[1] = a_tmp.second; } } if (val[1] == (N / 3) * 2 && val[0] == N / 3) { printf("Yes\n"); } else { printf("No\n"); } return 0; } else if (A_map.size() == 1) { for (auto &a_tmp : A_map) { if (a_tmp.first != 0) { printf("No\n"); } else { printf("Yes\n"); } return 0; } } printf("No\n"); return 0; }
replace
58
59
58
72
0
p02975
C++
Runtime Error
#include <bits/stdc++.h> #define REP(i, n) for (long long i = 0; i < (n); i++) using namespace std; using ll = long long; int main() { cin.tie(0)->sync_with_stdio(false); ll n; cin >> n; ll cnt0 = 0; map<ll, ll> hat; REP(i, n) { ll tmp; cin >> tmp; if (tmp == 0) cnt0++; hat[tmp]++; } bool ok = false; if (cnt0 == n) ok = true; else if (hat.size() == 2) { if (hat.count(0)) { ll cnt = 0; for (auto i : hat) if (i.first != 0) cnt = i.second; if (cnt0 * 2 == cnt) ok = true; } } else if (!(n % 3)) { ll val[3]; ll cnt[3]; ll i = 0; for (auto itr : hat) { val[i] = itr.first; cnt[i] = itr.second; i++; } if (cnt[0] == cnt[1] && cnt[1] == cnt[2]) if (((val[0] ^ val[1]) ^ val[2]) == 0) ok = true; } if (ok) cout << "Yes" << '\n'; else cout << "No" << '\n'; return 0; }
#include <bits/stdc++.h> #define REP(i, n) for (long long i = 0; i < (n); i++) using namespace std; using ll = long long; int main() { cin.tie(0)->sync_with_stdio(false); ll n; cin >> n; ll cnt0 = 0; map<ll, ll> hat; REP(i, n) { ll tmp; cin >> tmp; if (tmp == 0) cnt0++; hat[tmp]++; } bool ok = false; if (cnt0 == n) ok = true; else if (hat.size() == 2) { if (hat.count(0)) { ll cnt = 0; for (auto i : hat) if (i.first != 0) cnt = i.second; if (cnt0 * 2 == cnt) ok = true; } } else if (hat.size() == 3) { ll val[3]; ll cnt[3]; ll i = 0; for (auto itr : hat) { val[i] = itr.first; cnt[i] = itr.second; i++; } if (cnt[0] == cnt[1] && cnt[1] == cnt[2]) if (((val[0] ^ val[1]) ^ val[2]) == 0) ok = true; } if (ok) cout << "Yes" << '\n'; else cout << "No" << '\n'; return 0; }
replace
33
34
33
34
0
p02975
C++
Time Limit Exceeded
// A. #include <algorithm> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <set> #include <sstream> #include <vector> using namespace std; int main(int argc, char *argv[]) { int n; cin >> n; vector<int> a(n); map<int, int> m; for (int i = 0; i < n; ++i) { cin >> a[i]; m[a[i]] += 1; } set<int> s(a.begin(), a.end()); vector<int> v(n); for (int t = 0; t < 10000; ++t) { int p = a[rand() % n]; int q = a[rand() % n]; int x = p ^ q; if (s.find(x) != s.end()) { map<int, int> r = m; r[p] -= 1; r[q] -= 1; r[x] -= 1; if (r[x] >= 0) { v[0] = p; v[1] = q; v[2] = x; int i; for (i = 3; i < n; ++i) { x = v[i - 2] ^ v[i - 1]; v[i] = x; r[x] -= 1; if (r[x] < 0) { break; } } if (i >= n && (v[0] == (v[1] ^ v[n - 1]))) { cout << "Yes" << endl; return 0; } } } } cout << "No" << endl; return 0; }
// A. #include <algorithm> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <set> #include <sstream> #include <vector> using namespace std; int main(int argc, char *argv[]) { int n; cin >> n; vector<int> a(n); map<int, int> m; for (int i = 0; i < n; ++i) { cin >> a[i]; m[a[i]] += 1; } set<int> s(a.begin(), a.end()); vector<int> v(n); for (int t = 0; t < 500; ++t) { int ar = rand() % n, br = rand() % n; if (ar == br) continue; int p = a[ar]; int q = a[br]; int x = p ^ q; if (s.find(x) != s.end()) { map<int, int> r = m; r[p] -= 1; r[q] -= 1; r[x] -= 1; if (r[x] >= 0) { v[0] = p; v[1] = q; v[2] = x; int i; for (i = 3; i < n; ++i) { x = v[i - 2] ^ v[i - 1]; v[i] = x; r[x] -= 1; if (r[x] < 0) { break; } } if (i >= n && (v[0] == (v[1] ^ v[n - 1]))) { cout << "Yes" << endl; return 0; } } } } cout << "No" << endl; return 0; }
replace
24
27
24
30
TLE
p02975
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cstdio> #include <cstdlib> #include <iostream> #include <queue> #include <vector> using namespace std; #define INF 1000000000000 #define MAX 1000000000000000000 typedef long long ll; typedef pair<ll, int> P; typedef pair<pair<int, int>, int> p; #define bit(n, k) ((n >> k) & 1) /*nのk bit目*/ int main() { int N, count = 0; cin >> N; ll a; vector<P> V; for (int i = 0; i < N; i++) { bool flag = false; cin >> a; for (int i = 0; i < (int)V.size(); i++) { if (V[i].first == a) { V[i].second++; flag = true; } } if (V.size() >= 4) { cout << "No" << endl; return 0; } if (flag) continue; V.push_back(P(a, 1)); } if ((int)V.size() == 3) { return 1; if (V[0].first ^ V[1].first ^ V[2].first == 0 && V[0].second == V[1].second && V[1].second == V[2].second) { cout << "Yes" << endl; } else cout << "No" << endl; } else if ((int)V.size() == 2) { if ((V[0].first == 0 && V[0].second * 2 == V[1].second) || (V[1].first == 0 && V[1].second * 2 == V[0].second)) { cout << "Yes" << endl; } else cout << "No" << endl; } else if ((int)V.size() == 1) { if (V[0].first == 0) cout << "Yes" << endl; else cout << "No" << endl; } else cout << "No" << endl; }
#include <algorithm> #include <bitset> #include <cstdio> #include <cstdlib> #include <iostream> #include <queue> #include <vector> using namespace std; #define INF 1000000000000 #define MAX 1000000000000000000 typedef long long ll; typedef pair<ll, int> P; typedef pair<pair<int, int>, int> p; #define bit(n, k) ((n >> k) & 1) /*nのk bit目*/ int main() { int N, count = 0; cin >> N; ll a; vector<P> V; for (int i = 0; i < N; i++) { bool flag = false; cin >> a; for (int i = 0; i < (int)V.size(); i++) { if (V[i].first == a) { V[i].second++; flag = true; } } if (V.size() >= 4) { cout << "No" << endl; return 0; } if (flag) continue; V.push_back(P(a, 1)); } if ((int)V.size() == 3) { int x = V[0].first ^ V[1].first; x ^= V[2].first; if (x == 0 && V[0].second == V[1].second && V[1].second == V[2].second) { cout << "Yes" << endl; } else cout << "No" << endl; } else if ((int)V.size() == 2) { if ((V[0].first == 0 && V[0].second * 2 == V[1].second) || (V[1].first == 0 && V[1].second * 2 == V[0].second)) { cout << "Yes" << endl; } else cout << "No" << endl; } else if ((int)V.size() == 1) { if (V[0].first == 0) cout << "Yes" << endl; else cout << "No" << endl; } else cout << "No" << endl; }
replace
38
41
38
41
1
p02975
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> P; #define fi first #define se second #define repl(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++) #define rep(i, n) repl(i, 0, n) #define all(x) (x).begin(), (x).end() #define dbg(x) cout << #x "=" << x << endl #define mmax(x, y) (x > y ? x : y) #define mmin(x, y) (x < y ? x : y) #define maxch(x, y) x = mmax(x, y) #define minch(x, y) x = mmin(x, y) #define uni(x) x.erase(unique(all(x)), x.end()) #define exist(x, y) (find(all(x), y) != x.end()) #define bcnt __builtin_popcountll #define INF 1e16 #define mod 1000000007 ll n; ll a[100001]; vector<ll> vs; map<ll, ll> tot; int main() { cin.tie(0); ios::sync_with_stdio(false); cin >> n; rep(i, n) { cin >> a[i]; vs.push_back(a[i]); tot[a[i]]++; } sort(all(vs)); uni(vs); rep(i, vs.size()) rep(j, vs.size()) { bool ok = true; map<ll, ll> cnt = tot; ll b[3]; b[0] = vs[i]; b[1] = vs[j]; b[2] = vs[i] ^ vs[j]; rep(k, n) { if (cnt[b[k % 3]] == 0) ok = false; cnt[b[k % 3]]--; } if (ok) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> P; #define fi first #define se second #define repl(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++) #define rep(i, n) repl(i, 0, n) #define all(x) (x).begin(), (x).end() #define dbg(x) cout << #x "=" << x << endl #define mmax(x, y) (x > y ? x : y) #define mmin(x, y) (x < y ? x : y) #define maxch(x, y) x = mmax(x, y) #define minch(x, y) x = mmin(x, y) #define uni(x) x.erase(unique(all(x)), x.end()) #define exist(x, y) (find(all(x), y) != x.end()) #define bcnt __builtin_popcountll #define INF 1e16 #define mod 1000000007 ll n; ll a[100001]; vector<ll> vs; map<ll, ll> tot; int main() { cin.tie(0); ios::sync_with_stdio(false); cin >> n; rep(i, n) { cin >> a[i]; vs.push_back(a[i]); tot[a[i]]++; } sort(all(vs)); uni(vs); if (vs.size() > 3) { cout << "No" << endl; return 0; } rep(i, vs.size()) rep(j, vs.size()) { bool ok = true; map<ll, ll> cnt = tot; ll b[3]; b[0] = vs[i]; b[1] = vs[j]; b[2] = vs[i] ^ vs[j]; rep(k, n) { if (cnt[b[k % 3]] == 0) ok = false; cnt[b[k % 3]]--; } if (ok) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
insert
41
41
41
45
TLE
p02976
Python
Runtime Error
#!/usr/bin/env python3 import sys sys.setrecursionlimit(100000) n, m = [int(x) for x in input().split()] edges = [] g = [[] for _ in range(n)] for _ in range(m): a, b = [int(x) for x in input().split()] a -= 1 b -= 1 e = len(edges) g[a].append(e) g[b].append(e) edges.append((a, b)) if m % 2 == 1: print(-1) sys.exit(0) visited = [False] * n visitede = [False] * m def build_stree(i): cts = [] for e in g[i]: j = edges[e][1 if edges[e][0] == i else 0] if visited[j]: continue visitede[e] = True visited[j] = True cts.append((e, build_stree(j))) return i, cts visited[0] = True st = build_stree(0) rev_e = [None if v else False for v in visitede] def pos(t): i, cts = t for _, ct in cts: pos(ct) es = [e for e in g[i] if rev_e[e] is None] assert len(es) <= 1 if not es: return f = es[0] rev_e[f] = (sum((edges[e][0] == i) ^ rev_e[e] for e in g[i] if e != f) % 2 != 0) ^ ( edges[f][0] == i ) pos(st) for ed, re in zip(edges, rev_e): if re: b, a = ed else: a, b = ed print(a + 1, b + 1)
#!/usr/bin/env python3 import sys sys.setrecursionlimit(1000000) n, m = [int(x) for x in input().split()] edges = [] g = [[] for _ in range(n)] for _ in range(m): a, b = [int(x) for x in input().split()] a -= 1 b -= 1 e = len(edges) g[a].append(e) g[b].append(e) edges.append((a, b)) if m % 2 == 1: print(-1) sys.exit(0) visited = [False] * n visitede = [False] * m def build_stree(i): cts = [] for e in g[i]: j = edges[e][1 if edges[e][0] == i else 0] if visited[j]: continue visitede[e] = True visited[j] = True cts.append((e, build_stree(j))) return i, cts visited[0] = True st = build_stree(0) rev_e = [None if v else False for v in visitede] def pos(t): i, cts = t for _, ct in cts: pos(ct) es = [e for e in g[i] if rev_e[e] is None] assert len(es) <= 1 if not es: return f = es[0] rev_e[f] = (sum((edges[e][0] == i) ^ rev_e[e] for e in g[i] if e != f) % 2 != 0) ^ ( edges[f][0] == i ) pos(st) for ed, re in zip(edges, rev_e): if re: b, a = ed else: a, b = ed print(a + 1, b + 1)
replace
4
5
4
5
0
p02976
C++
Runtime Error
#define _CRT_SECURE_NO_WARNINGS #define _SCL_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <valarray> #include <vector> using namespace std; typedef unsigned int uint; typedef long long LL; typedef unsigned long long ULL; typedef pair<LL, LL> PP; #define REP(i, a, n) for (LL i = (a), i##_max = (n); i < i##_max; ++i) #define REM(i, a, n) for (LL i = (LL)(n)-1, i##min = (a); i >= i##min; --i) #define ALL(arr) (arr).begin(), (arr).end() #define FLOAT fixed << setprecision(16) #define SPEEDUP \ { \ cin.tie(NULL); \ ios::sync_with_stdio(false); \ } const int INF = 0x3FFFFFFF; const LL INFLL = 0x3FFFFFFF3FFFFFFF; const double INFD = 1.0e+308; const double EPS = 1.0e-9; void YesNo(bool b) { cout << (b ? "Yes" : "No") << endl; } void YESNO(bool b) { cout << (b ? "YES" : "NO") << endl; } template <class T, class U> istream &operator>>(istream &ist, pair<T, U> &right) { return ist >> right.first >> right.second; } template <class T, class U> ostream &operator<<(ostream &ost, const pair<T, U> &right) { return ost << right.first << ' ' << right.second; } template <class T, class TCompatible, size_t N> void Fill(T (&dest)[N], const TCompatible &val) { fill(dest, dest + N, val); } template <class T, class TCompatible, size_t M, size_t N> void Fill(T (&dest)[M][N], const TCompatible &val) { for (int i = 0; i < M; ++i) Fill(dest[i], val); } template <class T> T Compare(T left, T right) { return left > right ? 1 : (left < right ? -1 : 0); } istream &Ignore(istream &ist) { string s; ist >> s; return ist; } bool Inside(int i, int j, int h, int w) { return i >= 0 && i < h && j >= 0 && j < w; } template <class T> T Next() { T buf; cin >> buf; return buf; } #ifdef ONLY_MY_ENVIR #include "BIT.h" #include "BinaryMatrix.h" #include "Factorization.h" #include "FlowSolver.h" #include "Graph.h" #include "IntMod.h" #include "LazySegmentTree.h" #include "Math.h" #include "Matrix.h" #include "MinMax.h" #include "Position.h" #include "Range.h" #include "Rational.h" #include "SegmentTree.h" #include "SegmentTree2D.h" #include "SuffixArray.h" #include "Tree.h" #include "UnionFind.h" #endif #ifdef __GNUC__ typedef __int128 LLL; istream &operator>>(istream &ist, __int128 &val) { LL tmp; ist >> tmp; val = tmp; return ist; } ostream &operator<<(ostream &ost, __int128 val) { LL tmp = val; ost << tmp; return ost; } #endif #if 1234567891 #include <array> #include <random> #include <unordered_map> #include <unordered_set> template <typename T> using PriorityQ = priority_queue<T, vector<T>, greater<T>>; // template <class T> // auto Is(const T& value) { return [value](const auto& comparand) -> bool { // return comparand == value; }; } #endif int N, M; vector<int> G[100000]; int used[10000]; void print(int from, int to) { cout << from + 1 << ' ' << to + 1 << endl; } bool DFS(int from, int prev) { if (used[from] == 1) return false; if (used[from] == 2) return true; used[from] = 1; vector<int> edges; for (int to : G[from]) { if (to == prev) continue; if (!DFS(to, from)) { edges.push_back(to); } } int K = edges.size() / 2; REP(i, 0, K) { print(from, edges[2 * i]); print(from, edges[2 * i + 1]); } used[from] = 2; if (edges.size() % 2 == 0) { return false; } else { print(from, edges.back()); print(from, prev); return true; } } int main() { cin >> N >> M; REP(i, 0, M) { int a, b; cin >> a >> b; --a; --b; G[a].push_back(b); G[b].push_back(a); } if (M % 2 == 0) { DFS(0, -1); } else { cout << -1 << endl; } return 0; }
#define _CRT_SECURE_NO_WARNINGS #define _SCL_SECURE_NO_WARNINGS #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <utility> #include <valarray> #include <vector> using namespace std; typedef unsigned int uint; typedef long long LL; typedef unsigned long long ULL; typedef pair<LL, LL> PP; #define REP(i, a, n) for (LL i = (a), i##_max = (n); i < i##_max; ++i) #define REM(i, a, n) for (LL i = (LL)(n)-1, i##min = (a); i >= i##min; --i) #define ALL(arr) (arr).begin(), (arr).end() #define FLOAT fixed << setprecision(16) #define SPEEDUP \ { \ cin.tie(NULL); \ ios::sync_with_stdio(false); \ } const int INF = 0x3FFFFFFF; const LL INFLL = 0x3FFFFFFF3FFFFFFF; const double INFD = 1.0e+308; const double EPS = 1.0e-9; void YesNo(bool b) { cout << (b ? "Yes" : "No") << endl; } void YESNO(bool b) { cout << (b ? "YES" : "NO") << endl; } template <class T, class U> istream &operator>>(istream &ist, pair<T, U> &right) { return ist >> right.first >> right.second; } template <class T, class U> ostream &operator<<(ostream &ost, const pair<T, U> &right) { return ost << right.first << ' ' << right.second; } template <class T, class TCompatible, size_t N> void Fill(T (&dest)[N], const TCompatible &val) { fill(dest, dest + N, val); } template <class T, class TCompatible, size_t M, size_t N> void Fill(T (&dest)[M][N], const TCompatible &val) { for (int i = 0; i < M; ++i) Fill(dest[i], val); } template <class T> T Compare(T left, T right) { return left > right ? 1 : (left < right ? -1 : 0); } istream &Ignore(istream &ist) { string s; ist >> s; return ist; } bool Inside(int i, int j, int h, int w) { return i >= 0 && i < h && j >= 0 && j < w; } template <class T> T Next() { T buf; cin >> buf; return buf; } #ifdef ONLY_MY_ENVIR #include "BIT.h" #include "BinaryMatrix.h" #include "Factorization.h" #include "FlowSolver.h" #include "Graph.h" #include "IntMod.h" #include "LazySegmentTree.h" #include "Math.h" #include "Matrix.h" #include "MinMax.h" #include "Position.h" #include "Range.h" #include "Rational.h" #include "SegmentTree.h" #include "SegmentTree2D.h" #include "SuffixArray.h" #include "Tree.h" #include "UnionFind.h" #endif #ifdef __GNUC__ typedef __int128 LLL; istream &operator>>(istream &ist, __int128 &val) { LL tmp; ist >> tmp; val = tmp; return ist; } ostream &operator<<(ostream &ost, __int128 val) { LL tmp = val; ost << tmp; return ost; } #endif #if 1234567891 #include <array> #include <random> #include <unordered_map> #include <unordered_set> template <typename T> using PriorityQ = priority_queue<T, vector<T>, greater<T>>; // template <class T> // auto Is(const T& value) { return [value](const auto& comparand) -> bool { // return comparand == value; }; } #endif int N, M; vector<int> G[100000]; int used[100000]; void print(int from, int to) { cout << from + 1 << ' ' << to + 1 << endl; } bool DFS(int from, int prev) { if (used[from] == 1) return false; if (used[from] == 2) return true; used[from] = 1; vector<int> edges; for (int to : G[from]) { if (to == prev) continue; if (!DFS(to, from)) { edges.push_back(to); } } int K = edges.size() / 2; REP(i, 0, K) { print(from, edges[2 * i]); print(from, edges[2 * i + 1]); } used[from] = 2; if (edges.size() % 2 == 0) { return false; } else { print(from, edges.back()); print(from, prev); return true; } } int main() { cin >> N >> M; REP(i, 0, M) { int a, b; cin >> a >> b; --a; --b; G[a].push_back(b); G[b].push_back(a); } if (M % 2 == 0) { DFS(0, -1); } else { cout << -1 << endl; } return 0; }
replace
131
132
131
132
0
p02976
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long signed main(void) { int N, M; cin >> N >> M; if (M % 2 == 1) { cout << "-1" << endl; return 0; } vector<vector<int>> to(M); for (int i = 0; i < M; i++) { int a, b; cin >> a >> b; a--; b--; to[a].push_back(b); to[b].push_back(a); } vector<pair<int, int>> depth(N); for (int i = 0; i < N; i++) { depth[i] = {-1, i}; } depth[0] = {0, 0}; queue<int> Q; Q.push(0); while (!Q.empty()) { int p = Q.front(); Q.pop(); for (auto q : to[p]) { if (depth[q].first != -1) { continue; } depth[q].first = depth[p].first + 1; Q.push(q); } } sort(depth.rbegin(), depth.rend()); // 深い順にソートする vector<bool> used(N, false); vector<bool> even(N, true); // depthが深いから決めていく set<pair<int, int>> ans; for (int i = 0; i < N; i++) { int p = depth[i].second; for (auto q : to[p]) { if (used[q]) { continue; } // 全て埋めてしまった点については何も見ない if (even[p]) { // qからpに辺をはる even[q] = !even[q]; ans.insert({q, p}); } else { // pからqに辺をはる even[p] = true; ans.insert({p, q}); } } used[p] = true; } for (auto ne : ans) { cout << ne.first + 1 << " " << ne.second + 1 << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; #define int long long signed main(void) { int N, M; cin >> N >> M; if (M % 2 == 1) { cout << "-1" << endl; return 0; } vector<vector<int>> to(N); for (int i = 0; i < M; i++) { int a, b; cin >> a >> b; a--; b--; to[a].push_back(b); to[b].push_back(a); } vector<pair<int, int>> depth(N); for (int i = 0; i < N; i++) { depth[i] = {-1, i}; } depth[0] = {0, 0}; queue<int> Q; Q.push(0); while (!Q.empty()) { int p = Q.front(); Q.pop(); for (auto q : to[p]) { if (depth[q].first != -1) { continue; } depth[q].first = depth[p].first + 1; Q.push(q); } } sort(depth.rbegin(), depth.rend()); // 深い順にソートする vector<bool> used(N, false); vector<bool> even(N, true); // depthが深いから決めていく set<pair<int, int>> ans; for (int i = 0; i < N; i++) { int p = depth[i].second; for (auto q : to[p]) { if (used[q]) { continue; } // 全て埋めてしまった点については何も見ない if (even[p]) { // qからpに辺をはる even[q] = !even[q]; ans.insert({q, p}); } else { // pからqに辺をはる even[p] = true; ans.insert({p, q}); } } used[p] = true; } for (auto ne : ans) { cout << ne.first + 1 << " " << ne.second + 1 << endl; } return 0; }
replace
14
15
14
15
0
p02976
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef unsigned long long int ull; typedef long long int ll; typedef pair<ll, ll> pll; typedef long double D; typedef complex<D> P; #define F first #define S second const ll MOD = 1000000007; // const ll MOD=998244353; template <typename T, typename U> istream &operator>>(istream &i, pair<T, U> &A) { i >> A.F >> A.S; return i; } template <typename T> istream &operator>>(istream &i, vector<T> &A) { for (auto &I : A) { i >> I; } return i; } template <typename T, typename U> ostream &operator<<(ostream &o, const pair<T, U> &A) { o << A.F << " " << A.S; return o; } template <typename T> ostream &operator<<(ostream &o, const vector<T> &A) { ll i = A.size(); for (auto &I : A) { o << I << (--i ? " " : ""); } return o; } ll N, M; vector<vector<ll>> edge; vector<ll> depth, cnt; vector<pll> ans; void dfs(ll u, ll p) { for (auto &v : edge[u]) { if (v == p) { continue; } if (depth[v] != -1) { if (depth[v] < depth[u]) { cnt[u]++; ans.push_back({u, v}); } continue; } depth[v] = depth[u] + 1; dfs(v, u); } if (cnt[u] & 1) { assert(p != -1); cnt[u]++; ans.push_back({u, p}); } else if (p != -1) { cnt[p]++; ans.push_back({p, u}); } } int main() { cin.tie(0); ios::sync_with_stdio(false); cin >> N >> M; edge.resize(N); depth.resize(N, -1); cnt.resize(N); if (M & 1) { cout << -1 << endl; return 0; } for (int i = 0; i < M; i++) { ll a, b; cin >> a >> b; a--; b--; edge[a].push_back(b); edge[b].push_back(a); } dfs(0, -1); for (auto &I : ans) { I.F++; I.S++; cout << I << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; typedef unsigned long long int ull; typedef long long int ll; typedef pair<ll, ll> pll; typedef long double D; typedef complex<D> P; #define F first #define S second const ll MOD = 1000000007; // const ll MOD=998244353; template <typename T, typename U> istream &operator>>(istream &i, pair<T, U> &A) { i >> A.F >> A.S; return i; } template <typename T> istream &operator>>(istream &i, vector<T> &A) { for (auto &I : A) { i >> I; } return i; } template <typename T, typename U> ostream &operator<<(ostream &o, const pair<T, U> &A) { o << A.F << " " << A.S; return o; } template <typename T> ostream &operator<<(ostream &o, const vector<T> &A) { ll i = A.size(); for (auto &I : A) { o << I << (--i ? " " : ""); } return o; } ll N, M; vector<vector<ll>> edge; vector<ll> depth, cnt; vector<pll> ans; void dfs(ll u, ll p) { for (auto &v : edge[u]) { if (v == p) { continue; } if (depth[v] != -1) { if (depth[v] < depth[u]) { cnt[u]++; ans.push_back({u, v}); } continue; } depth[v] = depth[u] + 1; dfs(v, u); } if (cnt[u] & 1) { assert(p != -1); cnt[u]++; ans.push_back({u, p}); } else if (p != -1) { cnt[p]++; ans.push_back({p, u}); } } int main() { cin.tie(0); ios::sync_with_stdio(false); cin >> N >> M; edge.resize(N); depth.resize(N, -1); cnt.resize(N); if (M & 1) { cout << -1 << endl; return 0; } for (int i = 0; i < M; i++) { ll a, b; cin >> a >> b; a--; b--; edge[a].push_back(b); edge[b].push_back(a); } depth[0] = 0; dfs(0, -1); for (auto &I : ans) { I.F++; I.S++; cout << I << endl; } return 0; }
insert
85
85
85
86
0
p02976
C++
Runtime Error
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdint> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <regex> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using namespace std; using ll = long long; using ull = unsigned long long; constexpr ll INF = 1'000'000'000'000'000'000; namespace utils { #define ALL(x) begin(x), end(x) #define rALL(x) rbegin(x), rend(x) template <class T, class Compare> using p_queue = priority_queue<T, vector<T>, Compare>; template <class T> using min_queue = p_queue<T, greater<T>>; template <class T> using max_queue = p_queue<T, less<T>>; template <class T> bool min_update(T &X, const T &A) { if (X > A) { X = A; return true; } return false; } template <class T> bool max_update(T &X, const T &A) { if (X < A) { X = A; return true; } return false; } using V_Set = unordered_set<int>; using E_Set = unordered_map<int, V_Set>; ll operator"" _64(unsigned long long x) { return ll(x); } ull operator"" _64u(unsigned long long x) { return ull(x); } template <class T> vector<T> make_vector(int n, T t) { return vector<T>(n, t); } template <class... Ts> auto make_vector(int n, Ts... ts) { return vector<decltype(make_vector(ts...))>(n, make_vector(ts...)); } template <class T> ostream &operator<<(ostream &os, const vector<T> &v) { for (auto &&x : v) { os << x << ' '; } cout << endl; return os; } } // namespace utils using namespace utils; class solver { istream &is; ostream &os; E_Set outE, E; ll N, M; vector<bool> vis; vector<pair<int, int>> sE; public: solver(istream &I, ostream &O) : is(I), os(O) {} void make_spanning(int v) { vis[v] = true; for (auto &&u : E[v]) { if (vis[u]) { continue; } make_spanning(u); sE.emplace_back(v, u); } // end u } void run() { is >> N >> M; if (!is) return; for (int i = 0; i < M; ++i) { int A, B; is >> A >> B; E[A].insert(B); E[B].insert(A); } // end i vis.resize(N, false); if (M % 2) { cout << -1 << endl; return; } make_spanning(1); assert(sE.size() == N - 1); for (auto &&p = sE.begin(); p != sE.end(); p++) { int v, u; tie(v, u) = *p; for (auto &&t : E[u]) { if (t == v) continue; outE[t].insert(u); E[t].erase(u); } // end t E[v].erase(u); E.erase(u); if (outE[u].size() % 2) { outE[u].insert(v); } else { outE[v].insert(u); } } for (auto &&et : outE) { int u = et.first; for (auto &&v : et.second) { cout << u << ' ' << v << endl; } // end v } // end et } }; int main(int argc, char *argv[]) { cin.tie(nullptr); ios::sync_with_stdio(false); cout << setprecision(16) << scientific; #ifdef DEBUG string test_cases = "test_EvenDegrees.txt"; cerr << test_cases << " -->" << endl; auto fs = fstream(test_cases, fstream::in); int loop = 0; while (fs) { loop++; cout << '#' << loop << "#------\n"; solver(fs, cout).run(); } if (loop <= 1) { cout << "===" << endl; while (cin) solver(cin, cout).run(); } #else solver(cin, cout).run(); #endif return 0; }
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdint> #include <deque> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <regex> #include <set> #include <stack> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using namespace std; using ll = long long; using ull = unsigned long long; constexpr ll INF = 1'000'000'000'000'000'000; namespace utils { #define ALL(x) begin(x), end(x) #define rALL(x) rbegin(x), rend(x) template <class T, class Compare> using p_queue = priority_queue<T, vector<T>, Compare>; template <class T> using min_queue = p_queue<T, greater<T>>; template <class T> using max_queue = p_queue<T, less<T>>; template <class T> bool min_update(T &X, const T &A) { if (X > A) { X = A; return true; } return false; } template <class T> bool max_update(T &X, const T &A) { if (X < A) { X = A; return true; } return false; } using V_Set = unordered_set<int>; using E_Set = unordered_map<int, V_Set>; ll operator"" _64(unsigned long long x) { return ll(x); } ull operator"" _64u(unsigned long long x) { return ull(x); } template <class T> vector<T> make_vector(int n, T t) { return vector<T>(n, t); } template <class... Ts> auto make_vector(int n, Ts... ts) { return vector<decltype(make_vector(ts...))>(n, make_vector(ts...)); } template <class T> ostream &operator<<(ostream &os, const vector<T> &v) { for (auto &&x : v) { os << x << ' '; } cout << endl; return os; } } // namespace utils using namespace utils; class solver { istream &is; ostream &os; E_Set outE, E; ll N, M; vector<bool> vis; vector<pair<int, int>> sE; public: solver(istream &I, ostream &O) : is(I), os(O) {} void make_spanning(int v) { vis[v] = true; for (auto &&u : E[v]) { if (vis[u]) { continue; } make_spanning(u); sE.emplace_back(v, u); } // end u } void run() { is >> N >> M; if (!is) return; for (int i = 0; i < M; ++i) { int A, B; is >> A >> B; E[A].insert(B); E[B].insert(A); } // end i vis.resize(N + 1, false); if (M % 2) { cout << -1 << endl; return; } make_spanning(1); assert(sE.size() == N - 1); for (auto &&p = sE.begin(); p != sE.end(); p++) { int v, u; tie(v, u) = *p; for (auto &&t : E[u]) { if (t == v) continue; outE[t].insert(u); E[t].erase(u); } // end t E[v].erase(u); E.erase(u); if (outE[u].size() % 2) { outE[u].insert(v); } else { outE[v].insert(u); } } for (auto &&et : outE) { int u = et.first; for (auto &&v : et.second) { cout << u << ' ' << v << endl; } // end v } // end et } }; int main(int argc, char *argv[]) { cin.tie(nullptr); ios::sync_with_stdio(false); cout << setprecision(16) << scientific; #ifdef DEBUG string test_cases = "test_EvenDegrees.txt"; cerr << test_cases << " -->" << endl; auto fs = fstream(test_cases, fstream::in); int loop = 0; while (fs) { loop++; cout << '#' << loop << "#------\n"; solver(fs, cout).run(); } if (loop <= 1) { cout << "===" << endl; while (cin) solver(cin, cout).run(); } #else solver(cin, cout).run(); #endif return 0; }
replace
107
108
107
108
0
p02976
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define BUF 1e5 #define INF 1 << 30 constexpr ll mod = 1e9 + 7; using namespace std; ll A, B, C, D, G, H, N, M, L, K, P, Q, R, W, X, Y, Z; string S, T; ll ans = 0; void dfs(int node, vector<vector<int>> &tree, vector<int> &parent, vector<int> &out) { int p = parent[node]; if (tree[node].size() == 1) { if (out[node] == 0) { cout << p + 1 << " " << node + 1 << endl; out[p] = (++out[p]) % 2; } else { cout << node + 1 << " " << p + 1 << endl; out[node] = (++out[node]) % 2; } } else { for (int adj : tree[node]) { if (adj == p) continue; dfs(adj, tree, parent, out); } if (node != 0) { if (out[node] == 0) { cout << p + 1 << " " << node + 1 << endl; out[p] = (++out[p]) % 2; } else { cout << node + 1 << " " << p + 1 << endl; out[node] = (++out[node]) % 2; } } } } int main() { cin >> N >> M; vector<vector<int>> g(N); for (int i = 0; i < M; i++) { int u, v; cin >> u >> v; u--, v--; g[u].push_back(v); g[v].push_back(u); } if (M % 2 != 0) { cout << -1 << endl; return 0; } vector<int> flag(N, 0); vector<int> out(N, 0); vector<vector<int>> tree(N); vector<int> parent(N); set<pair<int, int>> set; queue<int> q; q.push(0); parent[0] = -1; while (!q.empty()) { int now = q.front(); q.pop(); int p = parent[now]; for (int adj : g[now]) { if (adj == p) continue; if (flag[adj]) { set.insert({min(now, adj), max(now, adj)}); continue; } flag[adj] = 1; q.push(adj); parent[adj] = now; tree[now].push_back(adj); tree[adj].push_back(now); } } for (auto edge : set) { int u = edge.first; int v = edge.second; cout << u + 1 << " " << v + 1 << endl; out[u] = (++out[u]) % 2; } dfs(0, tree, parent, out); }
#include <bits/stdc++.h> #define ll long long #define BUF 1e5 #define INF 1 << 30 constexpr ll mod = 1e9 + 7; using namespace std; ll A, B, C, D, G, H, N, M, L, K, P, Q, R, W, X, Y, Z; string S, T; ll ans = 0; void dfs(int node, vector<vector<int>> &tree, vector<int> &parent, vector<int> &out) { int p = parent[node]; if (tree[node].size() == 1 && node != 0) { if (out[node] == 0) { cout << p + 1 << " " << node + 1 << endl; out[p] = (++out[p]) % 2; } else { cout << node + 1 << " " << p + 1 << endl; out[node] = (++out[node]) % 2; } } else { for (int adj : tree[node]) { if (adj == p) continue; dfs(adj, tree, parent, out); } if (node != 0) { if (out[node] == 0) { cout << p + 1 << " " << node + 1 << endl; out[p] = (++out[p]) % 2; } else { cout << node + 1 << " " << p + 1 << endl; out[node] = (++out[node]) % 2; } } } } int main() { cin >> N >> M; vector<vector<int>> g(N); for (int i = 0; i < M; i++) { int u, v; cin >> u >> v; u--, v--; g[u].push_back(v); g[v].push_back(u); } if (M % 2 != 0) { cout << -1 << endl; return 0; } vector<int> flag(N, 0); vector<int> out(N, 0); vector<vector<int>> tree(N); vector<int> parent(N); set<pair<int, int>> set; queue<int> q; q.push(0); parent[0] = -1; while (!q.empty()) { int now = q.front(); q.pop(); int p = parent[now]; for (int adj : g[now]) { if (adj == p) continue; if (flag[adj]) { set.insert({min(now, adj), max(now, adj)}); continue; } flag[adj] = 1; q.push(adj); parent[adj] = now; tree[now].push_back(adj); tree[adj].push_back(now); } } for (auto edge : set) { int u = edge.first; int v = edge.second; cout << u + 1 << " " << v + 1 << endl; out[u] = (++out[u]) % 2; } dfs(0, tree, parent, out); }
replace
13
14
13
14
0
p02976
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; vector<vector<int>> graph; vector<int> degree; vector<int> depth; vector<pair<int, int>> ans; void DFS(int v, int previous_v) { for (int adjacent : graph[v]) { if (adjacent == previous_v) continue; if (depth[adjacent] == -1) { // just dive down depth[adjacent] = depth[v] + 1; DFS(adjacent, v); } else { if (depth[adjacent] > depth[v]) { ans.push_back({v, adjacent}); degree[v] += 1; } } } if (previous_v == -1) return; if (previous_v != -1) { if (degree[v] % 2 == 1) { // then use (v --> previous_v) to make degree[v] even ans.push_back({v, previous_v}); degree[v] += 1; } else { // degree[v] % 2 == 0 ans.push_back({previous_v, v}); degree[previous_v] += 1; } } } int main() { int n, m; cin >> n >> m; graph.resize(m); degree.resize(n); depth.assign(n, -1); for (int i = 0; i < m; i++) { int a, b; cin >> a >> b; a -= 1; b -= 1; graph[a].push_back(b); graph[b].push_back(a); } if (m % 2 == 1) { cout << -1 << endl; return 0; } depth[0] = 0; DFS(0, -1); for (auto x : ans) { cout << x.first + 1 << " " << x.second + 1 << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; vector<vector<int>> graph; vector<int> degree; vector<int> depth; vector<pair<int, int>> ans; void DFS(int v, int previous_v) { for (int adjacent : graph[v]) { if (adjacent == previous_v) continue; if (depth[adjacent] == -1) { // just dive down depth[adjacent] = depth[v] + 1; DFS(adjacent, v); } else { if (depth[adjacent] > depth[v]) { ans.push_back({v, adjacent}); degree[v] += 1; } } } if (previous_v == -1) return; if (previous_v != -1) { if (degree[v] % 2 == 1) { // then use (v --> previous_v) to make degree[v] even ans.push_back({v, previous_v}); degree[v] += 1; } else { // degree[v] % 2 == 0 ans.push_back({previous_v, v}); degree[previous_v] += 1; } } } int main() { int n, m; cin >> n >> m; graph.resize(n); degree.resize(n); depth.assign(n, -1); for (int i = 0; i < m; i++) { int a, b; cin >> a >> b; a -= 1; b -= 1; graph[a].push_back(b); graph[b].push_back(a); } if (m % 2 == 1) { cout << -1 << endl; return 0; } depth[0] = 0; DFS(0, -1); for (auto x : ans) { cout << x.first + 1 << " " << x.second + 1 << endl; } return 0; }
replace
42
43
42
43
0
p02976
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; struct edge { int to, next, ok; } e[N]; int n, m, good = 1, h[N]; int visited[N], check[N]; void add(int u, int v) { e[++good] = (edge){v, h[u], 0}; h[u] = good; } void dfs(int u, int p) { visited[u] = ++*visited; for (int i = h[u]; i; i = e[i].next) { if (i ^ p ^ 1) { if (!visited[e[i].to]) { dfs(e[i].to, i); if (check[e[i].to] & 1) { e[i].ok = -1; e[i ^ 1].ok = 1; check[e[i].to] ^= 1; } else { e[i].ok = 1; e[i ^ 1].ok = -1; check[u] ^= 1; } } else if (visited[e[i].to] < visited[u]) { e[i].ok = 1; e[i ^ 1].ok = -1; check[u] ^= 1; } } } } int main() { cin >> n >> m; for (int i = 1; i <= m; i++) { int u, v; cin >> u >> v; add(u, v); add(v, u); } for (int i = 1; i <= n; i++) { if (!visited[i]) dfs(i, 0); } for (int i = 1; i <= n; i++) { if (check[i]) { cout << "-1"; return 0; } } for (int i = 1; i <= n; i++) { for (int j = h[i]; j; j = e[j].next) { if (e[j].ok == 1) { cout << i << " " << e[j].to << endl; } } } }
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; struct edge { int to, next, ok; } e[N]; int n, m, good = 1, h[N]; int visited[N], check[N]; void add(int u, int v) { e[++good] = (edge){v, h[u], 0}; h[u] = good; } void dfs(int u, int p) { visited[u] = ++*visited; for (int i = h[u]; i; i = e[i].next) { if (i ^ p ^ 1) { if (!visited[e[i].to]) { dfs(e[i].to, i); if (check[e[i].to] & 1) { e[i].ok = -1; e[i ^ 1].ok = 1; check[e[i].to] ^= 1; } else { e[i].ok = 1; e[i ^ 1].ok = -1; check[u] ^= 1; } } else if (visited[e[i].to] < visited[u]) { e[i].ok = 1; e[i ^ 1].ok = -1; check[u] ^= 1; } } } } int main() { cin >> n >> m; for (int i = 1; i <= m; i++) { int u, v; cin >> u >> v; add(u, v); add(v, u); } for (int i = 1; i <= n; i++) { if (!visited[i]) dfs(i, 0); } for (int i = 1; i <= n; i++) { if (check[i]) { cout << "-1"; return 0; } } for (int i = 1; i <= n; i++) { for (int j = h[i]; j; j = e[j].next) { if (e[j].ok == 1) { cout << i << " " << e[j].to << endl; } } } }
replace
2
3
2
3
0
p02976
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define N 10005 int n, m, fa[N], out[N]; vector<int> g[N]; inline int Find(int x) { return x == fa[x] ? x : fa[x] = Find(fa[x]); } inline void dfs(int x, int fa) { for (int i = 0; i < g[x].size(); i++) { int v = g[x][i]; if (v == fa) continue; dfs(v, x); if (out[v] & 1) printf("%d %d\n", v, x); else { out[x]++; printf("%d %d\n", x, v); } } return; } int main() { scanf("%d%d", &n, &m); if (m & 1) { printf("-1"); return 0; } for (int i = 1; i <= n; i++) fa[i] = i; for (int i = 1; i <= m; i++) { int u, v; scanf("%d%d", &u, &v); if (Find(u) != Find(v)) { g[u].push_back(v); g[v].push_back(u); fa[Find(u)] = Find(v); } else { out[v]++; printf("%d %d\n", v, u); } } dfs(1, 0); return 0; }
#include <bits/stdc++.h> using namespace std; #define N 100005 int n, m, fa[N], out[N]; vector<int> g[N]; inline int Find(int x) { return x == fa[x] ? x : fa[x] = Find(fa[x]); } inline void dfs(int x, int fa) { for (int i = 0; i < g[x].size(); i++) { int v = g[x][i]; if (v == fa) continue; dfs(v, x); if (out[v] & 1) printf("%d %d\n", v, x); else { out[x]++; printf("%d %d\n", x, v); } } return; } int main() { scanf("%d%d", &n, &m); if (m & 1) { printf("-1"); return 0; } for (int i = 1; i <= n; i++) fa[i] = i; for (int i = 1; i <= m; i++) { int u, v; scanf("%d%d", &u, &v); if (Find(u) != Find(v)) { g[u].push_back(v); g[v].push_back(u); fa[Find(u)] = Find(v); } else { out[v]++; printf("%d %d\n", v, u); } } dfs(1, 0); return 0; }
replace
2
3
2
3
0
p02976
C++
Runtime Error
#pragma GCC optimize("Ofast") #pragma GCC optimize("no-stack-protector") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fast-math") #pragma GCC target("sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native") #include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <stdio.h> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; template <typename T> void uin(T &a, T b) { if (b < a) { a = b; } } template <typename T> void uax(T &a, T b) { if (b > a) { a = b; } } #define int long long #define ghost signed #define left left228 #define right right228 #define prev prev228 #define list list228 const int N = 100 * 1000 + 228; namespace DSU { int p[N], sz[N]; void init(int n) { for (int i = 1; i <= n; ++i) { p[i] = i; sz[i] = 1; } } int getp(int v) { if (v == p[v]) return v; p[v] = getp(p[v]); return p[v]; } bool join(int u, int v) { u = getp(u); v = getp(v); if (u == v) return 0; if (sz[u] < sz[v]) { p[u] = v; sz[v] += sz[u]; } else { p[v] = u; sz[u] += sz[v]; } return 1; } }; // namespace DSU vector<int> g[N]; vector<pair<int, int>> ans; int deg[N]; void dfs(int v, int par = -1) { for (int to : g[v]) { if (to != par) dfs(to, v); } if (deg[v]) { ans.emplace_back(v, par); } else { if (par != -1) { ans.emplace_back(par, v); deg[par] ^= 1; } } } int a[100]; ghost main() { ios_base::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; if (m & 1) { cout << -1 << '\n'; return 0; } DSU::init(n); for (int i = 0; i < m; ++i) { int u, v; cin >> u >> v; if (!DSU::join(u, v)) { g[u].push_back(v); g[v].push_back(u); } else { ans.emplace_back(u, v); deg[u] ^= 1; } } dfs(1); for (auto p : ans) cout << p.first << ' ' << p.second << '\n'; return 0; } // kek ;
#pragma GCC optimize("Ofast") #pragma GCC optimize("no-stack-protector") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fast-math") #pragma GCC target("sse,sse2,sse3,ssse3,popcnt,abm,mmx,tune=native") #include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <stdio.h> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; template <typename T> void uin(T &a, T b) { if (b < a) { a = b; } } template <typename T> void uax(T &a, T b) { if (b > a) { a = b; } } #define int long long #define ghost signed #define left left228 #define right right228 #define prev prev228 #define list list228 const int N = 100 * 1000 + 228; namespace DSU { int p[N], sz[N]; void init(int n) { for (int i = 1; i <= n; ++i) { p[i] = i; sz[i] = 1; } } int getp(int v) { if (v == p[v]) return v; p[v] = getp(p[v]); return p[v]; } bool join(int u, int v) { u = getp(u); v = getp(v); if (u == v) return 0; if (sz[u] < sz[v]) { p[u] = v; sz[v] += sz[u]; } else { p[v] = u; sz[u] += sz[v]; } return 1; } }; // namespace DSU vector<int> g[N]; vector<pair<int, int>> ans; int deg[N]; void dfs(int v, int par = -1) { for (int to : g[v]) { if (to != par) dfs(to, v); } if (deg[v]) { ans.emplace_back(v, par); } else { if (par != -1) { ans.emplace_back(par, v); deg[par] ^= 1; } } } int a[100]; ghost main() { ios_base::sync_with_stdio(false); cin.tie(0); int n, m; cin >> n >> m; if (m & 1) { cout << -1 << '\n'; return 0; } DSU::init(n); for (int i = 0; i < m; ++i) { int u, v; cin >> u >> v; if (DSU::join(u, v)) { g[u].push_back(v); g[v].push_back(u); } else { ans.emplace_back(u, v); deg[u] ^= 1; } } dfs(1); for (auto p : ans) cout << p.first << ' ' << p.second << '\n'; return 0; } // kek ;
replace
114
115
114
115
0