#include using namespace std; typedef long long ll; constexpr int Inf = 2000000030; constexpr ll INF= 2000000000000000001; constexpr ll MOD = 1000000007; const double PI = 3.14159265358979323846; typedef pair P; typedef pair PP; template vector make_vector(size_t s) { return vector(s); } template auto make_vector(size_t s,Args... args) { return vector(s,make_vector(args...)); } template inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } ll mod(ll val, ll M) { val = val % M; if(val < 0) { val += M; } return val; } template T RS(T N, T P, T M){ if(P == 0) return 1; if(P < 0) return 0; if(P % 2 == 0){ ll t = RS(N, P/2, M); if(M == -1) return t * t; return t * t % M; } if(M == -1) return N * RS(N,P - 1,M); return N * RS(N, P-1, M) % M; } int main() { int N; cin >> N; vector> vec(N); for(int i = 0;i < N;i++) { ll A,B; cin >> A >> B; vec.at(i) = {A + B,{A,B}}; } sort(vec.begin(),vec.end()); ll Sum = 0; bool ret = true; for(int i = 0;i < N;i++) { if(vec.at(i).second.second < Sum) { ret = false; } Sum += vec.at(i).second.first; } if(ret) cout << "Yes" << endl; else cout << "No" << endl; }