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 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() {
  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;
  }
}