#include <bits/stdc++.h>
struct Project {
  int a;
  int b;
} p1[105], p2[105];
bool cmp1(Project x, Project y) { return x.a < y.a; }
bool cmp2(Project x, Project y) { return x.a + x.b > y.a + y.b; }
int main() {
  int n, r;
  scanf("%d%d", &n, &r);
  int j = 0;
  int k = 0;
  for (int i = 0; i < n; i++) {
    Project p;
    scanf("%d%d", &p.a, &p.b);
    if (p.b >= 0)
      p1[j++] = p;
    else
      p2[k++] = p;
  }
  std::sort(p1, p1 + j, cmp1);
  std::sort(p2, p2 + k, cmp2);
  for (int i = 0; i < j; i++) {
    if (r < p1[i].a || r <= 0) {
      printf("NO\n");
      return 0;
    } else
      r = r + p1[i].b;
  }
  for (int i = 0; i < k; i++) {
    if (r < p2[i].a || r <= 0) {
      printf("NO\n");
      return 0;
    } else
      r = r + p2[i].b;
  }
  if (r >= 0)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
