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 k;
int n;
int f[302][302];
int g[302][302];
int jz[302][302];
int dx[9] = {0, -1, -1, 1, 1, 2, 2, -2, -2};
int dy[9] = {0, 2, -2, 2, -2, 1, -1, 1, -1};
struct ww {
  int a[4][4];
  inline ww operator*(const ww &b) const {
    ww c;
    memset(c.a, 0, sizeof c.a);
    for (int i = 1; i <= 3; i++)
      for (int j = 1; j <= 3; j++)
        for (int p = 1; p <= 3; p++)
          c.a[i][j] = (c.a[i][j] + a[i][p] * 1ll * b.a[p][j]) % 1000000007;
    return c;
  }
};
inline void Tiao() {
  memset(g, 0, sizeof g);
  for (int i = 1; i <= 300; i++)
    for (int j = 1; j <= 300; j++)
      if (f[i][j]) {
        g[i][j] = 1;
        for (int wph = 1; wph <= 8; wph++)
          if (!jz[i + dx[wph]][j + dy[wph]]) g[i + dx[wph]][j + dy[wph]] = 1;
      }
  for (int i = 1; i <= 300; i++)
    for (int j = 1; j <= 300; j++) f[i][j] = g[i][j];
}
int calc() {
  int res = 0;
  for (int i = 1; i <= 300; i++)
    for (int j = 1; j <= 300; j++) res += f[i][j];
  return res;
}
void __shi(int f1, int f2) {
  long long b = k - 50ll;
  ww a, c;
  memset(c.a, 0, sizeof c.a);
  for (int i = 1; i <= 3; i++) c.a[i][i] = 1;
  memset(a.a, 0, sizeof a.a);
  a.a[1][2] = -1;
  a.a[2][1] = 1;
  a.a[2][2] = 2;
  a.a[3][2] = a.a[3][3] = 1;
  for (; b; b >>= 1, a = a * a)
    if (b & 1) c = c * a;
  ww mb;
  memset(mb.a, 0, sizeof mb.a);
  mb.a[1][1] = f1;
  mb.a[1][2] = f2;
  mb.a[1][3] = 28;
  mb = mb * c;
  printf("%d\n", (mb.a[1][2] + 1000000007) % 1000000007);
}
int main() {
  scanf("%I64d%d", &k, &n);
  if (k == 0) {
    printf("1\n");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    jz[((x) + 120)][((y) + 120)] = 1;
  }
  int pre = 0;
  int now;
  f[((0) + 120)][((0) + 120)] = 1;
  if (k <= 50) {
    for (int i = 1; i <= k; i++) Tiao();
    printf("%d\n", calc());
    return 0;
  }
  int f1, f2;
  for (int i = 1; i <= 50; i++) {
    Tiao();
    if (i == 49) f1 = calc();
    if (i == 50) f2 = calc();
  }
  if (f1 == f2) {
    printf("%d\n", f1);
    return 0;
  }
  __shi(f1, f2);
  return 0;
}