#include #include using namespace std; int main(){ int n,m; cin >> n >> m; int now = 0; while(m--){ int t,p; cin >> t >> p; if(abs(t-now) < abs(t-p)){ cout << "No\n"; return 0; } now = p; } cout << "Yes\n"; return 0; }