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;
int n;
long long k;
int reflag[1250 * 2 + 10][1250 * 2 + 10];
struct node {
  int x, y, z;
  inline node(int x_ = 0, int y_ = 0, int z_ = 0) {
    x = x_, y = y_;
    z = z_;
  }
} Q[4000000 + 10];
const int bx[9] = {0, 1, 1, 2, 2, -1, -1, -2, -2};
const int by[9] = {0, 2, -2, 1, -1, 2, -2, 1, -1};
int D[510];
inline int pow(int a, int b) {
  int nowans = 1;
  for (; b; b >>= 1, a = 1ll * a * a % 1000000007)
    if (b & 1) nowans = 1ll * nowans * a % 1000000007;
  return nowans;
}
int main() {
  scanf("%I64d%d", &k, &n);
  for (int i = 1, x, y; i <= n; i++) {
    scanf("%d%d", &x, &y);
    reflag[x + 1250][y + 1250] = -1;
  }
  int h = 0, l = 1;
  Q[l] = node(1250, 1250, 0);
  reflag[1250][1250] = 1;
  long long tmpk = k;
  k = min(k, 500ll);
  for (; h < l;) {
    ++h;
    if (h >= 4000000) h -= 4000000;
    int x = Q[h].x, y = Q[h].y, z = Q[h].z;
    if (z == k) continue;
    for (int i = 1; i <= 8; i++) {
      int newx = x + bx[i], newy = y + by[i];
      if (newx && newx <= 1250 * 2 && newy && newy <= 1250 * 2) {
        if (reflag[newx][newy] || (!(~reflag[newx][newy]))) continue;
        ++l;
        if (l >= 4000000) l -= 4000000;
        Q[l] = node(newx, newy, z + 1);
        reflag[newx][newy] = 1;
      }
    }
  }
  long long ans = 0;
  for (int i = 0; i <= 1250 * 2; i++)
    for (int j = 0; j <= 1250 * 2; j++) ans += reflag[i][j] == 1;
  for (int i = 1; i <= l; i++) ++D[Q[i].z];
  if (tmpk == k)
    printf("%d\n", ans);
  else {
    long long d = D[k];
    long long delta = D[k] - D[k - 1];
    tmpk -= k;
    tmpk %= 1000000007;
    ans = (ans + d * tmpk % 1000000007 +
           delta * tmpk % 1000000007 * (tmpk + 1) % 1000000007 * 1ll *
               pow(2, 1000000007 - 2) % 1000000007) %
          1000000007;
    printf("%I64d\n", ans);
  }
}