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 x[2005 * 2005], y[2005 * 2005], no[25][25], flag[2005][2005];
int n, i, A, X, Y;
long long k, tmp, ans, delta, now;
const int dx[8] = {-2, -1, 1, 2, 2, 1, -1, -2};
const int dy[8] = {1, 2, 2, 1, -1, -2, -2, -1};
const int P = 1000000007;
inline int cheat_for_30() {
  int h = 0, t = 1, ans = 1;
  x[1] = 0;
  y[1] = 0;
  flag[A][A] = 0;
  if (!k) return 1;
  while (h < t) {
    int X = x[++h], Y = y[h], upd = flag[X + A][Y + A] + 1;
    for (int d = 0; d < 8; d++) {
      int xx = X + dx[d], yy = Y + dy[d];
      if (flag[xx + A][yy + A] <= upd) continue;
      flag[xx + A][yy + A] = upd;
      ans++;
      if (upd == 500) delta++;
      if (upd < k) x[++t] = xx, y[t] = yy;
    }
  }
  return ans;
}
inline int cheat_for_fun() {
  if (k == 0) return 1;
  if (k == 1) return 9;
  if (k == 2) return 41;
  if (k == 3) return 109;
  if (k == 4) return 205;
  long long ans = 325, tmp;
  k -= 5;
  if (k & 1)
    tmp = ((k + 1) / 2 % P) * (k % P) % P;
  else
    tmp = (k / 2 % P) * ((k + 1) % P) % P;
  return (ans + k % P * 120 + 28 * tmp % P) % P;
}
int main() {
  scanf("%I64d%d", &k, &n);
  A = 1000;
  memset(flag, 60, sizeof(flag));
  for (i = 1; i <= n; i++) scanf("%d%d", &X, &Y), flag[X + A][Y + A] = -1;
  if (k <= 500) {
    printf("%d", cheat_for_30());
    return 0;
  }
  tmp = k;
  k = 500;
  now = cheat_for_30();
  if (now <= 1000) {
    printf("%d", now);
    return 0;
  }
  k = tmp;
  k -= 500;
  if (k & 1)
    tmp = ((k + 1) / 2 % P) * (k % P) % P;
  else
    tmp = (k / 2 % P) * ((k + 1) % P) % P;
  ans = (now + (k % P * delta % P) + tmp * 28 % P) % P;
  printf("%I64d", ans);
  return 0;
}