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;
bool arr[6001][6001];
const long long u[] = {1, 1, 2, 2, -1, -1, -2, -2},
                v[] = {2, -2, 1, -1, 2, -2, 1, -1};
struct node {
  long long x, y;
  long long step;
  inline bool pc() {
    if (arr[x + 3000][y + 3000]) return 1;
    return 0;
  }
  inline void in() { arr[x + 3000][y + 3000] = 1; }
};
bool ppp[21][21];
inline bool check(node p) {
  if (abs(p.x) > 10 || abs(p.y) > 10) return 1;
  if (ppp[p.x + 10][p.y + 10]) return 0;
  return 1;
}
inline long long calc(long long from, long long delta, long long tot) {
  long long last =
      (((tot - 1) % 1000000007) * delta % 1000000007 + from) % 1000000007;
  if (tot & 1)
    return (from + last) * 500000004 % 1000000007 * (tot % 1000000007) %
           1000000007;
  else
    return (from + last) % 1000000007 * ((tot / 2) % 1000000007) % 1000000007;
}
long long ans = 1;
long long k;
queue<node> q;
inline long long bfs() {
  node old, nxt;
  long long now, delta, last_delta;
  now = 0;
  delta = 0;
  last_delta = -1;
  long long ddd = 0, lddd;
  long long vvv = 0;
  while (q.size()) {
    old = q.front();
    q.pop();
    if (old.step != now) {
      now++;
      lddd = ddd;
      ddd = delta - last_delta;
      if (now > 500 && lddd == ddd && vvv > 100) {
        k -= old.step;
        return (calc(delta + ddd, ddd, k) + ans) % 1000000007;
      }
      if (lddd == ddd) vvv++;
      last_delta = delta;
      delta = 0;
    }
    if (old.step == k) return ans;
    for (long long i = 0; i < 8; i++) {
      nxt = old;
      nxt.x += u[i];
      nxt.y += v[i];
      nxt.step++;
      if (check(nxt) == 0) continue;
      if (nxt.pc()) continue;
      nxt.in();
      ans++;
      delta++;
      q.push(nxt);
    }
  }
  return ans;
}
inline void init() {
  q.push((node){0, 0, 0});
  long long n;
  (node){0, 0, 0}.in();
  scanf("%lld%lld", &k, &n);
  for (long long i = 1; i <= n; i++) {
    long long x, y;
    scanf("%lld%lld", &x, &y);
    ppp[x + 10][y + 10] = 1;
  }
}
signed main() {
  init();
  cout << bfs();
}