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

int main(){
  int N, M, Q; cin >> N >> M >> Q;
  vector<pair<int, int>> vp;
  for(int i = 0; i < N; i++){
    int w, v; cin >> w >> v;
    vp.emplace_back(w, v);
  }
  vector<int> X;
  for(int i = 0; i < M; i++){
    int x; cin >> x;
    X.push_back(x);
  }
  sort(vp.begin(), vp.end(), [](pair<int,int> a, pair<int,int> b){
    return a.second > b.second;
  });

  for(int i = 0; i < Q; i++){
    int left, right; cin >> left >> right;
    left--; right--;
    vector<int> C;
    for(int i = 0; i < M; i++){
      if(i >= left && i <= right)continue;
      C.push_back(X.at(i));
    }
    sort(C.begin(), C.end());
    int len = C.size();
    vector<bool> vb(len, true);
    int64_t ans = 0;
    for(int i = 0; i < N; i++){
      for(int p = 0; p < len; p++){
        if(vp.at(i).first <= C.at(p) && vb.at(p)){
          ans += vp.at(i).second;
          vb.at(p) = false;
          break;
        }
      }
    }
    cout << ans << endl;
  }
  
}
#include <bits/stdc++.h>
//#include <atcoder/all>
using namespace std;

#define rep(i,x,y) for(ll i=(x);i<(y);i++)
#define rrep(i,x,y) for(ll i=(ll)(y)-1;i>=(x);i--)
#define all(x) (x).begin(),(x).end()
#define itrout(x) for(int i=0;i<x.size();i++) {cout << x[i] << (i==x.size()-1 ? "\n" : " ");}
#ifdef LOCAL
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl
#define debugbit(x, n) cerr << #x << " = " << bitset<n>(x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl
#define itrdebug(x) cerr << #x << " "; for (auto & el : (x)) {cerr << (el) << " ";} cerr << endl
#define dassert(...) assert(__VA_ARGS__)
#else
#define debug(x)
#define debugbit(x, n)
#define itrdebug(x)
#define dassert(...)
#endif
//#define int long long
//using mint = atcoder::modint;

typedef long long ll;
const ll MOD = 1e9 + 7;
const long double EPS = 1e-8;


signed main(){
    int N, M, Q;
    cin >> N >> M >> Q;
    vector<int> W(N), V(N), X(M);
    rep(i,0,N) cin >> W[i] >> V[i];
    rep(i,0,M) cin >> X[i];
    vector<pair<int,int>> v(N);
    rep(i,0,N) v[i] = {V[i], W[i]};
    sort(all(v), greater<>());
    rep(i,0,Q) {
        ll answer = 0;
        int L, R;
        cin >> L >> R;
        multiset<int> s;
        rep(j,0,M) {
            if (L <= j+1 && j+1 <= R) continue;
            s.insert(X[j]);
        }
        rep(j,0,N) {
            auto itr = s.lower_bound(v[j].second);
            if (itr != s.end()) {
                answer += v[j].first;
                s.erase(itr);
            }
        }
        cout << answer << endl;
    }
    return 0;
}
