#pragma region Macros
// #pragma GCC target("avx2")
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = (n - 1); i >= 0; i--)
#define ALL(v) v.begin(), v.end()
#define pb push_back
#define eb emplace_back
using namespace std;
using P = pair<int, int>;
typedef long long ll;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

int main() {
  int n, m, q;
  cin >> n >> m >> q;
  vector<int> W(n), V(n), X(m);
  rep(i, n) cin >> W[i] >> V[i];
  rep(i, m) cin >> X[i];
  rep(i, q){
    int a, b;
    cin >> a >> b;
    a--;
    vector<int> X2;
    rep(j, m){
      if (j < a || b <= j){
        X2.push_back(X[j]);
      }
    }
    sort(ALL(X2));
    int k = X2.size();
    int ans = 0;
    vector<bool> used(n, false);
    rep(j, k){
      priority_queue<P> pq;
      rep(s, n){
        if(X2[j] >= W[s] & !used[s]){
          pq.push({V[s], s});
        }
      }
      if (!pq.empty()){
        ans += pq.top().first;
        used[pq.top().second] = true;
        pq.pop();
      }
    }
    cout << ans << endl;
  }
}
#include <bits/stdc++.h>

using namespace std;

#define int			long long
#define endl		"\n"
#define ff			first
#define ss			second
#define mod			1000000007
#define inf			1e18
#define ninf		(-1e18)
#define IOS			ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define debug(x)	cout << #x << " = " << x << endl;

void solve() {
	int n, m, q;
	cin >> n >> m >> q;
	vector<pair<int, int>> bag(n);
	vector<int> box(m);

	for (int i = 0 ; i < n ; i++) {
		cin >> bag[i].ff >> bag[i].ss;
	}

	for (int i = 0; i < m; i++) {
		cin >> box[i];
	}

	while (q--) {
		int l, r;
		cin >> l >> r;

		l--, r--;
		int ans = 0;

		vector<int> newBox;
		for (int i = 0; i < l; i++)
			newBox.push_back(box[i]);

		for (int i = r + 1; i < m; i++)
			newBox.push_back(box[i]);

		sort(newBox.begin(), newBox.end());
		vector<bool> vis(n, false);

		for (int cap : newBox) {
			int mx = 0;
			int ind = -1;
			for (int i = 0; i < n; i++) {
				if (vis[i])
					continue;

				if (bag[i].ff <= cap) {
					if (bag[i].ss > mx) {
						mx = bag[i].ss;
						ind = i;
					}
				}
			}
			if (ind != -1) {
				vis[ind] = 1;
				ans += mx;
			}
		}

		cout << ans << endl;
	}

	return;
}

int32_t main() {

	IOS;

	int t = 1;
	// cin >> t;

	while (t--) {
		solve();
	}

	return 0;
}