let N = Int(readLine()!)!
let tasks = [(Int, Int)]()
for _ in 0..<N {
    let input = readLine()!.characters.split(" ").map{Int(String($0))!}
    tasks += [(input[0], input[1])]
}
tasks.sortInPlace{$0.1<$1.1}
var ans = "Yes"
var time = 0
for AB in tasks {
    time += AB.0
    if time > AB.1 {
        ans = "No"
        break
    }
}
print(ans)