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;
inline char gc() {
  static char buf[1 << 14], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 14, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline long long read() {
  long long x = 0, f = 1;
  char c = gc();
  for (; !isdigit(c); c = gc()) {
    if (c == '-') f = -1;
    if (c == EOF) return EOF;
  }
  for (; isdigit(c); c = gc()) x = (x << 1) + (x << 3) + (c ^ 48);
  return x * f;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) write(x / 10);
  putchar(x % 10 | 48);
}
const long long N = 510, P = 1e9 + 7;
long long k, n, ans[N], num, inc;
long long dx[] = {1, 1, -1, -1, 2, 2, -2, -2};
long long dy[] = {2, -2, 2, -2, 1, -1, 1, -1};
struct node {
  long long t, x, y;
} x, y;
bool vis[2010][2010];
int main() {
  k = read(), n = read();
  for (long long i = 1; i <= n; ++i) vis[read() + 1000][read() + 1000] = 1;
  queue<node> Q;
  y.t = 0, y.x = y.y = 1000;
  ans[0] = 1;
  vis[1000][1000] = 1;
  Q.push(y);
  while (!Q.empty()) {
    x = Q.front();
    Q.pop();
    for (long long i = 0, xh, xl; i < 8; ++i) {
      xh = x.x + dx[i];
      xl = x.y + dy[i];
      if (!vis[xh][xl] && x.t + 1 <= 500) {
        vis[xh][xl] = 1;
        ++ans[x.t + 1];
        y.t = x.t + 1, y.x = xh, y.y = xl;
        Q.push(y);
      }
    }
  }
  if (k <= 500) {
    for (long long i = 0; i <= k; ++i) num += ans[i];
    return write(num), 0;
  } else {
    long long inc = ans[500] - ans[499];
    for (long long i = 0; i < 500; ++i) num += ans[i];
    k -= 499;
    k %= P;
    write((k * ans[500] % P + num + k * (k - 1) / 2 % P * inc % P) % P);
  }
  return 0;
}