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;
long long ans, t, h, num, z, k;
int i, j, n, x[500], y[500], d[8000000][3], num1, num2, l, mo = 1000000007;
const int q[9] = {0, -2, -2, -1, 1, 2, 2, 1, -1};
const int w[9] = {0, -1, 1, 2, 2, 1, -1, -2, -2};
bool f[4000][4000];
long long power(long long o, long long b) {
  long long a = o, ans = 1;
  while (b) {
    if (b % 2) ans = (ans * a) % mo;
    a = (a * a) % mo;
    b >>= 1;
  }
  return ans;
}
int main() {
  scanf("%I64d%d", &k, &n);
  for (i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  for (i = 1; i <= n; i++) f[x[i] + 2000][y[i] + 2000] = true;
  l = k;
  d[1][1] = 2000;
  d[1][2] = 2000;
  d[1][0] = 0;
  f[2000][2000] = true;
  ans = 1;
  t = 0;
  h = 1;
  num = 502;
  num1 = 1;
  num2 = 1;
  while (t < h) {
    t++;
    int x, y;
    x = d[t][1];
    y = d[t][2];
    if (d[t][0] + 1 <= min(k, num))
      for (i = 1; i <= 8; i++)
        if (!f[x + q[i]][y + w[i]]) {
          h++;
          d[h][1] = x + q[i];
          d[h][2] = y + w[i];
          d[h][0] = d[t][0] + 1;
          f[x + q[i]][y + w[i]] = true;
          if (d[h][0] <= 500) num1++;
          if (d[h][0] <= 501) num2++;
        }
  }
  if (k <= 500)
    printf("%I64d\n", h);
  else {
    t = h - num2 - (num2 - num1);
    h = (h + (k % mo - 502 + mo) % mo * (h - num2)) % mo;
    num = (k % mo - 502) % mo;
    num = num * (k % mo - 501) % mo;
    num = num * power(2, mo - 2) % mo;
    h = (h + (t * num) % mo) % mo;
    printf("%I64d\n", h);
  }
}