#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
typedef struct{
  int a,b;
}dat;
int main(){
  int n,s=0;
  cin>>n;
  vector<dat> v(n);
  for(int i=0;i<n;++i)cin>>v[i].a>>v[i].b;
  sort(v.begin(),v.end(),[](dat x,dat y){return x.b==y.b?x.a<y.a:x.b<y.b;});
  for(int i=0;i<n;++i){
    s+=v[i].a;
    if(s>v[i].b){cout<<"No";return 0;}
  }
  cout<<"Yes";
}