#include <bits/stdc++.h>
using namespace std;
#define mp(a, b) make_pair(a, b)
typedef pair<int, int> pii;
const int maxn = 50 + 10;
int n, m, q;
pii a[maxn];
int x[maxn];
int main()
{
	scanf("%d%d%d", &n, &m, &q);
	for(int i = 1; i <= n; ++i) scanf("%d%d", &a[i].second, &a[i].first);
	sort(a + 1, a + n + 1, greater<pii>());
	for(int i = 1; i <= m; ++i) scanf("%d", &x[i]);
	while(q--)
	{
		int l, r;
		scanf("%d%d", &l, &r);
		multiset<int> s;
		for(int i = 1; i <= m; ++i)
			if(i < l || i > r)
				s.insert(x[i]);
		int ans = 0;
		for(int i = 1; i <= n; ++i)
		{
			auto it = s.lower_bound(a[i].second);
			if(it == s.end()) continue;
			ans += a[i].first;
			s.erase(it);
		}
		printf("%d\n", ans);
	}
	return 0;
}
#include <bits/stdc++.h>
using namespace std;

typedef long long int ll;
const ll INF = 1e17 + 11;

pair<ll, ll> pll[100];
vector<ll> vpl;
ll dp[100][100];

bool cmp(pair<ll,ll> a, pair<ll,ll> b){
	return a.first*b.second < a.second*b.first;
}

ll recur(ll i, ll j, ll n, ll m){
  if(i == n or j == m)
    return 0;
  if(dp[i][j] != -1)
    return dp[i][j];
  ll ans = 0;
  if(pll[i].first <= vpl[j])
    ans = max(ans, pll[i].second+recur(i+1,j+1,n,m));
  ans = max(ans,max(recur(i+1,j,n,m), recur(i,j+1,n,m)));
  return dp[i][j] = ans;
}

void init(){
  for(ll i=0; i<100; i++)
    for(ll j=0; j<100; j++)
      dp[i][j] = -1;
}

int main(){
  cin.sync_with_stdio(false);
  cin.tie(0);
  ll n, m, q;
  cin >> n >> m >> q;
  for(ll i=0; i<n; i++){
  	cin >> pll[i].first >> pll[i].second;
  }
  sort(pll, pll+n);
  ll A[m];
  for(ll i=0; i<m; i++)
    cin >> A[i];
  while(q--){
    init();
    ll x, y;
  	cin >> x >> y;
    for(ll i=0; i<x-1; i++)
      vpl.emplace_back(A[i]);
    for(ll i=y; i<m; i++)
      vpl.emplace_back(A[i]);
    sort(begin(vpl), end(vpl));
    ll ans = recur(0,0,n, vpl.size());
    cout << ans << "\n";
    vpl.clear();
  }
  return 0;
}