N=int(input()) Block=[] for _ in range(N): a,b=map(int,input().split()) Block.append((a,b)) Block.sort(key=lambda t:t[::-1]) X=0 for a,b in Block: if X>b: exit(print("No")) X+=a print("Yes")