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;
template <class _T>
inline _T sqr(const _T& x) {
  return x * x;
}
template <class _T>
inline string tostr(const _T& a) {
  ostringstream os("");
  os << a;
  return os.str();
}
const long double PI = 3.1415926535897932384626433832795;
const long double EPS = 1e-11;
const int MAXN = 2048;
const int dx[8] = {1, 2, 2, 1, -1, -2, -2, -1};
const int dy[8] = {2, 1, -1, -2, -2, -1, 1, 2};
long long k;
int n, m;
int d[MAXN][MAXN];
bool w[MAXN][MAXN];
bool u[MAXN][MAXN];
int q[MAXN * MAXN * 2][2];
int c[MAXN];
int mypow(int a, int k, int p) {
  int ans = 1;
  int j = 1;
  while (j <= k) j <<= 1;
  j >>= 1;
  while (j) {
    ans = (long long)ans * ans % p;
    if (j & k) ans = (long long)ans * a % p;
    j >>= 1;
  }
  return ans;
}
int main() {
  cout << setiosflags(ios::fixed) << setprecision(10);
  memset((w), 0, sizeof(w));
  memset((u), 0, sizeof(u));
  m = MAXN / 2;
  cin >> k >> n;
  for (int i = 0; i < (int)(n); i++) {
    int x, y;
    cin >> x >> y;
    w[x + m][y + m] = true;
  }
  int qb = 0;
  int qe = 0;
  q[qe][0] = m;
  q[qe][1] = m;
  qe++;
  u[m][m] = true;
  d[m][m] = 0;
  while (qb != qe) {
    int x = q[qb][0];
    int y = q[qb][1];
    qb++;
    for (int l = 0; l < (int)(8); l++) {
      int xn = x + dx[l];
      int yn = y + dy[l];
      if (xn < 0 || xn >= MAXN || yn < 0 || yn >= MAXN || w[xn][yn] ||
          u[xn][yn])
        continue;
      d[xn][yn] = d[x][y] + 1;
      u[xn][yn] = true;
      q[qe][0] = xn;
      q[qe][1] = yn;
      qe++;
    }
  }
  memset((c), 0, sizeof(c));
  for (int i = 0; i < (int)(MAXN); i++) {
    for (int j = 0; j < (int)(MAXN); j++) {
      if (u[i][j] && d[i][j] < MAXN) {
        c[d[i][j]]++;
      }
    }
  }
  int r = m / 2 - 17;
  if (k <= r) {
    int sum = 0;
    for (int i = 0; i < (int)(k + 1); i++) {
      sum += c[i];
    }
    cout << sum << endl;
  } else {
    int a[10];
    for (int i = 0; i < (int)(10); i++) {
      a[i] = c[r + i];
    }
    int b[10];
    int sum = 0;
    for (int i = 0; i < (int)(r); i++) {
      sum += c[i];
    }
    b[0] = sum;
    for (int i = 0; i < (int)(9); i++) {
      b[i + 1] = a[0];
      for (int j = 0; j < (int)(9 - i); j++) {
        a[j] = a[j + 1] - a[j];
      }
    }
    const int MOD = 1000000007;
    long long ans = 0;
    long long z = (k - (r - 1) + MOD) % MOD;
    long long ff = 120;
    for (int i = 0; i < (int)(6); i++) {
      long long s = b[i];
      int f = 1;
      for (int j = 0; j < (int)(i); j++) {
        s = s * (z - j) % MOD;
        f = f * (j + 1);
      }
      ans = (ans + s * (ff / f)) % MOD;
    }
    ans = (ans * mypow(ff, MOD - 2, MOD)) % MOD;
    ans %= MOD;
    ans += MOD;
    ans %= MOD;
    cout << ans << endl;
  }
  return 0;
}