#CCBCHBAHAI0000068. Mảng đối xứng số nguyên (Integer Palindrome Array)
Mảng đối xứng số nguyên (Integer Palindrome Array)
Integer Palindrome Array (Mảng đối xứng số nguyên)
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem
Given , the array is palindromic if
It is sufficient to check . Determine whether the array is palindromic.
Input
The first line contains . The second line contains integers .
Output
Print YES if the array is palindromic; otherwise print NO.
Subtask
Subtask 1 (20 points): , .
Subtask 2 (30 points): , .
Subtask 3 (50 points): , .
Example
Input
7
1 4 -2 9 -2 4 1
Output
YES
Explanation
The sample follows the mathematical definition above.