#include <bits/stdc++.h>
using namespace std;
const int N = 55;
const int mod = 1e9 + 7;
long long f[N][N], g[N][N], inv[N];
int n, m;
long long Pow(long long a, int x) {
  long long res = 1;
  while (x) {
    if (x & 1) (res *= a) %= mod;
    (a *= a) %= mod;
    x >>= 1;
  }
  return res;
}
int main() {
  for (int i = 1; i < N; ++i) inv[i] = Pow(i, mod - 2);
  cin >> n >> m;
  f[0][1] = 1;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= i + 1; ++j) {
      for (int i1 = 0; i1 <= i - 1; ++i1) {
        for (int j1 = j; j1 <= i1 + 1; ++j1) {
          int i2 = i - 1 - i1;
          for (int j2 = j; j2 <= (j1 == j ? i2 + 1 : j); ++j2) {
            g[i][j] += f[i1][j1] * f[i2][j2];
            g[i][j] %= mod;
          }
        }
      }
      if (g[i][j] == 0) continue;
      for (int k = n - i; k >= 0; --k) {
        for (int l = 1; l <= k + 1; ++l) {
          if (f[k][l] == 0) continue;
          long long tmp = g[i][j];
          for (int p = 1; i * p + k <= n; ++p) {
            f[i * p + k][j * p + l] += f[k][l] * tmp;
            f[i * p + k][j * p + l] %= mod;
            tmp *= g[i][j] + p;
            tmp %= mod;
            tmp *= inv[p + 1];
            tmp %= mod;
          }
        }
      }
    }
  }
  cout << f[n][m] << endl;
}
