#include "bits/stdc++.h"
using namespace std;
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
/*---------------------DEBUGGING--------------------------------------------*/
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif
/*-------------------------------------------------------------------------------------*/
#define pb push_back
#define ll long long
#define pii pair<int,int>
#define pcc pair<char,char>
#define F first
#define S second
#define int long long
#define pi 3.141592653589793238462643383279502
#define M  1000000007 //998244353
#define rep(i,a,n) for(int i=a;i<n;i++)
#define INF 1000000000000005
#define N 500005
#define vi vector<int>
#define all(v) v.begin(),v.end()
#define endl "\n"
bool comp(pii &p1,pii &p2)
{
    if(p1.F<p2.F)return false;
    else if(p1.F == p2.F)
    {
        return p1.F<p2.F;
    }
    else return true;
}
void solve()
{
    int n,m,q;
    cin>>n>>m>>q;
    vector<pii>v(n);
    rep(i,0,n)
    {
        cin>>v[i].S>>v[i].F;
    }
    sort(all(v),comp);
    vi bags(m);
    rep(i,0,m)cin>>bags[i];
    while(q--)
    {
        int l,r;
        cin>>l>>r;
        l--,r--;
        multiset<int> a;
        for(int i=0;i<l;i++)
        {
            a.insert(bags[i]);
        }
        for(int i=r+1;i<m;i++)
        {
            a.insert(bags[i]);
        }
        int ans=0;
        for(auto x:v)
        {
            int val = x.S;
            auto it = a.lower_bound(val);
            if(it == a.end())continue;
            a.erase(it);ans+=x.F;
        }
        cout<<ans<<endl;
    }

}
signed main()
{
   ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
   int tests;
   //cin>>tests;
   tests=1;
   for(int i=0;i<tests;i++)
   {
       solve();
   }
}

#include<bits/stdc++.h>
// #include<atcoder/all>
// #include<boost/multiprecision/cpp_int.hpp>

using namespace std;
// using namespace atcoder;
// using bint = boost::multiprecision::cpp_int;
using ll = long long;
using ull = unsigned long long;
using P = pair<int,int>;
#define rep(i,n) for(ll i = 0;i < (ll)n;i++)
#define ALL(x) (x).begin(),(x).end()
#define MOD 1000000007


int main(){
  
  int n,m,Q;
  cin >> n >> m >> Q;
  vector<P> v(n);
  rep(i,n)cin >> v[i].first >> v[i].second;
  sort(ALL(v));
  vector<P> x(m);
  rep(i,m)cin >> x[i].first,x[i].second = i;
  sort(ALL(x));
  while(Q--){
    int l,r;cin >> l >> r;
    l--;r--;
    vector<ll> dp(m+1);
    rep(i,n){
      vector<ll> DP(m+1);
      for(int j = 1;j <= m;j++){
        if(l <= x[j-1].second && x[j-1].second <= r)continue;
        DP[j] = max(DP[j],dp[j]);
        if(v[i].first > x[j-1].first)continue;
        rep(k,j){
          DP[j] = max(DP[j],dp[k] + v[i].second);
        }
      }
      swap(DP,dp);
    }
    cout << *max_element(ALL(dp)) << "\n";
  }


  return 0;
}