Pica d’Estats

Write a program that, given a sequence of integer numbers strictly positive ended with 0, prints if contains any peak greater than 3143 (the height of Pica d’Estats). A peak is an integer of the sequence that has a predecessor and a successor and it is strictly greater than them.

Input

Input is a sequence of integer numbers strictly positive ended with 0. At least, always there are three integer numbers (not counting the 0).

Output

The output must be “YES” if there is any peak greater than 3143, and “NO” otherwise.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:51:52.633Z

© Jutge.org, 2006–2026.
https://jutge.org