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;
const int N = 2000, mod = 1LL * 1000 * 1000 * 1000 + 7;
int d[N][N], cnt[N * 2];
int dx[] = {+1, -1, +1, -1, +2, -2, +2, -2};
int dy[] = {+2, -2, -2, +2, +1, -1, -1, +1};
long long Pow(long long a, long long b) {
  return b ? (b & 1 ? a : 1) % mod * Pow(a * a % mod, b >> 1) % mod : 1;
}
bool vld(int x, int y) { return x >= 0 && y >= 0 && x < N && y < N; }
long long sum(long long n) {
  n %= mod;
  return 1LL * n * (n + 1) % mod * Pow(2, mod - 2) % mod;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  for (int i = 0; i < N; i++)
    for (int j = 0; j < N; j++) d[i][j] = 1 << 30;
  long long k;
  int n;
  cin >> k >> n;
  int x = N / 2, y = N / 2;
  for (int i = 0, a, b; i < n; i++) {
    cin >> a >> b;
    d[x + a][y + b] = 0;
  }
  queue<pair<int, int>> q;
  q.push({x, y}), d[x][y] = 0, cnt[0]++;
  while (q.size()) {
    pair<int, int> f = q.front();
    q.pop();
    int x = f.first, y = f.second;
    for (int i = 0; i < 8; i++) {
      int nx = x + dx[i], ny = y + dy[i];
      if (vld(nx, ny) && d[x][y] + 1 < d[nx][ny] && d[x][y] <= 460)
        q.push({nx, ny}), d[nx][ny] = d[x][y] + 1, cnt[d[nx][ny]]++;
    }
  }
  long long d = cnt[450] - cnt[449];
  long long ans = 0;
  for (int i = 0; i <= 450; i++) {
    (ans += cnt[i]) %= mod;
    if (k == i) return cout << ans << '\n', 0;
  }
  k -= 450;
  long long a = cnt[450];
  (ans += 1LL * k % mod * a % mod) %= mod;
  (ans += 1LL * d % mod * sum(k) % mod) %= mod;
  cout << ans << '\n';
  return 0;
}