#include <bits/stdc++.h>
using namespace std;
int node, edge;
vector<int> con[100009];
int ar[100009];
int dis[100009];
vector<int> ans;
void bfs(int start) {
  queue<int> q;
  q.push(start);
  dis[start]++;
  while (!q.empty()) {
    int u = q.front();
    ans.push_back(u);
    q.pop();
    for (int i = 0; i < (int)con[u].size(); i++) {
      int v = con[u][i];
      dis[v]++;
      if (dis[v] == ar[v]) q.push(v);
    }
  }
  return;
}
int main() {
  cin >> node >> edge;
  int i;
  for (int i = 0; i < edge; i++) {
    int u, v;
    cin >> u >> v;
    con[u].push_back(v);
    con[v].push_back(u);
  }
  vector<int> start;
  for (int i = 0; i < node; i++) {
    cin >> ar[i + 1];
    if (ar[i + 1] == 0) start.push_back(i + 1);
  }
  for (int i = 0; i < (int)start.size(); i++) {
    if (dis[start[i]] == 0) bfs(start[i]);
  }
  cout << (int)ans.size() << endl;
  for (int i = 0; i < (int)ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
