#include <bits/stdc++.h>
template <int MOD>
struct Integral {
  int v_ = 0;
  template <typename T>
  Integral(T v) : v_(norm(v)) {
    static_assert(std::is_integral<T>::value, "input should be an integral.");
  }
  Integral() = default;
  ~Integral() = default;
  template <typename T>
  T norm(T v) const {
    if (v >= MOD) v -= MOD;
    if (v < 0) v += MOD;
    if (v >= MOD || v < 0) v = (v % MOD + MOD) % MOD;
    return v;
  }
  int val() const { return v_; }
  Integral operator+(const Integral& rhs) const {
    return Integral(val() + rhs.val());
  }
  Integral operator-(const Integral& rhs) const {
    return Integral(val() - rhs.val());
  }
  Integral operator*(const Integral& rhs) const {
    return Integral(val() * 1LL * rhs.val());
  }
  Integral operator/(const Integral& rhs) const { return *this * rhs.inv(); }
  Integral& operator+=(const Integral& rhs) { return *this = *this + rhs; }
  Integral& operator-=(const Integral& rhs) { return *this = *this - rhs; }
  Integral& operator*=(const Integral& rhs) { return *this = *this * rhs; }
  Integral& operator/=(const Integral& rhs) { return *this = *this / rhs; }
  bool operator==(const Integral& rhs) const { return val() == rhs.val(); }
  bool operator!=(const Integral& rhs) const { return !(*this == rhs); }
  const Integral operator-() const { return Integral(-val()); }
  const Integral operator++() {
    v_ = norm(v_ + 1);
    return *this;
  }
  const Integral operator++(int) {
    Integral ret = *this;
    ++(*this);
    return ret;
  }
  const Integral operator--() {
    v_ = norm(v_ - 1);
    return *this;
  }
  const Integral operator--(int) {
    Integral ret = *this;
    --(*this);
    return ret;
  }
  Integral power(long long b) const {
    long long ret = 1 % MOD, a = v_;
    for (; b; b >>= 1, a = a * a % MOD)
      if (b & 1) ret = ret * a % MOD;
    return ret;
  }
  Integral inv() const { return power(MOD - 2); }
};
template <int MOD>
std::string to_string(const Integral<MOD>& v) {
  return std::string("Int<>{") + std::to_string(v.val()) + "}";
}
template <int MOD, bool kAllowBruteForce = false>
struct Binomial {
  std::vector<Integral<MOD>> factor, inv_factor;
  explicit Binomial(int n = 0) : factor(n + 1), inv_factor(n + 1) {
    factor[0] = 1;
    for (int i = 1; i <= n; ++i) factor[i] = factor[i - 1] * i;
    inv_factor[n] = factor[n].inv();
    for (int i = n; i >= 1; --i) inv_factor[i - 1] = inv_factor[i] * i;
  }
  ~Binomial() = default;
  template <typename T>
  Integral<MOD> operator()(T a, T b) const {
    if (a < b || b < 0) return 0;
    if (a < factor.size()) return factor[a] * inv_factor[b] * inv_factor[a - b];
    if constexpr (!kAllowBruteForce) {
      throw std::out_of_range("Binomial");
    } else {
      b = std::min(b, a - b);
      Integral<MOD> ret = 1;
      for (T i = 1; i <= b; ++i) ret = ret * (a + 1 - i) / i;
      return ret;
    }
  }
};
template <int MOD>
struct PowerTable : public std::vector<Integral<MOD>> {
  PowerTable(int n, const Integral<MOD>& g) {
    static_assert(sizeof(PowerTable) == sizeof(std::vector<Integral<MOD>>), "");
    this->resize(n + 1);
    this->at(0) = 1;
    this->at(1) = g;
    for (int i = 2; i < this->size(); ++i)
      this->at(i) = this->at(i - 1) * this->at(1);
  }
};
const int MOD = 1e9 + 7;
using Mint = Integral<MOD>;
using Binom = Binomial<MOD>;
Binom binom(200000);
const int kN = 200 + 5;
Mint f[kN][1 << 4][1 << 4][kN];
int cnt[1 << 4][1 << 4][2];
Mint coef[1 << 4][1 << 4][13];
bool has(int w, int at) { return w >> at & 1; }
bool valid(int w, int e) {
  for (int i = 0; i < 4; ++i)
    if (has(e, i)) {
      int j = (i + 1) % 4;
      if (has(w, i) || has(w, j) || has(e, j)) return false;
    }
  return true;
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  std::istream& reader = std::cin;
  int n, k;
  reader >> n >> k;
  for (int w = 0; w < 1 << 4; ++w) {
    for (int e = 0; e < 1 << 4; ++e) {
      if (!valid(w, e)) continue;
      f[0][w][e][__builtin_popcount(w) + __builtin_popcount(e)] = 1;
    }
  }
  for (int w = 0; w < 1 << 4; ++w) {
    for (int e = 0; e < 1 << 4; ++e) {
      if (!valid(w, e)) continue;
      for (int j = 0; j < 4; ++j) {
        int k = (j + 1) % 4;
        int r = (j + 3) % 4;
        int tmp = 0;
        if (!has(w, j) && !has(e, r) && !has(e, j)) ++cnt[w][e][0], ++tmp;
        if (!has(w, k) && !has(e, j) && !has(e, k)) ++tmp;
        if (tmp == 2)
          ++cnt[w][e][1];
        else if (tmp == 1)
          ++cnt[w][e][0];
      }
      for (int j = 0; j <= cnt[w][e][1]; ++j) {
        for (int r = 0; r <= (cnt[w][e][1] - j) * 2 + cnt[w][e][0]; ++r) {
          coef[w][e][j + r] += binom(cnt[w][e][1], j) *
                               binom((cnt[w][e][1] - j) * 2 + cnt[w][e][0], r);
        }
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int w = 0; w < 1 << 4; ++w) {
      for (int e = 0; e < 1 << 4; ++e) {
        if (!valid(w, e)) continue;
        for (int c = 0; c <= std::min(k, 12 * i + 4); ++c)
          if (f[i][w][e][c].val()) {
            for (int ww = w;; ww = ww - 1 & w) {
              for (int ee = e;; ee = ee - 1 & e) {
                for (int j = 0; j <= 12 && c + j <= k; ++j) {
                  f[i + 1][ww][ee][c + j] += f[i][w][e][c] * coef[ww][ee][j];
                }
                if (ee == 0) break;
              }
              if (ww == 0) break;
            }
          }
      }
    }
  }
  Mint result = 0;
  for (int w = 0; w < 1 << 4; ++w) {
    for (int e = 0; e < 1 << 4; ++e) {
      result += f[n][w][e][k] * binom.factor[k];
    }
  }
  printf("%d\n", result.val());
}
