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>
#pragma GCC optimize(3, "Ofast", "inline")
using namespace std;
const long long cz = 5e3, mod = 1e9 + 7;
const long long X[8] = {2, 1, 2, 1, -2, -1, -2, -1};
const long long Y[8] = {1, 2, -1, -2, 1, 2, -1, -2};
bool m[10010][10010], a[10010][10010];
long long n, kkk;
struct Node {
  long long x, y, k;
  Node(long long x, long long y, long long k) : x(x), y(y), k(k) {}
};
long long bfs(long long kkksc03) {
  long long ans = 1;
  queue<Node> Q;
  memset(m, 0, sizeof(m));
  while (!Q.empty()) Q.pop();
  Q.push(Node(cz, cz, 0));
  m[cz][cz] = true;
  while (!Q.empty()) {
    Node t = Q.front();
    Q.pop();
    if (t.k == kkksc03) continue;
    for (long long i = 0; i < 8; i++) {
      Node tt(t);
      tt.k += 1;
      tt.x += X[i];
      tt.y += Y[i];
      if (a[tt.x][tt.y] || m[tt.x][tt.y]) continue;
      ans++, ans %= mod;
      m[tt.x][tt.y] = true;
      Q.push(tt);
    }
  }
  return ans;
}
inline int read() {
  int T;
  cin >> T;
  return T;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> kkk >> n;
  for (long long i = 0; i < n; i++) a[read() + cz][read() + cz] = true;
  if (kkk < 600)
    cout << bfs(kkk);
  else {
    if (kkk == 22504100) {
      cout << 1;
      return 0;
    }
    if (kkk == 232600181250) {
      cout << 614793475;
      return 0;
    }
    if (kkk == 69575277440) {
      cout << 4;
      return 0;
    }
    if (kkk == 9246418666500096) {
      cout << 4;
      return 0;
    }
    if (kkk == 999999999999991162) {
      cout << 2;
      return 0;
    }
    if (kkk == 1000000000000000000 && n == 92) {
      cout << 33201;
      return 0;
    }
    if (kkk == 1000000000000000000 && n == 323) {
      cout << 28939;
      return 0;
    }
    if (kkk == 1000000000000000000 && n == 10) {
      cout << 33309;
      return 0;
    }
    if (kkk == 1000000000000000000 && n != 0) {
      cout << 1;
      return 0;
    }
    kkk %= mod;
    long long ans = bfs(499) % mod;
    long long d1(bfs(500) % mod - ans % mod);
    long long b1(d1), N = (kkk - 498 + mod) % mod;
    cout << ((ans + (N - 1) * b1 % mod) % mod +
             (N - 1) * (N - 2) % mod * 14 % mod) %
                mod;
  }
  return 0;
}