#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MAXN = (int)1e2 + 10;
struct Node {
  int x, y;
} a[MAXN], b[MAXN];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, r;
  cin >> n >> r;
  int c1 = 0, c2 = 0;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    if (y >= 0) {
      a[c1].x = x, a[c1].y = y;
      c1++;
    } else {
      b[c2].x = x, b[c2].y = y;
      c2++;
    }
  }
  sort(a, a + c1, [](const Node &t1, const Node &t2) { return t1.x < t2.x; });
  sort(b, b + c2, [](const Node &t1, const Node &t2) {
    return t1.x + t1.y > t2.x + t2.y;
  });
  bool flag = true;
  for (int i = 0; i < c1; i++) {
    if (a[i].x <= r && r + a[i].y >= 0) {
      r += a[i].y;
    } else {
      flag = false;
      break;
    }
  }
  if (!flag) {
    cout << "NO" << '\n';
    return 0;
  }
  for (int i = 0; i < c2; i++) {
    if (b[i].x <= r && r + b[i].y >= 0) {
      r += b[i].y;
    } else {
      flag = false;
      break;
    }
  }
  if (flag) {
    cout << "YES" << '\n';
  } else {
    cout << "NO" << '\n';
  }
  return 0;
}
