#include #include #include #include #include #include using namespace std; typedef long long ll; #define rep(i,n) for (int i=0;i < (int)(n);i++) int main(){ int n,m; cin >> n >> m; int pos = 0; int time = 0; rep(i,m){ int t,p; cin >> t >> p; if (abs(pos-p) > t-time){ cout << "No" << endl; return 0; } time = t; pos = p; } cout << "Yes" << endl; return 0; }