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