#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long f = 1, x = 0;
  char ch;
  do {
    ch = getchar();
    if (ch == '-') f = -1;
  } while (ch < '0' || ch > '9');
  do {
    x = (x << 3) + (x << 1) + ch - '0';
    ch = getchar();
  } while (ch >= '0' && ch <= '9');
  return f * x;
}
const int MAXN = 100 + 10;
int n, r;
struct node {
  int a;
  int b;
} p[MAXN], p1[MAXN], p2[MAXN];
int top1, top2;
inline bool cmp1(node a, node b) { return a.a == b.a ? a.b > b.b : a.a < b.a; }
inline bool cmp2(node a, node b) { return a.a + a.b > b.a + b.b; }
int main() {
  n = read(), r = read();
  for (int i = 1; i <= n; i++) {
    p[i].a = read(), p[i].b = read();
    if (p[i].b >= 0) p1[++top1] = p[i];
    if (p[i].b < 0) p2[++top2] = p[i];
  }
  sort(p1 + 1, p1 + top1 + 1, cmp1);
  sort(p2 + 1, p2 + top2 + 1, cmp2);
  for (int i = 1; i <= top1; i++) {
    if (p1[i].a > r) {
      cout << "NO" << endl;
      return 0;
    }
    r += p1[i].b;
  }
  for (int i = 1; i <= top2; i++) {
    if (p2[i].a > r) {
      cout << "NO" << endl;
      return 0;
    }
    r += p2[i].b;
  }
  if (r >= 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
