#include <cstring>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <unordered_map>

using namespace std;
typedef long long ll;


int nlz(int x) {
    if (x == 0) return 32;
    return __builtin_clz(x);
}
struct RadixHeap {
    typedef pair<int, int> P;
    vector<P> v[32];
    bool f;
    int mi, sz;
    RadixHeap() {
        mi = sz = 0;
        f = false;
    }
    void first(int x, int p) {
        sz = 1;
        mi = x;
        v[0].push_back(P(x, p));
    }
    void push(int x, int p) {
        if (!f) {
            f = true;
            first(x, p);
            return;
        }
        assert(mi <= x);
        sz++;
        v[32-nlz(x^mi)].push_back(P(x, p));
    }
    void push(P p) {
        push(p.first, p.second);
    }
    void renew() {
        assert(!v[0].size());
        int i = 1;
        while (!v[i].size()) i++;
        mi = v[i][0].first;
        for (P &d: v[i]) {
            mi = min(mi, d.first);
        }
        for (P &p: v[i]) {
            v[32-nlz(mi^p.first)].push_back(p);
        }
        v[i].clear();
    }
    P top() {
        if (!v[0].size()) {
            renew();
        }
        assert(v[0].size());
        return v[0].back();
    }
    P pop() {
        sz--;
        if (!v[0].size()) {
            renew();
        }
        P r = v[0].back();
        v[0].pop_back();
        return r;
    }
    int size() {
        return sz;
    }
    bool empty() {
        return sz == 0;
    }
    void clear() {
        mi = sz = 0;
        for (int i = 0; i < 32; i++) {
            v[i].clear();
        }
    }
};

const int INF = 1<<28;
template<int V>
struct MinCostFlowOptimize {
    typedef int T;
    typedef pair<T, int> P;
    struct Edge {
        int to, rev;
        int cap, size;
        T cost;
    };
    vector<Edge> g[V];
    void init() {
        for (int i = 0; i < V; i++) {
            g[i].clear();
        }
    }
    void add(int from, int to, int cap, T cost) {
        g[from].push_back(Edge{to, (int)g[to].size(), cap, cap, cost});
        g[to].push_back(Edge{from, (int)g[from].size()-1, 0, cap, (T)(-cost)});
    }

    T h[V], dist[V], rdist[V];
    bool used[V], rused[V];
    Edge *prev[V], *rprev[V];
    T exec(int s, int t, int f) {
        T res = 0;
        fill_n(h, V, 0);
        RadixHeap q, rq;
        int C = 2;
        while (true) {
            int tp = -1;
            fill_n(dist, V, INF);
            dist[s] = 0;
            fill_n(used, V, false);
            q.clear();
            q.push(0, s);
            int c = 0;
            while (!q.empty()) {
                P p = q.pop();
                int v = p.second;
                if (used[v]) continue;
                used[v] = true;
                tp = v;
                if (v == t) break;
                c++;
                if (c == C) break;
                int hv = h[v], distv = dist[v];
                for (Edge &e: g[v]) {
                    if (!e.cap) continue;
                    T ee = e.cost-hv+h[e.to];
                    if (dist[e.to] > distv+ee) {
                        dist[e.to] = distv+ee;
                        prev[e.to] = &e;
                        q.push(dist[e.to], e.to);
                    }
                }
            }
            for (int v = 0; v < V; v++) {
                if (dist[v] >= dist[tp]) continue;
                h[v] += dist[tp]-dist[v];
            }
            tp = -1;
            fill_n(rdist, V, INF);
            rdist[t] = 0;
            fill_n(rused, V, false);
            rq.clear();
            rq.push(0, t);
            c = 0;
            while (!rq.empty()) {
                P p = rq.pop();
                int v = p.second;
                if (rused[v]) continue;
                rused[v] = true;
                if (used[v]) {
                    tp = v;
                    break;
                }
                c++;
                if (c == C) break;
                int hv = h[v], rdistv = rdist[v];
                for (Edge &e: g[v]) {
                    if (e.size == e.cap) continue;
                    T ee = -e.cost-h[e.to]+hv;
                    if (rdist[e.to] > rdistv+ee) {
                        rdist[e.to] = rdistv+ee;
                        rprev[e.to] = &e;
                        rq.push(rdist[e.to], e.to);
                    }
                }
            }
            if (tp == -1) {
                if (C == V) return -1;
                C = min(2*C, V);
                continue;
            }
            for (int v = 0; v < V; v++) {
                if (rdist[v] >= rdist[tp]) continue;
                h[v] -= rdist[tp]-rdist[v];
            }
            auto d = f;
            for (int v = tp; v != s; v = g[v][prev[v]->rev].to) {
                d = min(d, prev[v]->cap);
            }
            for (int v = tp; v != t; v = g[v][rprev[v]->rev].to) {
                d = min(d, g[v][rprev[v]->rev].cap);
            }
            f -= d;
            res += d * (h[s]-h[t]);
            for (int v = tp; v != s; v = g[v][prev[v]->rev].to) {
                prev[v]->cap -= d;
                g[v][prev[v]->rev].cap += d;
            }
            for (int v = tp; v != t; v = g[v][rprev[v]->rev].to) {
                rprev[v]->cap += d;
                g[v][rprev[v]->rev].cap -= d;
            }
            if (!f) break;
        }
        return res;
    }
};

const int MN = 110;
const int MM = 6;
int n, m, b, k;
int ax[MN], ay[MN];
int bx[MM], by[MM], c[MM], f[MM];

MinCostFlowOptimize<130> mf;

int calc(int md) {
//    printf("startcalc:%d\n", md);
    mf.init();
    /**
     * 0..MN p
     * MN..MN+MM k
     * 120:s 121:t
     */
    int sv = 120, tv = 121;
    for (int i = 0; i < n; i++) {
        mf.add(sv, i, 1, 0);
    }
    for (int i = 0; i < m; i++) {
        if (!(k & (1<<i))) continue;
        mf.add(MN+i, tv, c[i], 0);
    }
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            if (!(k & (1<<j))) continue;
            mf.add(i, MN+j, 1, max(0, abs(ax[i]-bx[j])+abs(ay[i]-by[j])-md));
        }
    }
    int u = n;
    int res = mf.exec(sv, tv, u);
    return __builtin_popcount(k)*b*md+res;
}

int solve() {
//    printf("solve n:%d\n", n);
    /**
     * 0..MN human
     * MN..MN+MM pos
     * s:120 t:121 S:122 T:123
     */

    int res = 2*1e9;
//    for (k = 0; k < (1<<m); k++) {
    for (k = 1; k < (1<<m); k++) {
        int fr = 0;
        int cc = 0;
        for (int i = 0; i < m; i++) {
            if (!(k & (1<<i))) continue;
            fr += f[i];
            cc += c[i];
        }
        if (cc < n) continue;
        int l = 0, r = 10000;        
        while (r - l > 2) {
            int mdl = (l+l+r)/3, mdr = (l+r+r)/3;
            int dl = calc(mdl), dr = calc(mdr);
//            printf("l:%d dl:%d r:%d dr:%d\n", mdl, dl, mdr, dr);
            if (dl > dr) {
                l = mdl;
            } else {
                r = mdr;
            }
        }
        res = min(res, fr+min(calc(l), calc(r-1)));
    }
    return res;
}

int main() {
    while (true) {
        cin >> n >> m >> b;
        if (!n && !m && !b) break;
        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];
        }
        cout << solve() << endl;
    }
    return 0;
}

Measured memory_bytes: 1276