#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
bool Max(T1 &a, T2 b) {
  return a < b ? a = b, 1 : 0;
}
template <typename T1, typename T2>
bool Min(T1 &a, T2 b) {
  return a > b ? a = b, 1 : 0;
}
template <int MOD>
struct ModInt {
  unsigned x;
  ModInt() : x(0) {}
  ModInt(signed sig) : x(sig) {}
  ModInt(signed long long sig) : x(sig % MOD) {}
  int get() const { return (int)x; }
  ModInt pow(unsigned p) {
    ModInt res = 1, a = *this;
    while (p) {
      if (p & 1) res *= a;
      a *= a;
      p >>= 1;
    }
    return res;
  }
  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.pow(MOD - 2); }
  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; }
};
const int N = 52, M = 100;
ModInt<1000000007> f[N][N], f2[N][N];
ModInt<1000000007> invf[N];
ModInt<1000000007> C(ModInt<1000000007> n, int k) {
  ModInt<1000000007> ret = invf[k];
  for (int i = 0; i < (k); ++i) {
    ret *= n - i;
  }
  return ret;
}
void solve() {
  int n, m;
  cin >> n >> m;
  invf[0] = 1;
  for (int i = 1; i <= (n); ++i) invf[i] = invf[i - 1] * i;
  invf[n] = (ModInt<1000000007>)1 / invf[n];
  for (int i = n - 1; i >= (1); --i) invf[i] = invf[i + 1] * (i + 1);
  f[0][1] = 1;
  for (int i = 1; i <= (n); ++i)
    for (int j = 1; j <= (i + 1); ++j) {
      for (int ltn = 0; ltn <= (i - 1); ++ltn)
        for (int lm = j; lm <= (ltn + 1); ++lm)
          if (f[ltn][lm].x)
            for (int rm = j; rm <= (lm > j ? j : i - ltn); ++rm) {
              f2[i][j] += f[ltn][lm] * f[i - 1 - ltn][rm];
            }
      if (f2[i][j].x) {
        for (int i2 = n; i2 >= (0); --i2)
          for (int j2 = i2 + 1; j2 >= (1); --j2)
            for (int cnt = 1; i2 + cnt * i <= n; cnt++)
              f[i2 + cnt * i][j2 + cnt * j] +=
                  f[i2][j2] * C(f2[i][j] + cnt - 1, cnt);
      }
    }
  cout << f[n][m].x << '\n';
}
void init() {}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.setf(ios::fixed);
  cout.precision(20);
  init();
  int TC = 1;
  for (int TI = 1; TI <= (TC); ++TI) {
    solve();
  }
  return 0;
}
