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 <typename T1, typename T2>
inline T1 max(T1 a, T2 b) {
  return a < b ? b : a;
}
template <typename T1, typename T2>
inline T1 min(T1 a, T2 b) {
  return a < b ? a : b;
}
const char lf = '\n';
namespace ae86 {
const int bufl = 1 << 15;
char buf[bufl], *s = buf, *t = buf;
inline int fetch() {
  if (s == t) {
    t = (s = buf) + fread(buf, 1, bufl, stdin);
    if (s == t) return EOF;
  }
  return *s++;
}
inline long long ty() {
  long long a = 0;
  int b = 1, c = fetch();
  while (!isdigit(c)) b ^= c == '-', c = fetch();
  while (isdigit(c)) a = a * 10 + c - 48, c = fetch();
  return b ? a : -a;
}
}  // namespace ae86
using ae86::ty;
const int mo = 1000000007;
template <typename T1, typename T2>
inline T1 ad(T1 &a, T2 b) {
  return a = a + b >= mo ? a + b - mo : a + b;
}
template <typename T1, typename T2>
inline T1 dl(T1 &a, T2 b) {
  return a = a >= b ? a - b : a - b + mo;
}
template <typename T1, typename T2>
inline T1 add(T1 a, T2 b) {
  return a + b >= mo ? a + b - mo : a + b;
}
template <typename T1, typename T2>
inline T1 del(T1 a, T2 b) {
  return a >= b ? a - b : a - b + mo;
}
const int L = 100, N = L + L, _ = N + 7, __ = _ + _;
const int go[2][8] = {{1, 1, -1, -1, 2, 2, -2, -2},
                      {2, -2, 2, -2, 1, -1, 1, -1}};
int mp[__][__] = {0}, tim[__][__] = {0};
long long ans[__];
void bfs(int lim) {
  queue<pair<int, int>> q;
  q.emplace(_, _), tim[_][_] = 1;
  while (!q.empty()) {
    auto [x, y] = q.front();
    q.pop();
    ans[tim[x][y]]++;
    if (tim[x][y] >= lim) continue;
    for (int k = 0; k < 8; k++) {
      int xx = x + go[0][k], yy = y + go[1][k];
      if (xx < 0 || xx >= __ || yy < 0 || yy >= __ || mp[xx][yy] || tim[xx][yy])
        continue;
      tim[xx][yy] = tim[x][y] + 1, q.emplace(xx, yy);
    }
  }
}
int n;
long long m;
int main() {
  ios::sync_with_stdio(0), cout.tie(nullptr);
  m = ty(), n = ty();
  for (int i = 1, a, b; i <= n; i++) a = ty() + _, b = ty() + _, mp[a][b] = 1;
  bfs(L);
  long long sans = 0;
  if (m < L) {
    for (int i = 1; i <= m + 1; i++) ad(sans, ans[i]);
  } else {
    m = (m - L + 2) % mo;
    for (int i = 0; i < L; i++) ad(sans, ans[i]);
    sans = add(add(sans, ans[L] * m % mo),
               (m * (m - 1) / 2) % mo * del(ans[L], ans[L - 1]) % mo);
  }
  cout << sans << lf;
  return 0;
}