//叫んで 藻掻もがいて 瞼まぶたを腫らしても
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int , int> pii;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const int maxn = 1e6 + 10;
const ll mod = 1e9+7;

#define pb push_back
#define endl '\n'
#define dokme(x) cout << x , exit(0)
#define ms(x , y) memset(x , y , sizeof x)
ll pw(ll a, ll b, ll md = mod){ll res = 1;while(b){if(b&1){res=(a*res)%md;}a=(a*a)%md;b>>=1;}return(res);}

int n , m;
int x[maxn] , y[maxn];
vector < int > v , vc;
priority_queue < pii > pq;

int X(int x){
	return lower_bound(v.begin() , v.end() , x) - v.begin();
}

int Y(int x){
	return lower_bound(vc.begin() , vc.end() , x) - vc.begin();
}

set < int > ans;
set < pii > kil;
set < int > pos[maxn] , zap[maxn];

int32_t main(){
	ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
	cin >> n >> m;
	for(int i = 1 ; i <= m ; i ++)
		cin >> x[i] >> y[i] , v.pb(x[i]) , vc.pb(y[i]) , vc.pb(y[i] - 1) , vc.pb(y[i] + 1);
	vc.pb(n);
	vc.pb(n+1);
	vc.pb(n-1);
	v.pb(0);
	sort(v.begin() , v.end());
	v.resize(unique(v.begin() , v.end()) - v.begin());
	for(int i = 1 ; i <= m ; i ++)
		x[i] = X(x[i]);
	sort(vc.begin() , vc.end());
	vc.resize(unique(vc.begin() , vc.end()) - vc.begin());
	for(int i = 1 ; i <= m ; i ++)
		y[i] = Y(y[i]);
	for(int i = 1 ; i <= m ; i ++)
		kil.insert({x[i] , y[i]}) , pos[y[i]].insert(x[i]) , zap[y[i]].insert(x[i]);
	// x -> satr / y -> sootoon
	pq.push({-X(0) , Y(n)});
	while(!pq.empty()){
		auto [cx , cy] = pq.top();
		pq.pop();
		cx = -cx;
		while(kil.size() and (*kil.begin()).first <= cx){
			pos[(*kil.begin()).second].erase((*kil.begin()).first);
			if(zap[(*kil.begin()).second].count((*kil.begin()).first))zap[(*kil.begin()).second].erase((*kil.begin()).first);
			kil.erase((*kil.begin()));
		}
		int lim = maxn;
		if(pos[cy].empty())ans.insert(cy);
		else lim = *pos[cy].begin();
		while(zap[cy - 1].size() and *zap[cy-1].begin() <= lim){
			int nx = *zap[cy - 1].begin();
			pq.push(pii(-nx , cy - 1));
			zap[cy - 1].erase(nx);
		}
		while(zap[cy + 1].size() and *zap[cy+1].begin() <= lim){
			int nx = *zap[cy + 1].begin();
			pq.push(pii(-nx , cy + 1));
			zap[cy + 1].erase(nx);
		}
	}
	cout << ans.size();
	return(0);
}

#include <bits/stdc++.h>
using namespace std;
typedef long long int lld;
typedef pair<int,int> pi;
typedef pair<lld,lld> pl;
typedef pair<int,lld> pil;
typedef pair<lld,int> pli;
typedef vector<int> vit;
typedef vector<vit> vitt;
typedef vector<lld> vlt;
typedef vector<vlt> vltt;
typedef vector<pi> vpit;
typedef vector<vpit> vpitt;
typedef long double ld;
#define x first
#define y second
#define pb push_back
#define all(v) v.begin(), v.end()
#define sz(x) (int)x.size()
#define mk(a,b) make_pair(a,b)
bool isrange(int y,int x,int n,int m){
	 if(0<=y&&y<n&&0<=x&&x<m) return true;
	 return false;
}
int dy[4] = {1,0,-1,0},dx[4]={0,1,0,-1},ddy[8] = {1,0,-1,0,1,1,-1,-1},ddx[8] = {0,1,0,-1,1,-1,1,-1};
const lld INF = 1e18;
struct MCMF{
	struct Edge{
		int to,r;
		lld c,cost;
		Edge() : Edge(0,0,0,0){
		}
		Edge(int a,lld b,int c,lld d) : to(a),c(b),r(c),cost(d){
		}
	};
	vector<vector<Edge> > adj;
	vector<pi> par;
	int N,S,E;
	MCMF(int n,int s,int e){
		this->N = n;
		this->S = s;
		this->E = e;
		adj.resize(n);
		par.resize(n);
	}
	void push_edge(int a,int b ,lld c,lld d){
		adj[a].push_back({b,c,sz(adj[b]),d});
		adj[b].push_back({a,0,sz(adj[a])-1,-d});
	}
	bool SPFA(){
		vector<int> inq;
		vector<lld> dst;
		inq.resize(N+5,0);
		dst.resize(N+5,INF);
		inq[S] = 1;
		dst[S] = 0;
		queue<int> q;
		q.push(S);
		while(!q.empty()){
			int x = q.front();q.pop();
			inq[x] = 0;
			for(int i=0;i<sz(adj[x]);i++){
				auto& e = adj[x][i];
				if(e.c<=0) continue;
				if(dst[x]<INF&&dst[e.to]>dst[x]+e.cost){
					dst[e.to] = dst[x] + e.cost;
					par[e.to] = mk(x,i);
					if(inq[e.to]==0){
						inq[e.to] = 1;
						q.push(e.to);
					}
				}
			}
		}
		return dst[E] != INF;
	}
	pl flow(){
		lld work = 0;
		lld money = 0;
		while(SPFA()){
			lld vv = 0;
			lld f = INF;
			for(int i = E;i!=S;i=par[i].x){
				auto& e = adj[par[i].x][par[i].y];
				f = min(f,e.c);
				vv += e.cost;
			}
			work += f;
			money += f*vv;
			for(int i = E;i!=S;i=par[i].x){
				auto& e = adj[par[i].x][par[i].y];
				e.c -= f;
				adj[e.to][e.r].c += f;
			}
		}
		return mk(work,money);
	}
};
const int MAX = 55;
int W[MAX],V[MAX],X[MAX];
void solve(int tc){
	int n,m,q;
	scanf("%d%d%d",&n,&m,&q);
	for(int e=1;e<=n;e++) scanf("%d%d",&W[e],&V[e]);
	for(int e=1;e<=m;e++) scanf("%d",&X[e]);
	while(q--){
		int l,r;
		scanf("%d%d",&l,&r);
		lld ans = 0;
		for(int t=1;t<=m;t++){
			int st = 0,ed = n + m + 2;
			MCMF gh(n+m+3,st,ed);
			gh.push_edge(st,1,t,0);
			for(int e=1;e<=m;e++){
				if(e>=l&&e<=r){
					continue;
				}
				gh.push_edge(1,e+1,1,0);
				for(int p=1;p<=n;p++){
					if(X[e]>=W[p]){
						gh.push_edge(e+1,m+1+p,1,-V[p]);
					}
				}
			}
			for(int p=1;p<=n;p++) gh.push_edge(m+1+p,ed,1,0);
			pl now = gh.flow();
			ans = max(ans,-now.y);
		}
		printf("%lld\n",ans);
	}
}


int main(void){
	/*
	ios_base :: sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	*/
	int tc = 1;
	/*
		cin >> tc;
	*/
	for(int test_number=1;test_number<=tc;test_number++){
		solve(test_number);
	}
	return 0;
}