#include <bits/stdc++.h>
long long gi() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) f ^= ch == '-', ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f ? x : -x;
}
int f[51][51], g[51][51], inv[51];
void add(int& a, int b) {
  a = a + b >= 1000000007 ? a + b - 1000000007 : a + b;
}
int main() {
  int n = gi(), m = gi();
  inv[1] = 1;
  for (int i = 2; i <= 50; ++i)
    inv[i] =
        1000000007 - 1ll * inv[1000000007 % i] * (1000000007 / i) % 1000000007;
  f[0][1] = 1;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j < i; ++j)
      for (int c1 = 1; c1 <= i + 1; ++c1)
        for (int c2 = 1; c2 <= i - j; ++c2)
          add(g[i][std::min(c1, c2)],
              1ll * f[j][c1] * f[i - j - 1][c2] % 1000000007);
    for (int j = i + 1; j; --j)
      if (g[i][j])
        for (int k = n; ~k; --k)
          for (int l = k + 1; l; --l)
            if (f[k][l])
              for (int x1 = k + i, x2 = l + j, C = 1, o = 0; x1 <= n;
                   ++o, x1 += i, x2 += j) {
                C = 1ll * C * (g[i][j] + o) % 1000000007 * inv[o + 1] %
                    1000000007;
                add(f[x1][x2], 1ll * f[k][l] * C % 1000000007);
              }
  }
  printf("%d\n", f[n][m]);
  return 0;
}
