#include using namespace std; using ll = long long; using P = pair; #define rep(i, a, b) for(ll i = a; i < b; ++i) #define rrep(i, a, b) for(ll i = a; i >= b; --i) constexpr ll inf = 4e18; struct SetupIO { SetupIO() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(30); } } setup_io; using dd = long double; using vl = vector; using vvl = vector; using vd = vector
; using vvd = vector; ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a%b); } int main(void) { int k, n; cin >> k >> n; ll ans = 0; set s = {13, 17, 19, 23}; if(s.find(k) != s.end()) ans++; ll mul = 16*9*5*7*11; vector dp(mul+1, 0); dp[0] = 1; rep(i, 0, k) { vector ndp(mul+1, 0); rep(j, 1, n+1) { if(mul % j != 0) continue; rep(l, 0, mul) { if(l + mul / j <= mul) ndp[l + mul / j] += dp[l]; } } swap(dp, ndp); } cout << dp[mul] + ans << '\n'; }