#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > g;
vector<int> tz, z, ans;
vector<bool> used;
queue<int> q;
int main() {
  int n, m, a, b;
  scanf("%d %d", &n, &m);
  g.resize(n);
  z.resize(n);
  tz.resize(n, 0);
  used.resize(n, false);
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &a, &b);
    a--;
    b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &z[i]);
    if (z[i] == 0) q.push(i);
  }
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    if (z[v] != tz[v]) continue;
    tz[v]++;
    ans.push_back(v);
    used[v] = true;
    for (int i = 0; i < g[v].size(); i++) {
      int to = g[v][i];
      tz[to]++;
      if (!used[to]) q.push(to);
    }
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) printf("%d ", ans[i] + 1);
  return 0;
}
