#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define ll long long int #define pb push_back #define rep(i,n) for(int i=0;i<(n);i++) #define REP(i,n) for(int i=1;i<=(n);i++) using namespace std; int mx8[] = {0,0,1,-1,-1,1,-1,1}; int my8[] = {-1,1,0,0,-1,-1,1,1}; int mx4[] = {1,-1,0,0}; int my4[] = {0,0,-1,1}; const int MOD = 1000000007; int main(){ int n, m; cin >> n >> m; vector t(m),p(m); rep(i,m) { cin >> t[i] >> p[i]; if(abs(p[i]) > n-1){ cout << "No" << endl; return 0; } } bool ok = true; ll g = p[0], T = 0; if(p[0] > t[0]){ cout << "No" << endl; return 0; }else{ T += t[0]; } rep(i,m-1){ ll idou = abs(p[i+1] - p[i]); T += t[i+1] - t[i]; if(idou <= T){ T += T - idou; }else{ ok = false; break; } } if(ok) cout << "Yes" << endl; else cout << "No" << endl; }