#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { long long n, m; cin >> n >> m; long long now = 0, now1 = 0; for (int i = 0; i < m; i++) { long long t, p; cin >> t >> p; t -= now; long long l = now1 - t; long long r = now1 + t; if (l > p || r < p) { cout << "No" << endl; return 0; } now = t; now1 = p; } cout << "Yes" << endl; return 0; }