def main(): N = int(input()) Z = [] for i in range(N): a,b = map(int,input().split()) Z.append((a,b)) Z.sort(key = lambda x: x[1]) #print(Z) w = 0 hold = -1 for i in range(N): a,b = Z[i] if hold != -1: #何かをキープしている ha,hb = Z[hold] if w <= hb and w + ha <= b: #間にHoldを入れることができる hold = -1 w += ha + a else: #入れられない if w > b: #print(i,hold,w,b) print("No");exit() else: w += a else: if w > b: hold = i - 1 w -= Z[hold][0] if w > b: print("No");exit() else: w += a else: w += a if hold == -1: print("Yes") else: ha,hb = Z[hold] if w > hb: print("No") else: print("Yes") if __name__ == '__main__': main()