#include <bits/stdc++.h>
using std::cin;
using std::cout;

typedef unsigned __int128 u128;
const int N = 16, M = 108, N2 = 16400, INF = 0x3f3f3f3f;
const u128 one = 1;

struct vec2 {
	int x, y;
	vec2 () {}
	vec2 (int x0, int y0) : x(x0), y(y0) {}
	friend std::istream & operator >> (std::istream &in, vec2 &B) {return in >> B.x >> B.y;}
	inline vec2 operator - (const vec2 &B) const {return vec2(x - B.x, y - B.y);}
	inline int norm1() const {return abs(x) + abs(y);}
} p[N];

typedef std::pair <vec2, int> piv;

int n, m, ALL;
piv task[M];
int disp[N][N2];
int dist[M][N2];
int f[N2][M];
int g[N2][M];
// f[i][j] : set = i, ans = j, last portal, min time
// g[i][j] : set = i, last eat = j, max ans

inline void up(int &x, const int y) {x < y ? x = y : 0;}
inline void down(int &x, const int y) {x > y ? x = y : 0;}
inline int min(const int x, const int y) {return x < y ? x : y;}

int main() {
	int i, j, k, ans = 0;
	std::ios::sync_with_stdio(false), cin.tie(nullptr);
	cin >> n >> m, ALL = ~(-1 << n);
	for (i = 0; i < n; ++i) cin >> p[i];
	for (i = 0; i < m; ++i) cin >> task[i].first >> task[i].second;
	std::sort(task, task + m, [] (const piv &A, const piv &B) {return A.second < B.second;});
	for (i = 0; i < n; ++i) {
		for (j = 0; j < n; ++j) disp[i][1 << j] = (p[i] - p[j]).norm1();
		disp[i][0] = INF;
		for (j = 3; j <= ALL; ++j) down(disp[i][j] = disp[i][j & -j], disp[i][j & (j - 1)]);
	}
	for (i = 0; i < m; ++i) {
		for (j = 0; j < n; ++j) dist[i][1 << j] = (task[i].first - p[j]).norm1();
		dist[i][0] = INF;
		for (j = 3; j <= ALL; ++j) down(dist[i][j] = dist[i][j & -j], dist[i][j & (j - 1)]);
	}
	memset(f, 63, sizeof f), memset(g, -1, sizeof g);
	for (i = 0; i <= ALL; ++i) {
		if (!i) std::fill(*g, *g + m, 1);
		if (!(i & (i - 1))) f[i][0] = 0;
		for (j = 0; j < m; ++j)
			if (f[i][j] < INF) {
				up(ans, j);
				for (k = 0; k < n; ++k)
					if (!(i >> k & 1))
						down(f[i | 1 << k][j], f[i][j] + disp[k][i]);
				for (k = 0; k < m; ++k)
					if (f[i][j] + dist[k][i] <= task[k].second)
						up(g[i][k], j + 1);
			}
		for (j = 0; j < m; ++j) if (g[i][j] >= 0)
			for (k = j + 1; k < m; ++k)
				if (task[j].second + min((task[k].first - task[j].first).norm1(), dist[k][i]) <= task[k].second)
					up(g[i][k], g[i][j] + 1);
		for (j = 0; j < m; ++j) if (g[i][j] >= 0) {
			up(ans, g[i][j]);
			for (k = 0; k < n; ++k)
				if (!(i >> k & 1))
					down(f[i | 1 << k][ g[i][j] ], task[j].second + min((p[k] - task[j].first).norm1(), disp[k][i]));
		}
	}
	cout << ans << '\n';
	return 0;
}
