#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline T read(T &x) {
  char c = getchar();
  bool f = 0;
  x = 0;
  while (!isdigit(c)) f |= c == '-', c = getchar();
  while (isdigit(c)) x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
  if (f) x = -x;
  return x;
}
template <typename T, typename... Args>
inline void read(T &x, Args &...args) {
  read(x);
  read(args...);
}
template <typename T>
inline void write(T x) {
  if (x < 0)
    putchar('-'), write(-x);
  else {
    if (x > 9) write(x / 10);
    putchar('0' + x % 10);
  }
}
int N, R;
int D[60001];
struct Z {
  int a, b;
} A[104];
int main() {
  read(N, R);
  for (int i = 1; i <= N; i++) read(A[i].a, A[i].b);
  sort(A + 1, A + N + 1, [](const Z &a, const Z &b) { return a.a < b.a; });
  int base = 0;
  for (int i = 1; i <= N; i++)
    if (A[i].b >= 0 && A[i].a <= R) R += A[i].b, base++;
  vector<Z> arr;
  for (int i = 1; i <= N; i++)
    if (A[i].b < 0) arr.push_back(A[i]);
  sort((arr).begin(), (arr).end(),
       [](const Z &a, const Z &b) { return a.a + a.b > b.a + b.b; });
  for (Z &z : arr) {
    for (int i = z.a; i <= R; i++)
      if (i + z.b >= 0) D[i + z.b] = max(D[i + z.b], D[i] + 1);
  }
  int ans = 0;
  for (int i = 0; i <= R; i++) ans = max(ans, D[i]);
  puts(ans + base == N ? "YES" : "NO");
}
