#include <bits/stdc++.h>          
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repp(i, st, en) for (ll i = (ll)st; i < (ll)(en); i++)
#define repm(i, st, en) for (ll i = (ll)st; i >= (ll)(en); i--)
#define all(v) v.begin(), v.end()
void chmax(ll &x, ll y) {x = max(x,y);}
void chmin(ll &x, ll y) {x = min(x,y);}
void Yes() {cout << "Yes" << endl; exit(0);}
void No() {cout << "No" << endl; exit(0);}
template<class in_Cout> void Cout(in_Cout x) {cout << x << endl; exit(0);}
template<class in_vec_cout>
void vec_cout(vector<in_vec_cout> vec) {
    for (in_vec_cout res : vec) {cout << res << " ";}
    cout << endl;
}

const ll inf = 1e18;
const ll mod = 1e9 + 7;

int main() {
    ll N, M, Q;
    cin >> N >> M >> Q;
    vector<ll> W(N), V(N);
    rep(i,N) cin >> W[i] >> V[i];
    vector<ll> X(M);
    rep(i,M) cin >> X[i];

    vector<pair<ll,ll>> P(N);
    rep(i,N) P[i] = {V[i],W[i]};
    sort(all(P),greater<pair<ll,ll>>());

    vector<ll> res(Q);
    rep(q,Q) {
        ll l, r; cin >> l >> r;
        l--; r--;
        vector<ll> box;
        rep(i,M) if (i<l || r<i) box.push_back(X[i]);
        sort(all(box));
        ll n = box.size();
        vector<bool> used(n);
        ll tmp = 0;
        rep(i,N) {
            ll v = P[i].first, w = P[i].second;
            rep(j,n) {
                if (used[j]) continue;
                if (w<=box[j]) {
                    tmp += v;
                    used[j] = true;
                    break;
                }
            }
        }
        res[q] = tmp;
    }

    for (ll ans : res) cout << ans << endl;
}
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for(int i=0; i<n; i++)

struct Data {
    ll w, v;
    Data(ll w, ll v) : w(w), v(v) {}
    bool operator < (const Data &d) const {
        if (d.v == v) {
            return d.w > w;
        } else {
            return d.v < v;
        }
    }
};


int main() {
    int N, M, Q;
    cin >> N >> M >> Q;
    vector<Data> d;
    int X[M];
    ll W, V;
    for (int i = 0; i < N; i++) {
        cin >> W >> V;
        d.push_back(Data(W, V));
    }
    for (int i = 0; i < M; i++) {
        cin >> X[i];
    }
    int L, R;
    sort(d.begin(), d.end());
    for (int i = 0; i < Q; i++) {
        cin >> L >> R;
        ll ans = 0;
        L--;
        R--;
        bool flag[M] = {};
        for (int j = 0; j < N; j++) {
            int id = -1;
            for (int k = 0; k < M; k++) {
                if (L <= k && k <= R) continue;
                if (!flag[k] && d[j].w <= X[k]) {
                    if (id == -1) {
                        id = k;
                    } else if (X[k] < X[id]) {
                        id = k;
                    }
                }
            }
            if (id != -1) {
                ans += d[j].v;
                flag[id] = true;
            }
        }
        cout << ans << endl;
    }
    return 0;
}