Chords#11665

Chords

1 second
128 megabytes
Medium

There are points evenly distributed along a circle and numbered from to in clockwise order, starting from a fixed point.

On this circle, chords are given. The -th chord connects points with numbers a_i and b_i. It is guaranteed that all values a_1, \ldots, a_n, b_1, \ldots, b_n are pairwise distinct.

Your task is to determine whether there exists at least one intersection between any two chords.

Input

The first line contains one integer (2 \le n \le 2 \cdot 10^5) — the number of chords. Each of the next lines contains two integers a_i and b_i (1 \le a_i, b_i \le 2n) — the endpoints of the -th chord.

Output

Print "Yes" if there exists at least one intersection between any two chords, and "No" otherwise.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading