Package for this problem was not updated by the problem writer or Codeforces administration after we’ve upgraded the judging servers. To adjust the time limit constraint, solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then value 800 ms will be displayed and used to determine the verdict.

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

В условии задачи недавно были сделаны правки. Просмотреть изменения.

×
D. Dispute

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputValera has *n* counters numbered from 1 to *n*. Some of them are connected by wires, and each of the counters has a special button.

Initially, all the counters contain number 0. When you press a button on a certain counter, the value it has increases by one. Also, the values recorded in all the counters, directly connected to it by a wire, increase by one.

Valera and Ignat started having a dispute, the dispute is as follows. Ignat thought of a sequence of *n* integers *a*_{1}, *a*_{2}, ..., *a*_{n}. Valera should choose some set of distinct counters and press buttons on each of them exactly once (on other counters the buttons won't be pressed). If after that there is a counter with the number *i*, which has value *a*_{i}, then Valera loses the dispute, otherwise he wins the dispute.

Help Valera to determine on which counters he needs to press a button to win the dispute.

Input

The first line contains two space-separated integers *n* and *m* (1 ≤ *n*, *m* ≤ 10^{5}), that denote the number of counters Valera has and the number of pairs of counters connected by wires.

Each of the following *m* lines contains two space-separated integers *u*_{i} and *v*_{i} (1 ≤ *u*_{i}, *v*_{i} ≤ *n*, *u*_{i} ≠ *v*_{i}), that mean that counters with numbers *u*_{i} and *v*_{i} are connected by a wire. It is guaranteed that each pair of connected counters occurs exactly once in the input.

The last line contains *n* space-separated integers *a*_{1}, *a*_{2}, ..., *a*_{n} (0 ≤ *a*_{i} ≤ 10^{5}), where *a*_{i} is the value that Ignat choose for the *i*-th counter.

Output

If Valera can't win the dispute print in the first line -1.

Otherwise, print in the first line integer *k* (0 ≤ *k* ≤ *n*). In the second line print *k* distinct space-separated integers — the numbers of the counters, where Valera should push buttons to win the dispute, in arbitrary order.

If there exists multiple answers, you are allowed to print any of them.

Examples

Input

5 5

2 3

4 1

1 5

5 3

2 1

1 1 2 0 2

Output

2

1 2

Input

4 2

1 2

3 4

0 0 0 0

Output

3

1 3 4

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Sep/26/2020 15:41:54 (f2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|