#include <bits/stdc++.h>
using namespace std;
struct node {
  long long rank, val;
  node(long long _rank = 0, long long _val = 0) : rank(_rank), val(_val) {}
} o[200], ne[200];
long long n, k;
bool book[200] = {0};
long long cnt1 = 0, cnt2 = 0;
long long dfs(long long now, long long k);
bool cmp1(node x, node y) { return x.rank < y.rank; }
bool cmp2(node x, node y) {
  if (x.rank + x.val == y.rank + y.val) return x.rank > y.val;
  return x.rank + x.val > y.rank + y.val;
}
int main() {
  scanf("%lld%lld", &n, &k);
  for (long long rank, val, i = 1; i <= n; i++) {
    scanf("%lld%lld", &rank, &val);
    if (val >= 0)
      o[++cnt1] = node(rank, val);
    else
      ne[++cnt2] = node(rank, val);
  }
  long long ans = 0;
  sort(o + 1, o + cnt1 + 1, cmp1);
  sort(ne + 1, ne + cnt2 + 1, cmp2);
  bool flag1, flag2;
  while (k >= o[ans + 1].rank && ans + 1 <= cnt1 && k + o[ans + 1].val >= 0)
    k += o[ans + 1].val, ans++;
  if (ans == cnt1)
    flag1 = true;
  else
    flag1 = false;
  ans = 0;
  while (k >= ne[ans + 1].rank && ans + 1 <= cnt2 && k + ne[ans + 1].val >= 0)
    k += ne[ans + 1].val, ans++;
  if (ans == cnt2)
    flag2 = true;
  else
    flag2 = false;
  if (flag1 && flag2)
    printf("YES\n");
  else
    printf("NO\n");
}
long long dfs(long long now, long long k) {
  if (k < ne[now].rank || k + ne[now].val < 0) return 0ll;
  k += ne[now].val;
  long long xam = 0;
  for (long long i = 1; i <= cnt2; i++) {
    if (book[i] == 0) {
      book[i] = 1;
      xam = max(xam, dfs(i, k));
      book[i] = 0;
    }
  }
  return xam + 1;
}
