local n=io.read("*n")
local works={}
for i=1,n do
    works[i]={io.read("*n","*n")}
end
table.sort(works,function(a,b)
    return a[2]<b[2]
end)

local total=0
for i=1,n do
    total=total+works[i][1]
    if total>works[i][2] then
        print("No")
        return
    end
end
print("Yes")