#include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(0); cin.tie(0); ll n, m; cin >> n >> m; ll pos = 0; while (m--) { ll t, p; cin >> t >> p; ll dist = abs(p - pos); if (dist <= t) { pos = p; } else { cout << "No" << '\n'; return 0; } } cout << "Yes" << '\n'; }