import sys

import numpy as np



n = int(eval(input()))

tasks = np.fromstring(sys.stdin.read(), sep=' ').reshape((n, 2))

a = tasks[:, 0]

b = tasks[:, 1]

i = b.argsort()

print(('Yes' if (np.add.accumulate(a[i]) <= b[i]).all() else 'No'))

import sys

import numpy as np



n = int(eval(input()))

a, b = np.fromstring(sys.stdin.read(), dtype=np.uint32, sep=' ').reshape((n, 2)).T

i = b.argsort()

print(('Yes' if (np.add.accumulate(a[i]) <= b[i]).all() else 'No'))

import sys
import numpy as np

n = int(eval(input()))
tasks = np.fromstring(sys.stdin.read(), sep=" ").reshape((n, 2))
a = tasks[:, 0]
b = tasks[:, 1]
i = b.argsort()
print(("Yes" if (np.add.accumulate(a[i]) <= b[i]).all() else "No"))

import sys
import numpy as np

n = int(eval(input()))
a, b = np.fromstring(sys.stdin.read(), dtype=np.uint32, sep=" ").reshape((n, 2)).T
i = b.argsort()
print(("Yes" if (np.add.accumulate(a[i]) <= b[i]).all() else "No"))

-tasks = np.fromstring(sys.stdin.read(), sep=" ").reshape((n, 2)) -a = tasks[:, 0] -b = tasks[:, 1] +a, b = np.fromstring(sys.stdin.read(), dtype=np.uint32, sep=" ").reshape((n, 2)).T