#include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif

#define int long long
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9) + 7;
template<class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return true; } return false; }

struct MinimumCostFlow {
	using Flow = int;
	using Cost = int;
	const Cost kInfCost = INF;
	struct Edge {
		int to, rev;
		Flow cap;
		Cost cost;
		Edge() {}
		Edge(int to, int rev, Flow cap, Cost cost) :to(to), rev(rev), cap(cap), cost(cost) {}
	};
	int n;
	vector<vector<Edge>> g;
	vector<Cost> dist;
	vector<int> prevv, preve;
	MinimumCostFlow(int n) :n(n), g(n), dist(n), prevv(n), preve(n) {}
	void addArc(int from, int to, Flow cap, Cost cost) {
		g[from].emplace_back(to, (int)g[to].size(), cap, cost);
		g[to].emplace_back(from, (int)g[from].size() - 1, Flow(), -cost);
	}
	// s??????t????????????f???????°??????¨???
	// ??????????????´?????? kInfCost
	Cost minimumCostFlow(int s, int t, Flow f) {
		Cost total = Cost();
		while (f > 0) {
			// Bellman-Ford
			fill(dist.begin(), dist.end(), kInfCost);
			dist[s] = 0;
			bool update = true;
			while (update) {
				update = false;
				for (int v = 0; v < n; v++) {
					if (dist[v] == kInfCost)continue;
					for (int i = 0; i < g[v].size(); i++) {
						Edge &e = g[v][i];
						if (e.cap > Flow() && dist[e.to] > dist[v] + e.cost) {
							dist[e.to] = dist[v] + e.cost;
							prevv[e.to] = v;
							preve[e.to] = i;
							update = true;
						}
					}
				}
			}
			// ????????\???????????????
			if (dist[t] == kInfCost)
				return kInfCost;
			// ?????????????????£??????????????????
			Flow d = f;
			for (int v = t; v != s; v = prevv[v])
				d = min(d, g[prevv[v]][preve[v]].cap);
			f -= d;
			total += dist[t] * d;
			for (int v = t; v != s; v = prevv[v]) {
				Edge &e = g[prevv[v]][preve[v]];
				e.cap -= d;
				g[v][e.rev].cap += d;
			}
		}
		return total;
	}
};
int popcount(int x) {
	int ret = 0;
	while (x) {
		x &= x - 1;
		ret++;
	}
	return ret;
}

signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	for (int N, M, B; cin >> N >> M >> B&&N;) {
		vector<int> ax(N), ay(N); rep(i, 0, N) {
			cin >> ax[i] >> ay[i];
		}
		vector<int> bx(M), by(M), c(M), f(M); rep(i, 0, M) {
			cin >> bx[i] >> by[i] >> c[i] >> f[i];
		}
		int ans = INF;
		auto manhattan = [&](int i, int j) {return abs(ax[i] - bx[j]) + abs(ay[i] - by[j]); };
		rep(mask, 0, 1 << M) {
			static bool flag[5];
			int nv = popcount(mask);
			memset(flag, 0, sizeof(flag));
			int sumf = 0;
			rep(i, 0, M)
				if (mask >> i & 1) {
					flag[i] = true;
					sumf += f[i];
				}

			auto C = [&](int d) {
				MinimumCostFlow mcf(N + M + 2);
				int s = mcf.n - 2, t = s + 1;
				rep(i, 0, N) {
					rep(j, 0, M) {
						if (flag[j]) {
							mcf.addArc(i, N + j, 1, max(0LL, manhattan(i, j) - d));
						}
					}
				}
				rep(i, 0, N) {
					mcf.addArc(s, i, 1, 0);
				}
				rep(j, 0, M) {
					mcf.addArc(N + j, t, c[j], 0);
				}
				int cost = sumf + d*nv*B + mcf.minimumCostFlow(s, t, N);
				chmin(cost, INF);
				return cost;
			};
			auto f = [&](int x) {
				return C(x) < C(x + 1);
			};
			auto binarySearch = [&](int ng, int ok) {
				if (f(ng))return ng;
				while (ng + 1 < ok) {
					int m = (ng + ok) / 2;
					if (f(m))
						ok = m;
					else
						ng = m;
				}
				return ok;
			};
			int D = binarySearch(0, 5000);
			chmin(ans, C(D));
		}
		cout << ans << endl;
	}
	return 0;
}

Measured memory_bytes: 3264