/*
  AUTHOR:SOURABH
  CREATED:13:12:20
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define ordered_set tree<ll , null_type, less< ll >, rb_tree_tag, tree_order_statistics_node_update>
#define ll long long int
#define ld long double
#define fi first
#define se second
#define pb push_back
#define pob pop_back
#define W while
#define fn(i,x) for(i=0;i<x;i++)
#define fs(i,s,x) for(i=s;i<x;i++)
#define fr(i,x) for(i=x;i>=0;i--)
#define fit(it,s) for(it=s.begin();it!=s.end();it++)
#define mp make_pair
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vii vector<int>
#define vll vector<ll>
#define mii map<int,int>
#define mll map<ll,ll>
#define mod 998244353
#define MAXN 10000001
#define M 32

using namespace std;
using namespace __gnu_pbds;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);

    //freopen("input.txt","r",stdin);
    //freopen("out.txt","w",stdout);

    ll t,n,m,tt,i,l,f,curr;
    t=1;
    //cin>>t;
    W(t--)
    {
        cin>>n>>m>>tt;
        vector<pll> a(m);
        fn(i,m)
        cin>>a[i].fi>>a[i].se;
        l=0;
        f=1;
        curr=n;
        fn(i,m)
        {
            curr-=(a[i].fi-l);
            if(curr<=0)
            {f=0;break;}
            curr=min(curr+(a[i].se-a[i].fi),n);
            l=a[i].se;
        }
        curr-=(tt-l);
        if(curr<=0)
            f=0;
        if(f)
            cout<<"Yes";
        else
            cout<<"No";
    }
    return 0;
}











#include <bits/stdc++.h>

#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define forn(i,n) for (int i = 0; i < (n); i++)
#define forr(i,a,b) for (int i = a; i <= b; i++)
#define all(v) v.begin(), v.end()
#define pb(x) push_back(x)

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ii> vii;

const int MX = 205;
int n, mem[MX];
int x[MX], to[MX], cn;

void no () {
	cout << "No" << endl;
	exit(0);
}

int dp (int i) {
	if (i == 2 * n) return 1;
	
	int &res = mem[i];
	if (res != -1) return res;
	res = 0;
	
	for (int j = i + 1; j < 2 * n; j += 2) {
		int m = (i + j) / 2, f = 1, izq = 0, der = 0;
		int len = j - m;
		
		for (int k = i; k <= m; k++) {
			if (x[k] == 2) f = 0;
			if (x[k] == 1) {
				if (to[k] != -1) {
					if (to[k] != k + len) f = 0;
				} else {
					if (x[k + len]) f = 0;
					izq++;
				}
			}
		}
		
		for (int k = m + 1; k <= j; k++) {
			if (x[k] == 1) f = 0;
			if (x[k] == 2) {
				if (to[k] != -1) {
					if (to[k] != k - len) f = 0;
				} else {
					if (x[k - len]) f = 0;
					der++;
				}
			}
		}
		
		f &= izq + der <= len;
		
		if (f) res |= dp(j + 1);
	}
	
	return res;
}

int main () {
	ios_base::sync_with_stdio(0); cin.tie(0);
 	memset(mem, -1, sizeof(mem));
 	memset(to, -1, sizeof(to));
 	
	cin >> n;
		
	forn (i, n) {
		int a, b;
		cin >> a >> b;
		a--, b--;
		
		if (a >= 0 && b >= 0 && a > b) no();
		
		if (a >= 0) {
			if (x[a]) no();
			x[a] = 1;
			if (b >= 0) to[a] = b;
		}
		
		if (b >= 0) {
			if (x[b]) no();
			x[b] = 2;
			if (a >= 0) to[b] = a;
		}
	}
	
	if (dp(0)) cout << "Yes" << endl;
	else no();

	return 0;
}
