Determine whether or not an array A of length n is a palindrome (reads the same backwards as forwards, for example 32123).
### Input
- The first line contains an integer n.
- The second line contains n integers Ai.
### Output
- Print YES if A is a Palindrome, NO otherwise.
### Constraints
- 1≤n≤1000.
- |Ai|≤1000.
### Example
Input:
41221
Output:
YES