#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const int MAXN = 4000 + 10;
const int mod = 998244353;
const int inf = 1e9 + 7;
const int mo = 1e9 + 7;
const int N = 1e6 + 10;
struct node {
  int a, b, id;
} a[150], b[150];
int vis[150];
int cmp1(node a, node b) { return a.a < b.a; }
int cmp2(node a, node b) {
  if (a.a == b.a) return a.b > b.b;
  return a.a > b.a;
}
int cmp3(node a, node b) {
  if (a.a == a.a) return a.b > b.b;
  return a.a < b.a;
}
int check(int n) {
  for (int i = 0; i < n; i++) {
    if (!vis[i]) return 0;
  }
  return 1;
}
int main() {
  int n, r, ff = 0, i, j, cnt = 0;
  scanf("%d%d", &n, &r);
  for (i = 0; i < n; i++) {
    scanf("%d%d", &a[i].a, &a[i].b);
    a[i].id = i;
  }
  sort(a, a + n, cmp1);
  int ans = r;
  for (i = 0; i < n; i++) {
    if (a[i].b >= 0 && ans >= a[i].a) {
      ans += a[i].b;
      vis[a[i].id] = 1;
    } else if (a[i].b < 0) {
      b[cnt].a = a[i].a;
      b[cnt].b = a[i].b;
      b[cnt].id = a[i].id;
      cnt++;
    }
  }
  r = ans;
  sort(b, b + cnt, cmp2);
  int num = 10;
  while (num--) {
    int sum;
    for (i = 0; i < cnt; i++) {
      sum = ans;
      ff = 1;
      if (sum >= b[i].a && !vis[b[i].id] && sum + b[i].b >= 0) {
        sum += b[i].b;
        vis[b[i].id] = 1;
        for (j = 0; j < cnt; j++) {
          if (b[j].a > sum && !vis[b[j].id]) {
            ff = 0;
            break;
          }
        }
        if (ff)
          ans = sum;
        else
          vis[b[i].id] = 0;
      }
    }
  }
  if (check(n))
    printf("YES\n");
  else {
    sort(b, b + cnt, cmp3);
    for (i = 0; i < cnt; i++) vis[b[i].id] = 0;
    ans = r;
    int num = 10;
    while (num--) {
      int sum;
      for (i = 0; i < cnt; i++) {
        sum = ans;
        ff = 1;
        if (sum >= b[i].a && !vis[b[i].id] && sum + b[i].b >= 0) {
          sum += b[i].b;
          vis[b[i].id] = 1;
          for (j = 0; j < cnt; j++) {
            if (b[j].a > sum && !vis[b[j].id]) {
              ff = 0;
              break;
            }
          }
          if (ff)
            ans = sum;
          else
            vis[b[i].id] = 0;
        }
      }
    }
    if (check(n))
      printf("YES\n");
    else
      printf("NO\n");
  }
}
