#include<iostream>
#include<vector>
#include<complex>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#define rep(i,n) for(int i = 0;i < n ; ++i)

using namespace std;

using ll = long long;

struct edge{int to, cap, cost, rev;};

struct mincostflow{
    vector<vector<edge>> G;
    vector<int> par, dist;
    mincostflow(int n):G(n),par(n),dist(n){}
    void add_edge(int from, int to, int cap, int cost){
        G[from].push_back({to,cap,cost,(int)G[to].size()});
        G[to].push_back({from,0,-cost,(int)G[from].size()-1});
    }

    int minimum_load(int s,int t){
        fill(par.begin(),par.end(),-1);
        fill(dist.begin(),dist.end(),1e9+7);
        dist[s]=0;
        priority_queue<pair<int,int>,vector<pair<int,int>>, greater<pair<int,int>>> pq;
        pq.push({0,s});
        while(pq.size()){
            auto p = pq.top();pq.pop();
            int id = p.second;
            if(id==t)continue;
            if(p.first>dist[id])continue;
            for(auto e : G[id]){
                if(e.cap>0){
                    int nd = p.first + e.cost;
                    if(nd<dist[e.to]){
                        dist[e.to]=nd;
                        par[e.to]=id;
                        pq.push({nd,e.to});
                    }
                }
            }
        }
        int cur = t;
        while(cur!=s){
            int p = par[cur];
            if(p<0)return -1;
            for(auto& e : G[p]){
                if(e.cap>0&&e.to==cur&&dist[p]+e.cost==dist[cur]){
                    e.cap--;
                    G[cur][e.rev].cap++;
                    break;
                }
            }cur=p;
        }
        return dist[t];
    }
    int minimum_cost_flow(int s,int t,int k){
        int ret = 0;
        rep(i,k){
            int z = minimum_load(s, t);
            if(z<0)return -1;
            ret += z;
        }
        return ret;
    }
};
int ax[111],ay[111];
int bx[10],by[10],c[10],f[10];
int n,m,b;


int calc(int d,int mask){
    mincostflow mcf(n+m+2);
    int s = n+m,t = n+m+1;
    rep(j,m){
        if(((1<<j)&mask)==0)continue;
        mcf.add_edge(n+j, t, c[j], 0);
        rep(i,n){
            int dist = max(0,abs(ax[i]-bx[j])+abs(ay[i]-by[j])-d);
            mcf.add_edge(i, n+j, 1, dist);
        }
    }
    rep(i,n)mcf.add_edge(s, i, 1, 0);
    int ret = mcf.minimum_cost_flow(s,t,n);
    if(ret==-1)ret=1e9+7;
    return ret+d*b*__builtin_popcount(mask);
}
void solve(){
    rep(i,n)cin>>ax[i]>>ay[i];
    rep(i,m){
        cin>>bx[i]>>by[i]>>c[i]>>f[i];
    }
    int ans = 1ll<<30;
    int all = 1<<m;
    rep(i,all){
        int cost = 0;
        int cap = 0;
        rep(j,m){
            if(i&(1<<j)){
                cost+=f[j];
                cap += c[j];
            }
        }
        if(cap<n)continue;
        int l = 0, r = 4001;
        while(r-l>2){
            int ml = (2*l+r)/3, mr = (l+2*r)/3;
            int vl = calc(ml,i);
            int vr = calc(mr,i);
            if(vl>vr)l=ml;
            else r=mr;
        }
        ans = min(calc(l,i)+cost,ans);
        ans = min(calc(l+1,i)+cost,ans);
        ans = min(calc(l+2,i)+cost,ans);
    }
    cout<<ans<<endl;
}

int main(){
    while(cin>>n>>m>>b,n!=0)solve();

}


Measured memory_bytes: 3192