Neighbors of the same sign
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Array of integers is given. Print the pairs of adjacent elements of the same sign. If there are no adjacent elements of the same sign, print nothing.
Input
The first line contains number . The next line contains integers. All numbers do not exceed by absolute value.
Output
Print the pairs of adjacent elements of the same sign.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 17K
Acceptance rate 47%