#include <bits/stdc++.h>
using namespace std;
int n, m, val[100100];
vector<int> res, edge[100100];
int main() {
  int u, v;
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    cin >> u >> v;
    edge[u].push_back(v);
    edge[v].push_back(u);
  }
  for (int i = 1; i <= n; ++i) {
    cin >> val[i];
    if (!val[i]) res.push_back(i);
  }
  for (int i = 0; i < res.size(); ++i) {
    int a = res[i];
    for (int j = 0; j < edge[a].size(); ++j) {
      --val[edge[a][j]];
      if (!val[edge[a][j]]) res.push_back(edge[a][j]);
    }
  }
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); ++i) {
    if (i) cout << " ";
    cout << res[i];
  }
  cout << endl;
  return 0;
}
