//BY: YASH JAIN, CF: BitSane
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file 
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
#define May_the_fork_be_with_you ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define all(x) (x).begin(), (x).end()
#define rall(v) v.rbegin(),v.rend()
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define ford(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
#define deb(x) cout<<#x<<": "<<x<<endl;
#define debn(x) cout<<#x<<": "<<x<<"  ";
#define MOD 1000000007
#define mod 998244353
#define INF 1e18
#define ll long long
#define f first
#define s second
#define pb push_back
#define eb emplace_back
#define endl "\n"
#define int long long
#define N 100005
#define sq(x) ((x)*(x))
typedef vector<int> vi;
ll gcd(ll a, ll b) {if (!b)return a; return gcd(b, a % b);}
ll power(ll x, ll y, ll p = INF) {ll res = 1; x %= p; while (y > 0) {if (y & 1)res = (res * x) % p; y = y >> 1; x = (x * x) % p;} return res;}
// Do Not use power when calculating powers of 2 (its inefficient)

bool comp(pair<int, int>& a, pair<int, int>& b) {
    if (a.s != b.s) return a.s > b.s;
    else return a.f > b.f;
}

void solve() {
    int n, m, q; cin >> n >> m >> q;
    vi x(m);
    vector<pair<int, int>> wv(n);
    forn(i, n) cin >> wv[i].f >> wv[i].s;
    forn(i, m) cin >> x[i];
    sort(all(wv), comp);
    while (q--) {
        int l, r; cin >> l >> r; l--; r--;
        vi cur;
        forn(i, m) {
            if (i == l) i = r;
            else cur.eb(x[i]);
        }
        sort(rall(cur));
        int res = 0;
        for (int i = 0; i < n; i++) {
            int j = 0;
            if (j >= (int)cur.size() || cur[j] < wv[i].f) continue;
            while (j < (int)cur.size() && cur[j] >= wv[i].f) j++;
            j--;
            res += wv[i].s;
            cur[j] = -INF;
            sort(rall(cur));
        }
        cout << res << endl;
    }
}

int32_t main() {

#ifndef ONLINE_JUDGE
    // for geting input form input.txt
    freopen("input.txt", "r", stdin);
    // for wrting output to output.txt
    freopen("output.txt", "w", stdout);
#endif

    May_the_fork_be_with_you
    int t = 1;
    int x = 1;
    // cin >> t;
    cout << fixed << setprecision(12);
    while (t--) {
        // cout << "Case #" << x << ": ";
        solve();
        x++;
    }

#ifndef ONLINE_JUDGE
    cerr << "Time Taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;
#endif
}

//#include <atcoder/maxflow.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>

#include <memory>
#include <iostream>
#include <map>
#include <list>
#include <set>
#include <algorithm>
#include <vector>
#include <sstream>
#include <string>
#include <functional>
#include <queue>
#include <deque>
#include <stack>
#include <limits>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <fstream>
#include <iterator>
#include <random>
#include <chrono>
#include <complex>
#include <thread>
#include <bitset>
#include <assert.h>


#define forr(i,start,count) for (int i = (start); i < (start)+(count); ++i)
#define set_map_includes(set, elt) (set.find((elt)) != set.end())
#define readint(i) int i; cin >> i
#define readll(i) ll i; cin >> i
#define readdouble(i) double i; cin >> i
#define readstring(s) string s; cin >> s

typedef long long ll;

//using namespace __gnu_pbds;
//using namespace atcoder;
using namespace std;

ll modd = (1000LL * 1000LL * 1000LL + 7LL);
//ll modd = 998244353;


long long gcd(long long a, long long b) { 
    if (a == 0)  {   return b;  }
    return gcd(b % a, a); 
};


ll coprimesets(const vector<ll>& nos) {
    vector<ll> a;
    ll ret = 0;
    forr(i,0,1<<nos.size()) {
        int pp = i;
        int ct = 0;
        a.resize(0);        
        while (pp>0) {
            if (pp%2==1) { a.push_back(nos[ct]);  }
            pp/=2;
            ++ct;
        }
        bool is_ok = true;
        forr(j,0,a.size()) {
            for(int k = j+1; k < a.size(); ++k) {
                is_ok &= (gcd(a[j], a[k])==1);
            }
        }
        ret += is_ok;
    }
    return ret;
}

int main(int argc, char *argv[])   {

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    cout.precision(17);
    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    uniform_int_distribution<int> rand_gen(0, modd/10);   // rand_gen(rng) gets the rand no

//    readint(test_cases);
    int test_cases = 1;
    forr(t, 1, test_cases) {

        readint(n); readint(m); readint(q);
        vector<pair<int,int>> bagg;
        forr(i,0,n) {
            readint(ww); readint(vv);
            bagg.push_back(make_pair(vv,ww));
        }
        sort(bagg.begin(), bagg.end());
        reverse(bagg.begin(), bagg.end());

        vector<int> box;
        forr(i,0,m) {
            readint(bb);
            box.push_back(bb);
        }

        forr(i,0,q) {
            readint(l); readint(r); --l; --r;
            multiset<int> box_av;
            forr(i,0,m) {
                if ((i<l) || (i>r)) { box_av.insert(box[i]); }
            }
            int ret = 0;
            for(auto x : bagg) {
                auto it = box_av.lower_bound(x.second);
                if (it!=box_av.end()) {
                    ret += x.first;
                    box_av.erase(it);
                }
            }
            cout << ret << endl;
        }


    }

    return 0;
}

