Problem Description

Read n integers. Output YES if list is non-decreasing else NO.

Input Format

First line n. Second line n integers.

Output Format

YES or NO.

Sample Test Case

Input:
5 1 2 2 3 5
Output:
YES

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next