#include <bits/stdc++.h>
using namespace std;
using namespace std;
const long long mo = 1000000007;
int n, k;
long long c[15][15];
long long f[210][210][10];
int flag[10][10] =
    {{1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {1, 1, 0, 0, 0, 0, 0, 0, 0, 0},
     {1, 0, 1, 0, 0, 0, 0, 0, 0, 0}, {1, 2, 0, 1, 0, 0, 0, 0, 0, 0},
     {1, 2, 0, 0, 1, 0, 0, 0, 0, 0}, {1, 1, 1, 0, 0, 1, 0, 0, 0, 0},
     {1, 0, 2, 0, 0, 0, 1, 0, 0, 0}, {1, 3, 0, 2, 1, 0, 0, 1, 0, 0},
     {1, 2, 1, 1, 0, 2, 0, 0, 1, 0}, {1, 4, 0, 4, 2, 0, 0, 4, 0, 1}},
    dt1[10] = {12, 9, 6, 6, 6, 3, 0, 3, 0, 0},
    dt2[10] = {4, 2, 1, 1, 0, 0, 0, 0, 0, 0};
int main() {
  f[0][0][0] = 1;
  f[0][1][1] = 4;
  f[0][1][2] = 4;
  f[0][2][3] = 4;
  f[0][2][4] = 2;
  f[0][2][5] = 8;
  f[0][2][6] = 2;
  f[0][3][7] = 4;
  f[0][3][8] = 4;
  f[0][4][9] = 1;
  scanf("%d%d", &n, &k);
  c[0][0] = 1;
  for (int i = 1; i < 15; i++) {
    c[i][0] = 1;
    for (int j = 1; j <= i; j++) c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % mo;
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < 10; j++)
      for (int p = 0; p <= k; p++) {
        if (!f[i][p][j]) continue;
        for (int q = 0; q < 10; q++) {
          if (!flag[j][q]) continue;
          for (int r = 0; p + r <= k && r <= dt2[q]; r++)
            for (int t = 0; r + p + t <= k && t <= dt1[q] - 2 * r; t++)
              (f[i + 1][p + r + t][q] +=
               (f[i][p][j] * c[dt2[q]][r] % mo * c[dt1[q] - 2 * r][t] % mo *
                flag[j][q] % mo)) %= mo;
        }
      }
  long long ans = 0;
  for (int i = 0; i < 10; i++) (ans += f[n][k][i]) %= mo;
  for (int i = 1; i <= k; i++) (ans *= i) %= mo;
  printf("%lld", ans);
}
