#include<stdio.h>
#include<string.h> 
#define it register int
#define ct const int 
#define il inline
using namespace std;
#define P 998244353
#define inv2 499122177
typedef long long ll;
const int N=1000005;
int fac[N],ifac[N],inv[N],ans,a[N],b[N],n,m,pw[N],f[N],g[N];
il int C(ct n,ct m){return n<m||m<0?0:(0ll+fac[n])*ifac[m]%P*ifac[n-m]%P;}
il int ksm(it x,it L){it ans=1;while(L) L&1?ans=(0ll+ans)*x%P,0:0,x=(0ll+x)*x%P,L>>=1;return ans;}
int main(){
	scanf("%d%d",&n,&m);it i;
	for(i=1;i<=n;++i) scanf("%d",&a[i]),b[i]=1;pw[1]=2;ct lim=(n>m?n:m); 
	for(i=(fac[0]=ifac[0]=inv[0]=fac[1]=ifac[1]=inv[1]=pw[0]=1)+1;i<=lim;++i) 
		fac[i]=(0ll+fac[i-1])*i%P,inv[i]=(0ll+inv[P%i])*(P-P/i)%P,ifac[i]=(0ll+ifac[i-1])*inv[i]%P,pw[i]=pw[i-1]<<1,pw[i]=(pw[i]>=P?pw[i]-P:pw[i]); 
	/*for(it k=1;k<=m;++k){
		ct now=C(m,k);it tot=0;
	//	for(i=1;i<=n;++i) tot+=b[i],tot=(tot>=P?tot-P:tot),b[i]=(0ll+b[i])*a[i]%P;
		for(i=1;i<=n;++i) tot=(tot+(0ll+ksm(a[i],k))*ksm(a[i],m-k))%P;
		ans=(ans+(0ll+now)*tot)%P,printf("%d\n",ans);
	}*/
	for(it i=0;i<=m;++i)
		for(it j=1;j<=n;++j) f[i]+=b[j],f[i]=(f[i]>=P?f[i]-P:f[i]),g[i]=(g[i]+(0ll+pw[i])*b[j])%P,b[j]=(0ll+b[j])*a[j]%P;
/*	for(it i=1;i<=m;++i){
		ans=0;
		for(it j=0;j<=i;++j)
			ans=(ans+(0ll+f[j])*f[i-j]%P*inv2)%P;
		printf("%d\n",(ans-g[i]+P)%P); 
	}
	*/
	for(it i=1;i<=m;++i){
		ans=0;
		for(it j=0;j<=i;++j)
			ans=(ans+(0ll+f[j])*f[i-j]%P*C(i,j))%P;
		ans=(0ll+ans-g[i]+P)*inv2%P,ans=(ans<0?ans+P:ans),printf("%d\n",ans);
	}
	return 0;
}

//IQ134高知能系Vtuberの高井茅乃です。
//Twitter: https://twitter.com/takaichino
//YouTube: https://www.youtube.com/channel/UCTOxnI3eOI_o1HRgzq-LEZw

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

#define INF INT_MAX
#define LLINF LLONG_MAX
#define REP(i,n) for(int i=0;i<n;i++)
#define REP1(i,n) for(int i=1;i<=n;i++)
#define MODA 1000000007
#define MODB  998244353 

template <typename T>
std::istream& operator>>(std::istream& is, std::vector<T>& vec) {
    for (T& x: vec) { is >> x; }
    return is;
}



int main() {
	ll ans = 0;
	ll tmp = 0;
	int n; cin >> n;
	int m; cin >> m;
	int q; cin >> q;
	vector<pair<ll, ll>> ca;
	vector<ll> bo;
	ll w, v;
	REP(i, n){
		cin >> w >> v;
		ca.push_back(make_pair(w, v));
	}
	REP(i, m){
		cin >> w;
		bo.push_back(w);
	}
	vector<pair<ll, ll> > nc;
	vector<ll> nb;
	int l, r;
	REP(que, q){
		ans = 0;
		cin >> l >> r;
		nc.clear();
		nb.clear();
		REP(i, n) nc.push_back(ca[i]);
		nc.push_back(make_pair(0,0));
		REP(i, m) if(i < l-1 || r-1 < i) nb.push_back(bo[i]);
		sort(nb.begin(), nb.end());
		int now = -1;
		REP(i, nb.size()){
			now = n;
			REP(j, n){
				if(nb[i] >= nc[j].first && nc[now].second <= nc[j].second){
					now = j;
				}
			}
			if(now != n){
				ans += nc[now].second;
				nc[now].first = INF;
				nc[now].second = 0;
			}
		}
		cout << ans << endl;
	}

	//cout << ans << endl;
}