#include <bits/stdc++.h>
using namespace std;
queue<int> q;
int n, m, x, y, b[100015], d[100015];
vector<int> ans, a[100015];
void mark_points(int v) {
  int to;
  ans.push_back(v);
  ++b[v];
  for (int i = 0; i < a[v].size(); ++i) {
    to = a[v][i];
    if (++b[to] == d[to]) q.push(to);
  }
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= m; ++i) {
    cin >> x >> y;
    a[x].push_back(y);
    a[y].push_back(x);
  }
  for (int i = 1; i <= n; ++i) {
    cin >> d[i];
    if (d[i] == 0) q.push(i);
  }
  while (!q.empty()) {
    mark_points(q.front());
    q.pop();
  }
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << " ";
  return 0;
}
