import std.stdio, std.conv, std.string, std.range, std.algorithm, std.array,
  std.functional, std.container, std.typecons;

alias Work = Tuple!(int, int);

void main() {
  int N = readln.chomp.to!int;
  Work[] W = new Work[N];
  foreach(i; 0..N) {
    auto input = readln.split.to!(int[]);
    W[i] = tuple(input[0], input[1]);
  }

  W.sort!"a[1] != b[1] ? a[1]<b[1] : a[0]>b[0]"();

  ulong t = 0;
  foreach(i, w; W) {
    t += w[0];
    if(t > w[1]) {
      writeln(i);
      writeln("No");
      return;
    }
  }
  writeln("Yes");
}
