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

#define Mod(x) (x>=P&&(x-=P))
#define rep(i,a,b) for(int i=a,i##end=b;i<=i##end;++i)
#define drep(i,a,b) for(int i=a,i##end=b;i>=i##end;--i)
#define erep(i,a) for(int i=hd[a];i;i=nxt[i])

typedef long long ll;
inline void Max(int &x,int y){(x<y)&&(x=y);}
inline void Min(int &x,int y){(x>y)&&(x=y);}

bool let;
char IO;
inline int rd(int res=0){
	bool f=0;
	while(IO=getchar(),IO<48||IO>57)
		f|=IO=='-';
	do res=(res<<1)+(res<<3)+(IO^48);
	while(IO=getchar(),isdigit(IO));
	return f?-res:res;
}
const int M=1005;
struct node{
	int w,v;
	bool operator <(const node &_)const{
		return w<_.w;
	}
}p[M];
int s[M],t[M];
priority_queue<int>que;
bool vio;
int main(){
	cerr<<(&vio-&let)/1024.0/1024<<endl;
	int n=rd(),m=rd(),q=rd();
	rep(i,1,n)p[i].w=rd(),p[i].v=rd();
	rep(i,1,m)s[i]=rd();
	sort(p+1,p+n+1);
	while(q--){
		int l=rd(),r=rd(),tot=0;
		rep(i,1,l-1)t[++tot]=s[i];
		rep(i,r+1,m)t[++tot]=s[i];
		sort(t+1,t+tot+1);
		int ans=0,pos=1;
		while(!que.empty())que.pop();
		rep(i,1,tot){
			while(pos<=n&&p[pos].w<=t[i])
				que.push(p[pos++].v);
			if(!que.empty())
				ans+=que.top(),que.pop();
		}
		printf("%d\n",ans);
	}
}

#include <bits/stdc++.h>
//#include<boost/multiprecision/cpp_int.hpp>
//#include<boost/multiprecision/cpp_dec_float.hpp>
//#include <atcoder/all>
using namespace std;
#define rep(i, a) for (int i = (int)0; i < (int)a; ++i)
#define rrep(i, a) for (int i = (int)a; i > -1; --i)
#define REP(i, a, b) for (int i = (int)a; i < (int)b; ++i)
#define RREP(i, a, b) for (int i = (int)a; i > b; --i)
#define repl(i, a) for (ll i = (ll)0; i < (ll)a; ++i)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define popcount __builtin_popcount
#define popcountll __builtin_popcountll
#define fi first
#define se second
using ll = long long;
constexpr ll mod = 1e9 + 7;
constexpr ll mod_998244353 = 998244353;
constexpr ll INF = 1LL << 60;

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

// using lll=boost::multiprecision::cpp_int;
// using
// Double=boost::multiprecision::number<boost::multiprecision::cpp_dec_float<128>>;//仮数部が1024桁
template <class T>
inline bool chmin(T &a, T b)
{
  if (a > b)
  {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T &a, T b)
{
  if (a < b)
  {
    a = b;
    return true;
  }
  return false;
}

ll mypow(ll x, ll n, const ll &p = -1)
{ // x^nをmodで割った余り

  if (p != -1)
  {
    x = (x % p + p) % p;
  }
  ll ret = 1;
  while (n > 0)
  {
    if (n & 1)
    {
      if (p != -1)
        ret = (ret * x) % p;
      else
        ret *= x;
    }
    if (p != -1)
      x = (x * x) % p;
    else
      x *= x;
    n >>= 1;
  }
  return ret;
}

struct myrand{
  random_device seed;
  mt19937 mt;
  myrand():mt(seed()){}
  int operator()(int a,int b){//[a,b)
    uniform_int_distribution<int>dist(a,b-1);
    return dist(mt);
  }
};

//using namespace atcoder;

//------------------------
//------------------------
//------------------------
//------------------------
//------------------------


void solve()
{
	ll a,b,c,d;
	cin>>a>>b>>c>>d;
	if(c*d-b>0){
		ll ans=(a+c*d-b-1)/(c*d-b);
		cout<<ans;
	}else{
		cout<<-1;
	}
}

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << fixed << setprecision(15);
  solve();
  return 0;
}