#include <bits/stdc++.h>
const double Pi = 3.14159265;
const int N = 4e7 + 10;
const int maxn = 1e5 + 8;
const unsigned long long base = 163;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const double eps = 1e-10;
const double pi = acos(-1);
bool debug = 1;
using namespace std;
pair<int, int> a[maxn];
bool cmp(pair<int, int> x, pair<int, int> y) {
  if (x.second >= 0 && y.second >= 0) return x.first < y.first;
  if (x.second >= 0 && y.second <= 0) return true;
  if (x.second <= 0 && y.second >= 0) return false;
  if (x.first + x.second != y.first + y.second)
    return x.first + x.second > y.first + y.second;
  return x.first < y.first;
}
int main() {
  int n, r;
  scanf("%d%d", &n, &r);
  for (int i = 1; i <= n; i++) {
    scanf("%d%d", &a[i].first, &a[i].second);
  }
  sort(a + 1, a + 1 + n, cmp);
  bool is = 1;
  for (int i = 1; i <= n; i++) {
    if (r < a[i].first) {
      is = 0;
      break;
    }
    r += a[i].second;
  }
  if (r < 0) is = 0;
  if (is) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
}
