Valera 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*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub>. 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*<sub class="lower-index">*i*</sub>, 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.
The first line contains two space-separated integers *n* and *m* (1 ≤ *n*, *m* ≤ 10<sup class="upper-index">5</sup>), 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*<sub class="lower-index">*i*</sub> and *v*<sub class="lower-index">*i*</sub> (1 ≤ *u*<sub class="lower-index">*i*</sub>, *v*<sub class="lower-index">*i*</sub> ≤ *n*, *u*<sub class="lower-index">*i*</sub> ≠ *v*<sub class="lower-index">*i*</sub>), that mean that counters with numbers *u*<sub class="lower-index">*i*</sub> and *v*<sub class="lower-index">*i*</sub> 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*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (0 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">5</sup>), where *a*<sub class="lower-index">*i*</sub> is the value that Ignat choose for the *i*-th counter.
import sys
import re
from math import gcd, factorial as fact, hypot, atan2, pi,ceil,sqrt,log2,dist,isqrt
try: from math import lcm
except: pass
try: from icecream import ic
except: ic = lambda *a: None if not a else (a[0] if len(a) == 1 else a)
from heapq import *
from random import *
from itertools import *
from functools import *
from bisect import *
from collections import *
from fractions import Fraction	
# import threading

# threading.stack_size(2**23)

# sys.setrecursionlimit(2*10**5+10)

input = lambda: sys.stdin.readline().strip()
def read(fn=int):
	return map(fn,input().split())

def dbg(*args,**kwargs):
	print(*args,**kwargs,file=sys.stderr)

class ostream():
	def __lshift__(self,s):
		sys.stdout.write(str(s))
		return self
cout = ostream()
endl = '\n'

yes = 'YES'
no = 'NO'

# toks = (tok for tok in sys.stdin.read().split())
# def rd(fn=int): return fn(next(toks))
# def rdn(n,fn=int): return (rd(fn) for _ in range(n))

def mul(a,b,mod=0):
	if sum(map(sum,a)) == 0 or sum(map(sum,b)) == 0:
		return [[0]*len(b[0]) for _ in range(len(a))]
	c = [[0 for j in range(len(b[0]))] for i in range(len(a))]
	for i in range(len(a)):
		for j in range(len(b[0])):
			for k in range(len(b)):
				c[i][j] += a[i][k]*b[k][j]
				if mod: c[i][j] %= mod
	return c

def power(x,y,mod=0):
	n = len(x)
	res = [[+(i==j) for j in range(n)] for i in range(n)]
	while y:
		if y % 2: res = mul(res,x,mod)
		x = mul(x,x,mod)
		y //= 2
	return res	

def power2(x,y,mod=0):
	res = [[+(i==j) for j in range(20)] for i in range(20)]
	for i in range(len(pows)):
		if (y>>i) & 1:
			res = mul(res,pows[i],mod)
			if sum(map(sum,res)) == 0:
				break
	return res

mod = 998244353
 
def sieve(n,primes):
	n = int(n)
	isp = [True] * (n+1)
	isp[0] = isp[1] = False
	for i in range(2,n+1):
		if isp[i]:
			primes += [i]
			for j in range(i*i,n+1,i):
				isp[j] = False
	return isp

# def szs(i,p=-1):
# 	sz[i] = 1
# 	for j in adj[i]:
# 		if j == p: continue
# 		sz[i] += szs(j,i)
# 	return sz[i]

# def center(i,p=-1):
# 	tot = szs(i)
# 	while True:
# 		for j in adj[i]:
# 			if j == p: continue
# 			if sz[j] > tot//2:
# 				p,i = i,j
# 				break
# 		else:
# 			return i

# def decomp(i,p=-1):
# 	i = center(i)
# 	rem[i] = 1
# 	for j in adj[i]:
# 		if j == p or rem[j]: continue
# 		par[decomp(j,i)] = i
# 	return i

# def rec(i,p=-1,d=0,v=0):
# 	anc[0][i] = p
# 	dep[i] = d
# 	pth[i] = v ^ (1 << (ord(s[i]) - ord('a')))
# 	for j in adj[i]:
# 		if j != p:
# 			rec(j,i,d+1,pth[i])

# def lca(a,b):
# 	if dep[a] < dep[b]: a,b = b,a

# 	v = dep[a] - dep[b]
# 	for i in range(len(anc)-1,-1,-1):
# 		if v & (1 << i):
# 			a = anc[i][a]

# 	if a == b: return a

# 	for i in range(len(anc)-1,-1,-1):
# 		if anc[i][a] != anc[i][b]:
# 			a,b = anc[i][a], anc[i][b]

# 	return anc[0][a]

# def path(a,b):
# 	return pth[a] ^ pth[b]# ^ (1 << (ord(s[lca(a,b)]) - ord('a')))

# n,=read()
# adj = [[] for _ in range(n)]
# for _ in range(n-1):
# 	a,b=read()
# 	a-=1
# 	b-=1
# 	adj[a]+=[b]
# 	adj[b]+=[a]
# s = input()

# sz = [0]*n
# par = [-1]*n
# rem = [0]*n
# dep = [0]*n
# pth = [0]*n
# anc = [[-1]*n for _ in range(19)]

# rec(0)
# for i in range(len(anc)-1):
# 	for j in range(n):
# 		anc[i+1][j] = -1 if anc[i][j] == -1 else anc[i][anc[i][j]]

# decomp(0)
# print(par)

# vals = [{} for _ in range(n)]
# for i in range(n):
# 	j = i
# 	while j != -1:
# 		v = path(i,j) ^ (1 << (ord(s[j]) - ord('a')))
# 		if v not in vals[j]: vals[j][v] = 0
# 		vals[j][v] += 1
# 		j = par[j]

# ans = [0]*n
# for i in range(n):
# 	j = i
# 	while j != -1:
# 		v = path(i,j)
# 		if v in vals[j]: ans[j] += vals[j][v]
# 		for k in range(20):
# 			if v & (1 << k):
# 				w = v ^ (1 << k)
# 				if w in vals[j]: ans[j] += vals[j][w]
# 		j = par[j]

# for i in range(n):
# 	ans[i] = (ans[i] - 1)//2 + 1
# print(*ans)

			
n,m = read()
adj = [[] for _ in range(n)]
for _ in range(m):
	a,b=read()
	a-=1
	b-=1
	adj[a]+=[b]
	adj[b]+=[a]

a = [*read()]

used = []
vis = set()
q = [(a[i], i) for i in range(n)]
val = [0 for i in range(n)]
heapify(q)
while q:
	r,i = heappop(q)
	if r < 0:
		vis.add(i)
		continue
	if r: break
	if i in vis: continue
	vis.add(i)
	used += [i+1]
	for j in adj[i]:
		if j not in vis:
			val[j] += 1
			heappush(q,(a[j] - val[j],j))

print(len(used))
print(*used)