#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, m, l, r, A[N], C[N], qu[N];
vector<int> P, Adj[N];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0, v, u; i < m; i++)
    scanf("%d%d", &v, &u), Adj[v].push_back(u), Adj[u].push_back(v);
  for (int i = 1; i <= n; i++) scanf("%d", &A[i]);
  for (int i = 1; i <= n; i++)
    if (A[i] == C[i]) qu[r++] = i;
  while (l < r) {
    int v = qu[l++];
    C[v]++;
    P.push_back(v);
    for (auto X : Adj[v])
      if ((++C[X]) == A[X]) qu[r++] = X;
  }
  printf("%d\n", (int)P.size());
  for (auto X : P) printf("%d ", X);
  return (0);
}
