#include <bits/stdc++.h>
using namespace std;
vector<int> v[100005], sol;
queue<int> q;
int a[100005], b[100005];
int N, M, K;
void read() {
  cin >> N >> M;
  int x, y;
  while (M--) {
    cin >> x >> y;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (int i = 1; i <= N; ++i) {
    cin >> a[i];
    if (!a[i]) q.push(i);
  }
}
void solve() {
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    sol.push_back(x);
    b[x]++;
    for (vector<int>::iterator it = v[x].begin(); it != v[x].end(); ++it) {
      b[(*it)]++;
      if (a[(*it)] == b[(*it)]) q.push((*it));
    }
  }
}
void print() {
  cout << sol.size() << '\n';
  for (vector<int>::iterator it = sol.begin(); it != sol.end(); ++it)
    cout << (*it) << " ";
}
int main() {
  read();
  solve();
  print();
  return 0;
}
