#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int size, ncolors;
int ntriangles[5], npairs[5];
int choose[13][13];
int ways[5][13];
long long dp[201][201][5];
void run(int casenr) {
  ntriangles[0] = 6;
  npairs[0] = 0;
  ntriangles[1] = 3;
  npairs[1] = 0;
  ntriangles[2] = 6;
  npairs[2] = 1;
  ntriangles[3] = 9;
  npairs[3] = 2;
  ntriangles[4] = 12;
  npairs[4] = 4;
  for (int i = (0); i <= (12); ++i) {
    choose[i][0] = choose[i][i] = 1;
    for (int j = (1); j < (i); ++j)
      choose[i][j] = choose[i - 1][j - 1] + choose[i - 1][j];
  }
  for (int state = (0); state < (5); ++state)
    for (int k = (0); k <= (ntriangles[state]); ++k) {
      ways[state][k] = 0;
      for (int x = (0); x <= (npairs[state]); ++x)
        if (x <= k && ntriangles[state] - 2 * x >= k - x)
          ways[state][k] += choose[npairs[state]][x] *
                            choose[ntriangles[state] - 2 * x][k - x];
    }
  scanf("%d%d", &size, &ncolors);
  memset(dp, 0, sizeof(dp));
  for (int k = (0); k <= (2); ++k) dp[0][k][0] += choose[2][k];
  for (int k = (0); k <= (1); ++k) dp[0][k][1] += choose[1][k];
  for (int k = (0); k <= (2); ++k) dp[0][k][2] += choose[2][k];
  dp[0][1][2]++;
  for (int k = (0); k <= (3); ++k) dp[0][k][3] += choose[3][k];
  dp[0][1][3] += 2;
  dp[0][2][3] += 2;
  for (int k = (0); k <= (4); ++k) dp[0][k][4] += choose[4][k];
  dp[0][1][4] += 4;
  dp[0][2][4] += 8 + 2;
  dp[0][3][4] += 4;
  for (int i = (1); i <= (size); ++i)
    for (int j = (0); j <= (ncolors); ++j) {
      if (j == 2) ++dp[i][j][0];
      if (j >= 1)
        for (int k = (0); k <= (min(3, j - 1)); ++k)
          dp[i][j][0] += 2 * dp[i - 1][j - 1 - k][1] * ways[1][k];
      for (int k = (0); k <= (min(6, j)); ++k)
        dp[i][j][0] += dp[i - 1][j - k][0] * ways[0][k];
      if (j == 1) ++dp[i][j][1];
      for (int k = (0); k <= (min(3, j)); ++k)
        dp[i][j][1] += dp[i - 1][j - k][1] * ways[1][k];
      if (j == 1) ++dp[i][j][2];
      if (j == 2) ++dp[i][j][2];
      if (j >= 1)
        for (int k = (0); k <= (min(3, j - 1)); ++k)
          dp[i][j][2] += 2 * dp[i - 1][j - 1 - k][1] * ways[1][k];
      for (int k = (0); k <= (min(6, j)); ++k)
        dp[i][j][2] += dp[i - 1][j - k][2] * ways[2][k];
      if (j == 2) dp[i][j][3] += 2;
      if (j == 3) ++dp[i][j][3];
      if (j >= 1)
        for (int k = (0); k <= (min(3, j - 1)); ++k)
          dp[i][j][3] += 2 * dp[i - 1][j - 1 - k][1] * ways[1][k];
      if (j >= 2)
        for (int k = (0); k <= (min(3, j - 2)); ++k)
          dp[i][j][3] += 3 * dp[i - 1][j - 2 - k][1] * ways[1][k];
      if (j >= 1)
        for (int k = (0); k <= (min(6, j - 1)); ++k)
          dp[i][j][3] += 2 * dp[i - 1][j - 1 - k][2] * ways[2][k];
      if (j >= 1)
        for (int k = (0); k <= (min(6, j - 1)); ++k)
          dp[i][j][3] += 1 * dp[i - 1][j - 1 - k][0] * ways[0][k];
      for (int k = (0); k <= (min(9, j)); ++k)
        dp[i][j][3] += dp[i - 1][j - k][3] * ways[3][k];
      if (j == 2) dp[i][j][4] += 2;
      if (j == 3) dp[i][j][4] += 4;
      if (j == 4) ++dp[i][j][4];
      if (j >= 2)
        for (int k = (0); k <= (min(3, j - 2)); ++k)
          dp[i][j][4] += 8 * dp[i - 1][j - 2 - k][1] * ways[1][k];
      if (j >= 3)
        for (int k = (0); k <= (min(3, j - 3)); ++k)
          dp[i][j][4] += 4 * dp[i - 1][j - 3 - k][1] * ways[1][k];
      if (j >= 1)
        for (int k = (0); k <= (min(6, j - 1)); ++k)
          dp[i][j][4] += 4 * dp[i - 1][j - 1 - k][2] * ways[2][k];
      if (j >= 2)
        for (int k = (0); k <= (min(6, j - 2)); ++k)
          dp[i][j][4] += 4 * dp[i - 1][j - 2 - k][2] * ways[2][k];
      if (j >= 2)
        for (int k = (0); k <= (min(6, j - 2)); ++k)
          dp[i][j][4] += 2 * dp[i - 1][j - 2 - k][0] * ways[0][k];
      if (j >= 1)
        for (int k = (0); k <= (min(9, j - 1)); ++k)
          dp[i][j][4] += 4 * dp[i - 1][j - 1 - k][3] * ways[3][k];
      for (int k = (0); k <= (min(12, j)); ++k)
        dp[i][j][4] += dp[i - 1][j - k][4] * ways[4][k];
      for (int state = (0); state < (5); ++state) dp[i][j][state] %= MOD;
    }
  long long ret = dp[size][ncolors][4];
  for (int i = (1); i <= (ncolors); ++i) ret = ret * i % MOD;
  cout << ret;
}
int main() {
  run(1);
  return 0;
}
