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;
template <class T>
inline void read(T& x) {
  bool fu = 0;
  char c;
  for (c = getchar(); c <= 32; c = getchar())
    ;
  if (c == '-') fu = 1, c = getchar();
  for (x = 0; c > 32; c = getchar()) x = x * 10 + c - '0';
  if (fu) x = -x;
};
template <class T>
inline void read(T& x, T& y) {
  read(x);
  read(y);
}
template <class T>
inline void read(T& x, T& y, T& z) {
  read(x);
  read(y);
  read(z);
}
inline char getc() {
  char c;
  for (c = getchar(); c <= 32; c = getchar())
    ;
  return c;
}
const int D = 2010;
const int L = 4 * D * D;
const int mod = 1000000007;
const int xx = 500;
const int dx[] = {-1, -2, -2, -1, 1, 2, 2, 1};
const int dy[] = {-2, -1, 1, 2, -2, -1, 1, 2};
int n, i, j, k, l, p, t, x, y, x2, y2;
int q[L][2];
int d[D + D][D + D];
int cnt[111111];
bool up(int& x, int y) { return y < x ? x = y, 1 : 0; }
long long K;
long long pow(long long a, long long b, long long c) {
  long long ans = 1;
  for (a %= c; b; b >>= 1, a = a * a % c)
    if (b & 1) ans = ans * a % c;
  return ans;
}
int main() {
  read(K);
  read(n);
  memset(d, 127, sizeof(d));
  for (i = 1; i <= n; i++) read(x, y), d[x + D][y + D] = -1;
  q[1][0] = 0;
  q[1][1] = 0;
  d[0 + D][0 + D] = 0;
  for (i = j = 1; i <= j; i++) {
    x = q[i][0];
    y = q[i][1];
    cnt[d[x + D][y + D]]++;
    if (d[x + D][y + D] < xx)
      for (t = 0; t <= 7; t++) {
        x2 = x + dx[t];
        y2 = y + dy[t];
        if (up(d[x2 + D][y2 + D], d[x + D][y + D] + 1))
          ++j, q[j][0] = x2, q[j][1] = y2;
      }
  }
  long long ans = 0;
  for (i = 0; i <= min(K, 1LL * xx); i++) ans = (ans + cnt[i]) % mod;
  if (K > xx && cnt[xx] > 0) {
    long long D = cnt[xx] + 28, all = (K - xx);
    ans = (ans + 1LL * (D + (D + (all - 1) % mod * 28 % mod)) % mod *
                     (all % mod) % mod * pow(2, mod - 2, mod) % mod) %
          mod;
  }
  if (ans < 0) ans += mod;
  cout << ans << endl;
  return 0;
}