#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

const int MAX_V = 100010;
typedef int Capacity;
typedef int Cost;
const int inf = 1 << 28;

struct Edge {
	int dst;
	Capacity cap, cap_orig;
	Cost cost;
	int revEdge; bool isRev;
	Edge(int dst, Capacity cap, Cost cost, int revEdge, bool isRev)
		:dst(dst), cap(cap), cap_orig(cap), cost(cost), revEdge(revEdge), isRev(isRev) {
	}
};

struct PrimalDual {
	int n;
	vector<vector<Edge> > g;
	vector<int> top;
	PrimalDual(int n_) : n(n_), g(vector<vector<Edge> >(n_)) {}
	void add_edge(int src, int dst, Capacity cap, Cost cost) { // ?????????
		g[src].push_back(Edge{ dst, cap, cost, (int)g[dst].size(), false });
		g[dst].push_back(Edge{ src, 0, -cost, (int)g[src].size() - 1, true });
	}
	Cost solve(int s, int t, int f) {
		Cost res = 0;
		static Cost h[MAX_V], dist[MAX_V];
		static int prevv[MAX_V], preve[MAX_V];

		fill(h, h + n, 0);
		if(top.size()) {
			assert(top.size() == n);
			for(int i = 0; i < n; i++) {
				int v = top[i];
				for(int j = 0; j < g[v].size(); j++) {
					Edge& e = g[v][j];
					if(e.cap == 0) continue;
					int u = e.dst;
					h[u] = min(h[u], h[v] + e.cost);
				}
			}
		}

		while(f > 0) {
			typedef pair<Cost, int> pcv;
			priority_queue<pcv, vector<pcv>, greater<pcv> > q;
			for(int i = 0; i < n; i++) {
				dist[i] = inf;
			}
			dist[s] = 0;
			q.push(pcv(0, s));
			while(q.size()) {
				pcv p = q.top(); q.pop();
				int v = p.second;
				if(dist[v] < p.first) continue;
				for(int i = 0; i < g[v].size(); i++) {
					Edge &e = g[v][i];
					if(e.cap > 0 && dist[e.dst] > dist[v] + e.cost + h[v] - h[e.dst]) {
						dist[e.dst] = dist[v] + e.cost + h[v] - h[e.dst];
						prevv[e.dst] = v;
						preve[e.dst] = i;
						q.push(pcv(dist[e.dst], e.dst));
					}
				}
			}
			if(dist[t] == inf) {
				return -1;
			}
			for(int v = 0; v < n; v++) {
				h[v] += dist[v];
			}
			// s-t ????????????????????£??????????????????
			int d = f;
			for(int v = t; v != s; v = prevv[v]) {
				d = min(d, g[prevv[v]][preve[v]].cap);
			}
			f -= d;
			res += d * h[t];
			for(int v = t; v != s; v = prevv[v]) {
				Edge &e = g[prevv[v]][preve[v]];
				e.cap -= d;
				g[v][e.revEdge].cap += d;
			}
		}
		return res;
	}
	// ??????????????????=???????????????-?????¨??????????????¨???
	void view() {
		for(int i = 0; i < g.size(); i++) {
			for(int j = 0; j < g[i].size(); j++) {
				if(!g[i][j].isRev) {
					Edge& e = g[i][j];
					printf("%3d->%3d (flow:%d)\n", i, e.dst, e.cap_orig - e.cap);
				}
			}
		}
	}
};

int N, M, B;
int ax[100], ay[100];
int bx[5], by[5], c[5], f[5];

int calc(int bit, int D) {
	PrimalDual pd(N + M + 2);
	int S = N + M, T = S + 1;
	for(int i = 0; i < N; i++) {
		pd.add_edge(S, i, 1, 0);
		for(int j = 0; j < M; j++) {
			if(bit >> j & 1) {
				int d = abs(ax[i] - bx[j]) + abs(ay[i] - by[j]);
				int cost = max(0, d - D);
				pd.add_edge(i, N + j, 1, cost);
			}
		}
	}

	int sum = 0;
	for(int i = 0; i < M; i++) {
		if(bit >> i & 1) {
			sum += f[i] + D * B;
			pd.add_edge(N + i, T, c[i], 0);
		}
	}
	return pd.solve(S, T, N) + sum;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	while(cin >> N >> M >> B, N + M + B) {
		for(int i = 0; i < N; i++) {
			cin >> ax[i] >> ay[i];
		}
		for(int i = 0; i < M; i++) {
			cin >> bx[i] >> by[i] >> c[i] >> f[i];
		}

		int ans = 1e9;
		for(int bit = 1; bit < 1 << M; bit++) {
			int csum = 0;
			for(int i = 0; i < M; i++) {
				if(bit >> i & 1) {
					csum += c[i];
				}
			}
			if(csum < N) continue;
			int l = -1, r = 4010;
			while(abs(l - r) > 1) {
				int mid = (l + r) / 2;
				int res1 = calc(bit, mid);
				int res2 = calc(bit, mid + 1);
				ans = min({ ans, res1, res2 });
				if(res1 <= res2) r = mid;
				else l = mid;
			}
		}

		cout << ans << endl;
	}
}

Measured memory_bytes: 3212