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;
int movi[8] = {1, 1, -1, -1, 2, 2, -2, -2};
int movj[8] = {2, -2, 2, -2, 1, -1, 1, -1};
int mida = 500;
int pasos = 100;
long long int inv2 = 500000004;
long long int modulo = 1000000007;
int main() {
  long long int movimientos, prohibidos;
  cin >> movimientos >> prohibidos;
  vector<vector<int> > t(mida, vector<int>(mida, 0));
  for (int k = 0; k < prohibidos; k++) {
    int i, j;
    cin >> i >> j;
    t[i + mida / 2][j + mida / 2] = 1;
  }
  vector<pair<int, int> > v(1, pair<int, int>(mida / 2, mida / 2));
  t[mida / 2][mida / 2] = 1;
  int totalcasillas = 1;
  int sumacasillas, sumacasillasant;
  for (int pas = 0; pas < movimientos and pas < pasos; pas++) {
    vector<pair<int, int> > nextv;
    sumacasillasant = sumacasillas;
    sumacasillas = 0;
    for (int k = 0; k < int(v.size()); k++) {
      pair<int, int> p = v[k];
      int i = p.first;
      int j = p.second;
      for (int s = 0; s < 8; s++) {
        int nexti = i + movi[s];
        int nextj = j + movj[s];
        if (t[nexti][nextj] == 0) {
          t[nexti][nextj] = 1;
          sumacasillas++;
          nextv.push_back(pair<int, int>(nexti, nextj));
        }
      }
    }
    v = nextv;
    totalcasillas += sumacasillas;
  }
  if (pasos < movimientos) {
    long long int n = (movimientos - pasos) % modulo;
    long long int fijo = sumacasillas;
    long long int anyadido = sumacasillas - sumacasillasant;
    long long int fijosumamos = (fijo * n) % modulo;
    long long int variablesumamos = (((n * (n + 1)) % modulo) * inv2) % modulo;
    variablesumamos = (variablesumamos * anyadido) % modulo;
    totalcasillas = (totalcasillas + fijosumamos + variablesumamos) % modulo;
  }
  cout << totalcasillas << endl;
}