Pairs of a sequence (2) P51153


Statement
 

pdf   zip

Write a program that reads sequences of natural numbers, and for each one tells if it has two elements such that their sum is an odd number.

Input

Input consists of several sequences, each one in a line. Each sequence consists of a natural number nn, followed by nn natural numbers x1,,xnx_1, \dots, x_n.

Output

For each input sequence, print “yes” or “no” depending on if it is possible to find two elements xix_i and xjx_j (with iji \neq j) such that xi+xjx_i + x_j is an odd number.

Public test cases
  • Input

    6   3 5 7 15 13 1
    2   0 1
    

    Output

    no
    yes
    
  • Information
    Author
    Salvador Roura
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++
    User solutions
    C++ Python