#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<vector<int> > edges(n + 1);
  for (int i = 0; i < m; ++i) {
    int u, v;
    cin >> u >> v;
    edges[u].push_back(v);
    edges[v].push_back(u);
  }
  vector<int> a(n + 1);
  queue<int> q;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    if (a[i] == 0) q.push(i);
  }
  vector<int> ret;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    --a[x];
    ret.push_back(x);
    for (unsigned i = 0; i < edges[x].size(); ++i) {
      int y = edges[x][i];
      --a[y];
      if (a[y] == 0) q.push(y);
    }
  }
  sort(ret.begin(), ret.end());
  cout << ret.size() << endl;
  if (ret.size() > 0) {
    cout << ret[0];
    for (unsigned i = 1; i < ret.size(); ++i) cout << ' ' << ret[i];
    cout << endl;
  }
  return 0;
}
