#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<(int)(n); i++)
#define rep1(i, n) for(int i=1; i<=(int)(n); i++)
#define rep2(i, n, m) for(int i=(int)n; i<=(int)m; i++)
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> wi;
typedef vector<ll> vl;
typedef vector<vl> wl;
const ll inf=1LL<<60;
const ll mod=1000000007;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n, m, t;
  cin >> n >> m >> t;
  vi a(m), b(m);
  rep(i, m)cin >> a[i] >> b[i];

  int bt=n, f=0, e=0;
  rep(i, m){
  	bt-=a[i]-e;
  	if(bt<=0){
  		f=1;
  		break;
  	}
  	bt+=b[i]-a[i];
  	bt=min(n, bt);
  	e=b[i];
  }

  if(f==0&&bt-(t-e)>0)cout << "Yes\n";
  else cout << "No\n";

  return 0;
}
#include <stack>
#include <queue>
#include <bitset>
#include <unordered_set>
#include <unordered_map>
#include <map>
#include <set>
#include <tuple>
#include <cmath>
#include <random>
#include <algorithm>
#include <vector>
#include <iostream>
#include <fstream>
#include <chrono>
#include <numeric>

#define fio ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr)
#define rng mt19937_64 rnd(chrono::system_clock::now().time_since_epoch().count())

#define ri(...) i64 __VA_ARGS__; rx(__VA_ARGS__)
#define rc(...) char __VA_ARGS__; rx(__VA_ARGS__)
#define rs(...) string __VA_ARGS__; rx(__VA_ARGS__)
#define rvi(x, n) vi x(n); cin >> x
#define rvvi(x, n, m) vvi x(n, vi(m)); cin >> x

#ifndef ONLINE_JUDGE
#define dbg(...) cerr << '[' << #__VA_ARGS__ << "]: "; dbg_log(__VA_ARGS__)
#else
#define dbg(...) ;;
#endif

#define fa(i, v) for (auto &i : v)
#define fi(i, n) for (i32 i = 0; i < n; i++)
#define fp(i, n) for (i32 i = 1; i < n; i++)
#define fr(i, n) for (i32 i = n - 1; i >= 0; i--)
#define fu(_i) ri(i); fi(_i, i)

#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()

using namespace std;

typedef uint32_t u32;
typedef int32_t i32;
typedef uint64_t u64;
typedef int64_t i64;
#ifdef __SIZEOF_INT128__
typedef __uint128_t u128;
typedef __int128_t i128;
#endif
typedef vector<i64> vi;
typedef vector<vi> vvi;

template<typename T>
inline istream &operator>>(istream &in, vector<T> &v) {
    fa(x, v) in >> x;
    return in;
}

template<typename T>
inline ostream &operator<<(ostream &out, const vector<T> &v) {
    fa(x, v) out << x << ' ';
    return out;
}

template<typename T>
inline void rx(T &x) {
    cin >> x;
}

template<typename T, typename... R>
inline void rx(T &x, R &... l) {
    cin >> x;
    rx(l...);
}

template<typename T>
inline void dbg_log(const T &x) {
    cerr << x << endl;
}

template<typename T, typename... R>
inline void dbg_log(const T &x, const R &... l) {
    cerr << x << ", ";
    dbg_log(l...);
}

template<typename T>
inline void wl(const T &x) {
    cout << x << '\n';
}

template<typename T, typename... R>
inline void wl(const T &x, const R &... l) {
    cout << x << ' ';
    wl<R...>(l...);
}

int main() {
    fio;

    ri(n, m, q);
    vector<tuple<i32, i32>> vs(n);
    fi(i, n) {
        ri(w, v);
        vs[i] = {v, w};
    }
    sort(rall(vs));

    vector<tuple<i32, i32>> xs(m);
    fi(i, m) {
        ri(x);
        xs[i] = {x, i};
    }
    sort(all(xs));

    vi used(m);
    fi(t, q) {
        used.clear();
        used.resize(m, false);
        ri(l, r);
        dbg(l, r);

        i64 result = 0;
        for (auto &[v, w] : vs) {
            dbg(v, w);
            for (auto &[x, i] : xs) {
                if ((i + 1 < l || i + 1 > r) && w <= x && !used[i]) {
                    dbg(i, x);
                    result += v;
                    used[i] = true;
                    break;
                }
            }
        }
        dbg(used);
        wl(result);
    }

    return 0;
}
