#include <bits/stdc++.h>
using namespace std;
template <class _T>
inline _T sqr(const _T& x) {
  return x * x;
}
template <class _T>
inline string tostr(const _T& a) {
  ostringstream os("");
  os << a;
  return os.str();
}
const long double PI = 3.1415926535897932384626433832795;
const long double EPS = 1e-11;
const int MAXN = 2048;
const int dx[8] = {1, 2, 2, 1, -1, -2, -2, -1};
const int dy[8] = {2, 1, -1, -2, -2, -1, 1, 2};
long long k;
int n, m;
int d[MAXN][MAXN];
bool w[MAXN][MAXN];
bool u[MAXN][MAXN];
int q[MAXN * MAXN * 2][2];
int c[MAXN];
int mypow(int a, int k, int p) {
  int ans = 1;
  int j = 1;
  while (j <= k) j <<= 1;
  j >>= 1;
  while (j) {
    ans = (long long)ans * ans % p;
    if (j & k) ans = (long long)ans * a % p;
    j >>= 1;
  }
  return ans;
}
int main() {
  cout << setiosflags(ios::fixed) << setprecision(10);
  memset((w), 0, sizeof(w));
  memset((u), 0, sizeof(u));
  m = MAXN / 2;
  cin >> k >> n;
  for (int i = 0; i < (int)(n); i++) {
    int x, y;
    cin >> x >> y;
    w[x + m][y + m] = true;
  }
  int qb = 0;
  int qe = 0;
  q[qe][0] = m;
  q[qe][1] = m;
  qe++;
  u[m][m] = true;
  d[m][m] = 0;
  while (qb != qe) {
    int x = q[qb][0];
    int y = q[qb][1];
    qb++;
    for (int l = 0; l < (int)(8); l++) {
      int xn = x + dx[l];
      int yn = y + dy[l];
      if (xn < 0 || xn >= MAXN || yn < 0 || yn >= MAXN || w[xn][yn] ||
          u[xn][yn])
        continue;
      d[xn][yn] = d[x][y] + 1;
      u[xn][yn] = true;
      q[qe][0] = xn;
      q[qe][1] = yn;
      qe++;
    }
  }
  memset((c), 0, sizeof(c));
  for (int i = 0; i < (int)(MAXN); i++) {
    for (int j = 0; j < (int)(MAXN); j++) {
      if (u[i][j] && d[i][j] < MAXN) {
        c[d[i][j]]++;
      }
    }
  }
  int r = m / 2 - 17;
  if (k <= r) {
    int sum = 0;
    for (int i = 0; i < (int)(k + 1); i++) {
      sum += c[i];
    }
    cout << sum << endl;
  } else {
    int a[10];
    for (int i = 0; i < (int)(10); i++) {
      a[i] = c[r + i];
    }
    int b[10];
    int sum = 0;
    for (int i = 0; i < (int)(r); i++) {
      sum += c[i];
    }
    b[0] = sum;
    for (int i = 0; i < (int)(9); i++) {
      b[i + 1] = a[0];
      for (int j = 0; j < (int)(9 - i); j++) {
        a[j] = a[j + 1] - a[j];
      }
    }
    const int MOD = 1000000007;
    long long ans = 0;
    long long z = (k - (r - 1) + MOD) % MOD;
    long long ff = 120;
    for (int i = 0; i < (int)(6); i++) {
      long long s = b[i];
      int f = 1;
      for (int j = 0; j < (int)(i); j++) {
        s = s * (z - j) % MOD;
        f = f * (j + 1);
      }
      ans = (ans + s * (ff / f)) % MOD;
    }
    ans = (ans * mypow(ff, MOD - 2, MOD)) % MOD;
    ans %= MOD;
    ans += MOD;
    ans %= MOD;
    cout << ans << endl;
  }
  return 0;
}
