#K63807. Taco: Odd Sum Pair Problem

    ID: 31835 Type: Default 1000ms 256MiB

Taco: Odd Sum Pair Problem

Taco: Odd Sum Pair Problem

You are given two arrays a and b of length n. Your task is to determine whether there exists an index i (with 1 ≤ i ≤ n) such that the sum of the corresponding elements is odd. In other words, check if there exists an index i satisfying \[ (a_i + b_i) \mod 2 = 1 \] If such an index exists, print "Yes"; otherwise, print "No".

Constraints:

  • 1 ≤ n ≤ 100,000
  • 1 ≤ ai, bi ≤ 100,000

The input is provided via standard input (stdin) and the output should be printed to standard output (stdout).

inputFormat

The input consists of three lines:

  1. The first line contains an integer n, denoting the number of elements in each array.
  2. The second line contains n space-separated integers representing the array a.
  3. The third line contains n space-separated integers representing the array b.

outputFormat

Output a single line containing "Yes" if there exists an index i such that a[i] + b[i] is odd, otherwise output "No".

## sample
5
1 2 4 8 16
9 3 7 5 1
Yes