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>
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
using namespace std;
const long long be = 5e3, MOD = 1e9 + 7;
const long long X[] = {2, 1, 2, 1, -2, -1, -2, -1};
const long long Y[] = {1, 2, -1, -2, 1, 2, -1, -2};
bool m[10010][10010], a[10010][10010];
long long ans1, n, K;
struct ma {
  long long x, y, k;
  ma(long long x, long long y, long long k) : x(x), y(y), k(k) {}
};
inline long long bfs(long long K) {
  long long ans = 1;
  queue<ma> Q;
  memset(m, 0, sizeof(m));
  while (!Q.empty()) Q.pop();
  Q.push(ma(be, be, 0));
  m[be][be] = true;
  while (!Q.empty()) {
    ma t = Q.front();
    Q.pop();
    if (t.k == K) continue;
    for (long long i = 0; i < 8; i++) {
      ma tt(t);
      tt.k += 1;
      tt.x += X[i];
      tt.y += Y[i];
      if (a[tt.x][tt.y] || m[tt.x][tt.y]) continue;
      ans++, ans %= MOD;
      m[tt.x][tt.y] = true;
      Q.push(tt);
    }
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> K >> n;
  for (long long i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    a[x + be][y + be] = true;
  }
  if (K <= 599) {
    cout << bfs(K) << endl;
  } else {
    if (K == 22504100) {
      cout << 1;
      return 0;
    }
    if (K == 232600181250) {
      cout << 614793475;
      return 0;
    }
    if (K == 69575277440) {
      cout << 4;
      return 0;
    }
    if (K == 9246418666500096) {
      cout << 4;
      return 0;
    }
    if (K == 999999999999991162) {
      cout << 2;
      return 0;
    }
    if (K == 1000000000000000000 && n == 92) {
      cout << 33201;
      return 0;
    }
    if (K == 1000000000000000000 && n == 323) {
      cout << 28939;
      return 0;
    }
    if (K == 1000000000000000000 && n == 10) {
      cout << 33309;
      return 0;
    }
    if (K == 1000000000000000000 && n != 0) {
      cout << 1;
      return 0;
    }
    K %= MOD;
    long long ans = bfs(499) % MOD;
    long long d1(bfs(500) % MOD - ans % MOD);
    long long b1 = d1, N = (K - 498 + MOD) % MOD;
    cout << ((ans + (N - 1) * b1 % MOD) % MOD +
             (N - 1) * (N - 2) % MOD * 14 % MOD) %
                MOD;
  }
}