Zero xor#11795

Zero xor

10 seconds
1,024 megabytes
Very hard

You are given a tree with vertices. Each vertex has an associated value a_i, where 0 \le a_i < 2^m. Your task is to find any nonempty independent subset of the graph whose XOR sum is equal to , or determine that no such subset exists.

An independent subset is a subset of vertices such that no two selected vertices are directly connected by an edge.

Input

The first line contains two integers and (1 \le n \le 10^6, 1 \le m \le 30) — the number of vertices and the bit limit of the values.

The second line contains integers a_1, a_2, \dots, a_n (0 \le a_i < 2^m) — the values associated with each vertex.

The next n-1 lines describe the edges of the tree. Each line contains two integers and (1 \le u, v \le n), meaning there is an edge between vertices and .

Output

If no such subset exists, print NO (case-insensitive, e.g., No).

If a valid independent subset with XOR sum equal to exists, print YES in the first line (case-insensitive, e.g., yEs, YeS). In the second line, print a single integer k (1 \le k \le n) — the number of vertices in the subset. In the third line, print space-separated integers v_1, v_2, \dots, v_k, representing the indices of the selected vertices in any order.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Note

The tree for the first sample

Scoring

  1. ( points): a_i is a power of two for all 1 \le i \le n;

  2. ( points): n > 60;

  3. ( points): m \le 10;

  4. ( points): tree is a bamboo, that is, the edges are i \ i+1 for 1 \le i < n;

  5. ( points): tree is a star, that is, the edges are for 2 \le i \le n;

  6. ( points): m \le 20;

  7. ( points): no additional constraints;