#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int exp(int x, int n) {
  int ret = 1;
  while (n) {
    if (n & 1) ret = 1LL * ret * x % mod;
    x = 1LL * x * x % mod;
    n >>= 1;
  }
  return ret;
}
int inv(int x) { return exp(x, mod - 2); }
int fact[52], invf[52];
int comb(int n, int k) {
  int ret = 1;
  for (int i = 1; i <= k; i++) {
    ret = 1LL * ret * (n + 1 + mod - i) % mod;
  }
  ret = 1LL * ret * invf[k] % mod;
  return ret;
}
int H(int n, int k) { return comb((n + k + mod - 1) % mod, k); }
int N, M;
int dp1(int n, int m, int a, int b);
int cc2[52][52][52];
int dp2(int a, int b, int c) {
  int &ret = cc2[a][b][c];
  if (ret != -1) return ret;
  ret = 0;
  for (int i = 0; i <= a; i++) {
    int j = a - i;
    ret += 1LL * dp1(i, b, 0, 1) * dp1(j, b, 0, 1) % mod;
    ret %= mod;
    for (int k = b + 1; k <= i + 1; k++) {
      ret += 1LL * dp1(i, k, 0, 1) * dp1(j, b, 0, 1) % mod;
      ret %= mod;
    }
    for (int k = b + 1; k <= j + 1; k++) {
      ret += 1LL * dp1(i, b, 0, 1) * dp1(j, k, 0, 1) % mod;
      ret %= mod;
    }
  }
  return ret = H(ret, c);
}
int cc1[52][52][52][52];
int dp1(int n, int m, int a, int b) {
  int &ret = cc1[n][m][a][b];
  if (ret != -1) return ret;
  if (m == 0) return ret = 0;
  if (n == 0) return ret = m == 1;
  if (a >= n) return ret = 0;
  if (b >= m) return ret = dp1(n, m, a + 1, 1);
  ret = 0;
  for (int i = 0; i <= min(n / (a + 1), m / b); i++) {
    ret += 1LL * dp2(a, b, i) * dp1(n - (a + 1) * i, m - b * i, a, b + 1) % mod;
    ret %= mod;
  }
  return ret;
}
int main() {
  fact[0] = 1;
  for (int i = 1; i < 52; i++) {
    fact[i] = 1LL * fact[i - 1] * i % mod;
  }
  for (int i = 0; i < 52; i++) {
    invf[i] = inv(fact[i]);
  }
  cin >> N >> M;
  memset(cc1, -1, sizeof(cc1));
  memset(cc2, -1, sizeof(cc2));
  printf("%d", dp1(N, M, 0, 1));
}
