#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int M = 1e6 + 5;
const int INF = 0x3f3f3f3f;
const long long ll_max = 0x3f3f3f3f3f3f3f3f;
const int mod = 1e9 + 7;
inline long long read() {
  long long res = 0;
  bool f = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = 1;
    ch = getchar();
  }
  while (ch <= '9' && ch >= '0') {
    res = (res << 3) + (res << 1) + ch - '0';
    ch = getchar();
  }
  return f ? (~res + 1) : res;
}
struct node {
  int a, b;
  bool operator<(const node &x) const {
    if (b < 0 && x.b < 0)
      return a + b > x.a + x.b;
    else if (b >= 0 && x.b >= 0) {
      if (a == x.a) return b > x.b;
      return a < x.a;
    } else
      return b > x.b;
  }
} a[102];
set<node> se;
int main() {
  int n = read(), r = read();
  for (int i = 0; i < n; ++i) {
    a[i].a = read(), a[i].b = read();
  }
  sort(a, a + n);
  int flag = 1;
  for (int i = 0; i < n; ++i) {
    if (r < a[i].a) flag = 0;
    r += a[i].b;
    if (r < 0) flag = 0;
  }
  if (flag)
    puts("YES");
  else
    puts("NO");
  return 0;
}
