#include<bits/stdc++.h>
using namespace std;
int main()
{
  int tdmckmlklgnjdnmclnbjhn;
	long long a,b,c,d;
	cin>>a>>b>>c>>d;
	if(a==c && b==d)
		cout<<"0"<<endl;
	else if(a+b==c+d || a-b==c-d || abs(a-c)+abs(b-d)<=3)
		cout<<1<<endl;
	else if((a+b+c+d)%2==0 || abs(a-c)+abs(b-d)<=6 || 
		abs(a+b-c-d)<=3 || abs(a-b-c+d)<=3)
		cout<<2<<endl;
	else 
		cout<<3<<endl;
}
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
const ll MOD=1000000007;
const long double PI=3.14159265358979;
const ll MAX=0;

int main() {
  ll N,M,T;
  cin>>N>>M>>T;
  ll a[M];
  ll b[M+1];
  rep(i,M){
    cin>>a[i]>>b[i+1];
  }
  b[0]=0;
  ll bat=N,ans=0;
  rep(i,M){
    bat-=a[i]-b[i];
    if(bat<=0){
      ans=1;
    }
    bat+=b[i+1]-a[i];
    bat=min(bat,N);
  }
  bat-=T-b[M];
  if(bat<=0){
    ans=1;
  }
  if(ans){
    cout<<"No";
  }
  else{
    cout<<"Yes";
  }
}