#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<vector<int> > g(n + 1);
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  vector<int> a(n + 1), b(n + 1);
  queue<int> q;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] == b[i]) {
      q.push(i);
    }
  }
  vector<int> res;
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    res.push_back(v);
    for (int i = 0; i < g[v].size(); i++) {
      int to = g[v][i];
      b[to]++;
      if (b[to] == a[to]) {
        q.push(to);
      }
    }
  }
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); i++) {
    cout << res[i] << ' ';
  }
  return 0;
}
