#include<bits/stdc++.h>
using namespace std;
typedef struct{int a,b;}dat;
int main(){
  int n;
  cin>>n;
  vector<dat> v(n);
  for(auto& p:v)cin>>p.a>>p.b;
  sort(v.begin(),v.end(),[](dat p,dat q){return (p.b-q.b)?p.b<q.b:p.a<q.a;});
  for(int i=0,s=0;i<n;++i)if((s+=v[i].a)>v[i].b){cout<<"No";return 0;}
  cout<<"Yes";
}