#CCBCHBAHAI0000066. Kiểm tra mảng tăng nghiêm ngặt (Check a Strictly Increasing Array)

Kiểm tra mảng tăng nghiêm ngặt (Check a Strictly Increasing Array)

Check a Strictly Increasing Array (Kiểm tra mảng tăng nghiêm ngặt)

Source: Phước Hưng OJ

Version: Phuoc Hung OJ Extended

Problem

Given a0,a1,…,an−1a_0,a_1,\ldots,a_{n-1}, the array is strictly increasing if

ai−1<aifor every 1≤i<n.a_{i-1}<a_i\qquad\text{for every }1\le i<n.

Unlike a nondecreasing array, equal adjacent values violate the condition. Determine whether the array is strictly increasing.

Input

The first line contains nn. The second line contains nn integers aia_i.

Output

Print YES if the array is strictly increasing; otherwise print NO.

Subtask

Subtask 1 (20 points): 1≤n≤101\le n\le10, ∣ai∣≤103|a_i|\le10^3.

Subtask 2 (30 points): 1≤n≤50001\le n\le5000, ∣ai∣≤106|a_i|\le10^6.

Subtask 3 (50 points): 1≤n≤2⋅1051\le n\le2\cdot10^5, ∣ai∣≤109|a_i|\le10^9.

Example

Input

5
-2 0 3 8 11

Output

YES

Explanation

The sample follows the mathematical definition above.