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("Ofast")
using namespace std;
template <typename T>
inline bool chkmin(T &x, T y) {
  return x > y ? x = y, 1 : 0;
}
template <typename T>
inline bool chkmax(T &x, T y) {
  return x < y ? x = y, 1 : 0;
}
template <typename T>
inline void read(T &x) {
  char ch = getchar();
  int f = 1;
  x = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  x *= f;
}
template <typename T, typename... Args>
inline void read(T &x, Args &...args) {
  read(x), read(args...);
}
int n, B = 500;
int vis[2050][2050], step[2050][2050];
long long k, ans[2050];
int dir[8][2] = {{1, 2}, {1, -2}, {-1, 2}, {-1, -2},
                 {2, 1}, {2, -1}, {-2, 1}, {-2, -1}};
void bfs() {
  static pair<int, int> q[2050 * 2050];
  int fr = 0, re = 0;
  q[re++] = make_pair(B * 2, B * 2), vis[B * 2][B * 2] = 1;
  while (fr < re) {
    int x = q[fr].first, y = q[fr++].second;
    ans[step[x][y]]++;
    if (step[x][y] == B) continue;
    for (register int i = 0; i <= 7; ++i) {
      int nx = x + dir[i][0], ny = y + dir[i][1];
      if (!vis[nx][ny])
        vis[nx][ny] = 1, step[nx][ny] = step[x][y] + 1,
        q[re++] = make_pair(nx, ny);
    }
  }
}
int main() {
  int x, y;
  read(k, n);
  for (register int i = 1; i <= n; ++i)
    read(x, y), vis[x + B * 2][y + B * 2] = 1;
  bfs();
  long long dlt = ans[B] - ans[B - 1], ff = ans[B];
  for (register int i = 1; i <= B; ++i)
    ans[i] = (ans[i] + ans[i - 1]) % 1000000007;
  if (k <= B)
    cout << ans[k];
  else
    k = (k - B) % 1000000007,
    cout << (ans[B] + ff * k % 1000000007 +
             (1 + k) * k / 2 % 1000000007 * dlt % 1000000007) %
                1000000007;
  return 0;
}