Problem: Brian the Rabbit adores chess. Not long ago he argued with Stewie the Rabbit that a knight is better than a king. To prove his point he tries to show that the knight is very fast but Stewie doesn't accept statements without evidence. He constructed an infinite chessboard for Brian, where he deleted several squares to add some more interest to the game. Brian only needs to count how many different board squares a knight standing on a square with coordinates of (0, 0) can reach in no more than k moves. Naturally, it is forbidden to move to the deleted squares.

Brian doesn't very much like exact sciences himself and is not acquainted with programming, that's why he will hardly be able to get ahead of Stewie who has already started solving the problem. Help Brian to solve the problem faster than Stewie.

Input

The first line contains two integers k and n (0 ≤ k ≤ 1018, 0 ≤ n ≤ 440) which are correspondingly the maximal number of moves a knight can make and the number of deleted cells. Then follow n lines, each giving the coordinates of a deleted square in the form (xi, yi) (|xi| ≤ 10, |yi| ≤ 10). All the numbers are integer, the deleted squares are different and it is guaranteed that the square (0, 0) is not deleted.

Please, do not use %lld specificator to read or write 64-bit integers in C++. It is preffered to use cin (also you may use %I64d).

Output

You must print the answer on a single line. As it can be rather long, you should print it modulo 1000000007.

Examples

Input

1 0


Output

9


Input

2 7
-1 2
1 2
2 1
2 -1
1 -2
-1 -2
-2 -1


Output

9

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long modpow(long long a, long long e) {
  if (e == 0) return 1;
  long long x = modpow(a * a % mod, e >> 1);
  return e & 1 ? x * a % mod : x;
}
vector<long long> BerlekampMassey(vector<long long> s) {
  int n = (int)(s).size(), L = 0, m = 0;
  vector<long long> C(n), B(n), T;
  C[0] = B[0] = 1;
  long long b = 1;
  for (int i = 0; i < (n); ++i) {
    ++m;
    long long d = s[i] % mod;
    for (int j = 1; j < (L + 1); ++j) d = (d + C[j] * s[i - j]) % mod;
    if (!d) continue;
    T = C;
    long long coef = d * modpow(b, mod - 2) % mod;
    for (int j = m; j < (n); ++j) C[j] = (C[j] - coef * B[j - m]) % mod;
    if (2 * L > i) continue;
    L = i + 1 - L;
    B = T;
    b = d;
    m = 0;
  }
  C.resize(L + 1);
  C.erase(C.begin());
  for (auto& x : C) x = (mod - x) % mod;
  return C;
}
long long linearRec(vector<long long> S, vector<long long> tr, long long k) {
  int n = (int)(S).size();
  auto combine = [&](vector<long long> a, vector<long long> b) {
    vector<long long> res(n * 2 + 1);
    for (int i = 0; i < (n + 1); ++i)
      for (int j = 0; j < (n + 1); ++j)
        res[i + j] = (res[i + j] + a[i] * b[j]) % mod;
    for (int i = 2 * n; i > n; --i)
      for (int j = 0; j < (n); ++j)
        res[i - 1 - j] = (res[i - 1 - j] + res[i] * tr[j]) % mod;
    res.resize(n + 1);
    return res;
  };
  vector<long long> pol(n + 1), e(pol);
  pol[0] = e[1] = 1;
  for (++k; k; k /= 2) {
    if (k % 2) pol = combine(pol, e);
    e = combine(e, e);
  }
  long long res = 0;
  for (int i = 0; i < (n); ++i) res = (res + pol[i + 1] * S[i]) % mod;
  return res;
}
long long extrapolate(vector<long long> p, long long k) {
  vector<long long> tr = BerlekampMassey(p);
  vector<long long> base = p;
  base.resize(tr.size());
  return linearRec(base, tr, k);
}
int bad[21][21];
const int nax = 1001;
int dist[nax][nax];
const int drow[8] = {1, 1, -1, -1, 2, 2, -2, -2};
const int dcol[8] = {2, -2, 2, -2, 1, -1, 1, -1};
vector<long long> brute(int maxdepth) {
  queue<pair<int, int>> q;
  fill_n((int*)dist, nax * nax, 1e9);
  int off = nax / 2;
  dist[off][off] = 0;
  assert(maxdepth * 2 < off);
  vector<long long> ans(maxdepth + 1);
  ans[0] = 1;
  if (maxdepth) q.emplace(0, 0);
  while (q.size()) {
    auto [row, col] = q.front();
    q.pop();
    int depth = dist[row + off][col + off];
    for (int d = 0; d < 8; d++) {
      int nrow = row + drow[d];
      int ncol = col + dcol[d];
      if (nrow <= 10 && nrow >= -10 && ncol <= 10 && ncol >= -10 &&
          bad[nrow + 10][ncol + 10])
        ;
      else if (dist[nrow + off][ncol + off] == 1e9) {
        dist[nrow + off][ncol + off] = depth + 1;
        ans[depth + 1]++;
        if (depth + 1 < maxdepth) q.emplace(nrow, ncol);
      }
    }
  }
  for (int d = 0; d < maxdepth; d++) (ans[d + 1] += ans[d]) %= mod;
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long k, n;
  cin >> k >> n;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    bad[x + 10][y + 10] = 1;
  }
  cout << extrapolate(brute(200), k) << endl;
}