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>
namespace IO {
inline long long rd_int() {
  register long long f = 1, x = 0;
  char s = getchar();
  while (!isdigit(s)) {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (isdigit(s)) {
    x = (x << 1) + (x << 3) + (s ^ 48);
    s = getchar();
  }
  return x * f;
}
inline void wrt_int(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) wrt_int(x / 10);
  putchar(x % 10 ^ 48);
}
}  // namespace IO
long long n, k;
const long long N = 2010;
bool vis[N][N];
long long ans[N];
namespace bfs_horse {
using namespace std;
using namespace IO;
const long long p = 1e9 + 7;
struct node {
  long long x, y, s;
};
long long dx[] = {1, 2, 2, 1, -1, -2, -2, -1};
long long dy[] = {2, 1, -1, -2, -2, -1, 1, 2};
inline void bfs() {
  queue<node> q;
  vis[1001][1001] = 1;
  q.push((node){1001, 1001, 0});
  ans[0]++;
  while (!q.empty()) {
    node u = q.front();
    q.pop();
    if (k <= 500 && u.s >= k)
      continue;
    else if (u.s >= 500)
      continue;
    for (long long i = 0; i < 8; ++i) {
      long long x = u.x + dx[i], y = u.y + dy[i];
      if (vis[x][y]) continue;
      vis[x][y] = 1;
      ans[u.s + 1]++;
      ans[u.s + 1] %= p;
      q.push((node){x, y, u.s + 1});
    }
  }
}
}  // namespace bfs_horse
namespace cheat_tool {
using namespace IO;
const long long p = 1e9 + 7;
inline long long power(long long a, long long b, long long p) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % p;
    a = (a * a) % p;
    b >>= 1;
  }
  return ans;
}
inline long long inv(long long a, long long p) { return power(a, p - 2, p); }
inline void cheat() {
  long long diff = ans[500] - ans[499];
  long long sum = 0;
  for (long long i = 0; i < 500; ++i) sum += ans[i];
  k -= 499;
  k %= p;
  long long fin = (ans[500] + (diff * (k - 1)) % p) % p;
  long long ret = (((ans[500] + fin) % p * k) % p) * inv(2, p);
  sum = (sum + ret) % p;
  wrt_int(sum);
  putchar('\n');
}
}  // namespace cheat_tool
using namespace IO;
using namespace std;
using namespace bfs_horse;
using namespace cheat_tool;
signed main() {
  k = rd_int();
  n = rd_int();
  for (long long i = 1; i <= n; ++i) {
    long long x = rd_int(), y = rd_int();
    vis[x + 1001][y + 1001] = 1;
  }
  bfs();
  if (k <= 500) {
    long long sum = 0;
    for (long long i = 0; i <= k; ++i) sum += ans[i];
    wrt_int(sum);
    putchar('\n');
  } else
    cheat();
  return 0;
}