#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<ll, ll>;

int main() {
  ll n, k;
  cin >> n >> k;
  vector<P> a(n);
  rep(i, n) cin >> a[i].first >> a[i].second;
  sort(a.begin(), a.end());
  ll now = 0;
  rep(i, n) {
    if (now + k >= a[i].first) {
      k = k - (a[i].first - now) + a[i].second;
      now = a[i].first;
    } else {
      cout << now + k << endl;
      return 0;
    }
  }
  cout << now + k << endl;
  return 0;
}

#include <bits/stdc++.h>
#define setIO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define PI 3.14159265358979
#define f first
#define s second
#define ar array
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<string, int> psi;
typedef pair<long long, long long> pll;
typedef pair<char, int> pci;
typedef pair<int, char> pic;
typedef pair<double, double> pdd;
typedef pair<int, string> pis;
int main() { // Ladder: Do 43
    setIO;
    int a, b, c;
    cin>>a>>b>>c;
    if (pow(a,2)+pow(b,2)<pow(c,2)) cout << "Yes\n";
    else cout << "No";
}