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;
const int N = 1500;
const int M = N * N * 4;
const long long p = 1000000007;
int d[2 * N][2 * N];
bool ok[2 * N][2 * N];
pair<int, int> o[M];
long long k, ans;
int n, b, e;
int dx[8] = {1, 2, 2, 1, -1, -2, -2, -1};
int dy[8] = {2, 1, -1, -2, -2, -1, 1, 2};
long long calc(int w) {
  e = b = 0;
  for (int i = -N + 1; i < N; i++)
    for (int j = -N + 1; j < N; j++) d[i + N][j + N] = 1 << 20;
  o[b++] = make_pair(0, 0);
  d[0 + N][0 + N] = 0;
  while (b != e) {
    pair<int, int> a = o[e++];
    if (e == M) e = 0;
    if (d[a.first + N][a.second + N] == w) continue;
    for (int t = 0; t < (int)8; ++t) {
      if (d[a.first + dx[t] + N][a.second + dy[t] + N] >
              d[a.first + N][a.second + N] + 1 &&
          ok[a.first + dx[t] + N][a.second + dy[t] + N]) {
        d[a.first + dx[t] + N][a.second + dy[t] + N] =
            d[a.first + N][a.second + N] + 1;
        o[b++] = make_pair(a.first + dx[t], a.second + dy[t]);
        if (b == M) b = 0;
      }
    }
  }
  long long ans = 0;
  for (int i = -N + 1; i < N; i++)
    for (int j = -N + 1; j < N; j++)
      if (d[i + N][j + N] < (1 << 20)) ans++;
  return ans;
}
int main() {
  memset(ok, true, sizeof ok);
  scanf("%I64d%d", &k, &n);
  long long w = 200;
  w = min(k, w);
  for (int i = 0; i < (int)n; ++i) {
    int x, y;
    scanf("%d%d", &x, &y);
    ok[x + N][y + N] = false;
  }
  long long ans = calc(w);
  long long ans2 = calc(w + 1);
  long long add = ans2 - ans;
  if (ans < 100) {
    printf("%I64d\n", ans);
    return 0;
  }
  k -= w;
  k %= p;
  k--;
  long long rez =
      (((((2 * add + 28 * k) % p) * (k + 1)) % p) * ((p + 1) / 2)) % p;
  cerr << "ans"
       << " = " << ans << endl;
  printf("%I64d\n", (ans + rez) % p);
  return 0;
}