#K47822. Parity Pair Existence

    ID: 28284 Type: Default 1000ms 256MiB

Parity Pair Existence

Parity Pair Existence

You are given a list of integers. Your task is to determine whether there exists a pair of distinct elements such that one of them is even and the other is odd. In other words, check if the list contains at least one even number and at least one odd number.

Recall that an integer (x) is even if (x \mod 2 = 0) and odd otherwise. The pair must consist of two different elements (i.e., at different positions in the array).

If such a pair exists, print True; otherwise, print False.

inputFormat

The input is read from standard input (stdin) and consists of two lines:

  1. The first line contains a single integer (n) indicating the number of elements in the list.
  2. The second line contains (n) space-separated integers.

outputFormat

Output a single line to standard output (stdout) containing either True or False depending on whether there exists at least one even and one odd number in the list.## sample

4
1 3 5 7
False