408709: GYM103269 F Cute Pets

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

F. Cute Petstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Michaela and Mat are arguing about what kind of pet is cutest. Mat says that you can tell what pet is cutest simply by looking at how many people own a pet, so if more people own a type of pet, then more people will think that type of pet is cute. Michaela vehemently disagrees and wants to find an example that disproves Mat's claim

Given a list of how many people own a type of pet and how many people think a pet is cute, determine whether or not Michaela can find an example that proves Mat wrong, i.e. where less people own a pet but more people think it's cute.

For example, if 30 people own cats and 40 think cats are cute while 20 people own dogs but 50 think dogs are cute, it would be an example that disproves Mat's claim.

Input

The first line is $$$1 \leq n \leq 10^5$$$, the number of lines representing types of pets that follow.

The next $$$n$$$ lines contain two integers, $$$a_i$$$ and $$$b_i$$$, $$$0 \leq a_i, b_i \leq 10^9$$$, where $$$a_i$$$ represents the number of people that own this type of pet and $$$b_i$$$ represents the number of people who think it is cute.

Output

One line with "yes" if Michaela can prove Mat wrong, "no" if she cannot. (case insensitive)

ExamplesInput
3
1 2
2 3
3 1
Output
yes
Input
3
1 5
1 7
1 1
Output
no

加入题单

上一题 下一题 算法标签: