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 dx[] = {1, 1, -1, -1, 2, 2, -2, -2}, dy[] = {2, -2, 2, -2, 1, -1, 1, -1};
int a[1000 + 10];
bool used[4 * 1000 + 10][4 * 1000 + 10];
queue<int> q;
void add(int x, int y, int d) {
  if (!used[x][y]) {
    used[x][y] = true;
    a[d]++;
    q.push(x);
    q.push(y);
    q.push(d);
  }
}
int main(void) {
  int N, i, x, y, d;
  long long K;
  cin >> K >> N;
  for ((i) = 0; (i) < (int)(N); (i)++) {
    cin >> x >> y;
    used[2 * 1000 + 5 + x][2 * 1000 + 5 + y] = true;
  }
  add(2 * 1000 + 5, 2 * 1000 + 5, 0);
  while (!q.empty()) {
    x = q.front();
    q.pop();
    y = q.front();
    q.pop();
    d = q.front();
    q.pop();
    if (d < 1000)
      for ((i) = 0; (i) < (int)(8); (i)++) add(x + dx[i], y + dy[i], d + 1);
  }
  long long ans = 0;
  for ((i) = 0; (i) < (int)(1000 + 1); (i)++)
    if (i <= K) ans = (ans + a[i]) % 1000000007ll;
  if (a[1000] > 0 && K > 1000) {
    long long term = (K - 1000) % 1000000007ll;
    long long low = (a[1000] + 28) % 1000000007ll;
    long long high = (a[1000] + 28 * term) % 1000000007ll;
    long long sum = (low + high) % 1000000007ll * term % 1000000007ll *
                    ((1000000007ll + 1) / 2) % 1000000007ll;
    ans = (ans + sum) % 1000000007ll;
  }
  cout << ans << endl;
  return 0;
}