Олимпиадный тренинг

Задача 38606. Pair with the same signs


Given an array of integers. Write a program that determines if an array has a pair of adjacent elements with the same signs.

Input
First, the number N — the number of elements in the array (1 ≤ N ≤ 10000). Then N non-zero numbers are written separated by a space - the elements of the array. The array consists of integers.

Imprint
Output the word YES if there is a pair of neighboring elements with the same signs. Otherwise, output the word NO.
Examples
# Input Output
1 5
1 -3 4 -2 1
NO