#include <bits/stdc++.h>
using namespace std;
int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0},
    dxx[8] = {0, 0, 1, 1, 1, -1, -1, -1}, dyy[8] = {1, -1, 0, 1, -1, 0, 1, -1};
int n;
pair<int, int> a[105], b[105];
bool cmp(pair<int, int> p1, pair<int, int> p2) {
  return p1.first + p1.second < p2.first + p2.second;
}
int main() {
  int ind, val, x, y, r, i;
  cin >> n >> r;
  bool flag = true;
  int k = 1, s = 1;
  for (i = 1; i <= n; ++i) {
    cin >> x >> y;
    if (y >= 0) {
      a[k].first = x;
      a[k++].second = y;
    } else {
      b[s].first = x;
      b[s++].second = y;
    }
  }
  if (k > 1) sort(a + 1, a + k);
  for (i = 1; i < k; ++i) {
    if (a[i].first > r) {
      flag = false;
      break;
    }
    r += a[i].second;
  }
  if (s > 1) sort(b + 1, b + s, cmp);
  for (i = s - 1; i >= 1; --i) {
    if (b[i].first > r) {
      flag = false;
      break;
    }
    r += b[i].second;
  }
  if (r < 0) flag = false;
  if (flag)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
