#include <bits/stdc++.h>
using namespace std;
int n, m;
const int maxn = 111;
struct node {
  int a, b;
};
bool cmp1(const node& rhs1, const node& rhs2) { return rhs1.a < rhs2.a; }
node a[maxn];
int sum[66666];
int main() {
  ios::sync_with_stdio(false);
  while (cin >> n >> m) {
    vector<node> a(n);
    for (int i = 0; i < n; i++) {
      cin >> a[i].a >> a[i].b;
    }
    vector<node> s1, s2;
    for (int i = 0; i < n; i++) {
      if (a[i].b >= 0)
        s1.push_back(a[i]);
      else
        s2.push_back(a[i]);
    }
    int now = m;
    sort(s1.begin(), s1.end(), cmp1);
    bool yes = 1;
    for (int i = 0; i < (int)s1.size(); i++) {
      if (now < s1[i].a) {
        yes = 0;
        break;
      }
      now += s1[i].b;
    }
    if (!yes) {
      puts("NO");
      continue;
    }
    memset(sum, 0, sizeof sum);
    for (int i = 1; i <= now; i++) sum[i] = 1;
    for (auto item : s2) {
      int x = item.a, y = -item.b;
      if (y > x) x = y;
      for (int i = 0; i < y; i++) sum[x - i]--;
      now = max(now, x);
    }
    int ss = 0;
    for (int i = now; i >= 1; i--) {
      ss += sum[i];
      if (ss < 0) {
        yes = 0;
        break;
      }
    }
    if (yes)
      puts("YES");
    else
      puts("NO");
  }
  return 0;
}
