#include <bits/stdc++.h>
using namespace std;
const long long Mod = 1e9 + 7;
const int Maxn = 52 + 3;
long long dp[Maxn][Maxn], dp2[Maxn][Maxn], dp3[Maxn][Maxn], dp4[Maxn][Maxn];
vector<pair<int, int> > ord;
long long mul(long long a, long long b) { return (a * b) % Mod; }
long long bin_pow(long long b, long long p) {
  long long res = 1;
  for (long long j = 1, pw = b; j <= p; j <<= 1, pw = mul(pw, pw))
    if (p & j) res = mul(res, pw);
  return res;
}
long long inv(long long x) { return bin_pow(x, Mod - 2); }
long long f[Maxn], iv[Maxn];
long long nCr(long long n, long long r) {
  n += Mod;
  n %= Mod;
  if ((n < r) || (r < 0)) return 0;
  long long res = iv[r];
  for (int i = 0; i < r; i++) res = mul(res, n - i);
  return res;
}
long long solve(long long cn, long long sm) {
  if (cn == 0 && sm == 0) return 1;
  return nCr(cn - 1 + sm, sm);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  f[0] = 1;
  for (int i = 1; i < Maxn; i++) f[i] = mul(f[i - 1], i);
  for (int i = 0; i < Maxn; i++) iv[i] = inv(f[i]);
  long long N = 52;
  for (int i = 1; i <= N; i++)
    for (int j = 1; j <= N; j++) ord.push_back({i, j});
  dp3[0][0] = 1;
  for (auto st : ord) {
    int i = st.first, j = st.second;
    memset(dp4, 0, sizeof dp4);
    for (int cnt = 0; cnt <= N; cnt++) {
      long long nw = solve(dp2[i][j], cnt);
      if (nw == 0) continue;
      for (int n = 0; n + cnt * (i - 2) <= N; n++) {
        for (int m = 0; m + cnt * j <= N; m++) {
          dp4[n + cnt * (i - 2)][m + cnt * j] += mul(nw, dp3[n][m]);
        }
      }
    }
    for (int n = 0; n <= N; n++)
      for (int m = 0; m <= N; m++) dp3[n][m] = dp4[n][m] % Mod;
    if (i < 2 || j < 1)
      dp[i][j] = 0;
    else
      dp[i][j] = dp3[i - 2][j - 1];
    for (auto st2 : ord) {
      if (st2.first == i && st2.second == j) break;
      if (N < i + st2.first - 1) continue;
      (dp2[i + st2.first - 1][min(j, st2.second)] +=
       2ll * dp[i][j] * dp[st2.first][st2.second]) %= Mod;
    }
    if (i + i - 1 <= N) (dp2[i + i - 1][j] += dp[i][j] * dp[i][j]) %= Mod;
  }
  long long n, m;
  cin >> n >> m;
  cout << dp[n + 2][m] << '\n';
  return 0;
}
