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;
inline int read() {
  int x = 0, l = 1;
  char c = getchar();
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') l = -1;
  for (; c >= '0' && c <= '9'; c = getchar()) x = x * 10 + c - 48;
  return x * l;
}
int V[2005][2005];
const long long mo = 1000000007;
long long k;
int n;
int dx[9] = {0, 1, 1, -1, -1, 2, 2, -2, -2};
int dy[9] = {0, 2, -2, 2, -2, 1, -1, 1, -1};
long long ans[555];
queue<pair<pair<int, int>, int> > q;
inline long long mul(long long a, long long p) {
  long long ans = 0;
  for (; p; p >>= 1, a = (a + a) % mo)
    if (p & 1) ans = (ans + a) % mo;
  return ans;
}
inline void bfs() {
  ans[0] = 1;
  V[(0 + 1001)][(0 + 1001)] = 1;
  q.push(make_pair(make_pair(0, 0), 0));
  while (!q.empty()) {
    int x = q.front().first.first, y = q.front().first.second,
        t = q.front().second;
    q.pop();
    if (t >= 500) break;
    for (int i = 1; i <= 8; i++)
      if (!V[(x + dx[i] + 1001)][(y + dy[i] + 1001)]) {
        int xx = x + dx[i], yy = y + dy[i];
        V[(xx + 1001)][(yy + 1001)] = 1;
        q.push(make_pair(make_pair(xx, yy), t + 1));
        ans[t + 1]++;
      }
  }
}
int main() {
  scanf("%lld %d", &k, &n);
  for (int i = 1; i <= n; i++) {
    int x = read(), y = read();
    V[(x + 1001)][(y + 1001)] = 1;
  }
  bfs();
  long long inc = ans[500] - ans[499], pls = ans[500];
  for (int i = 1; i <= 500; i++) ans[i] = (ans[i] + ans[i - 1]) % mo;
  if (k <= 500)
    printf("%lld\n", ans[k]);
  else
    printf("%lld\n", (ans[500] + mul(k - 500, pls) +
                      mul(mul(mul(k - 499, k - 500), (mo + 1) / 2), inc)) %
                         mo);
  return 0;
}