#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> arr[100005], ans;
  queue<int> button;
  int i, j, n, m, u, v, dispute[100005], cnt, current[100005];
  while ((scanf("%d %d", &n, &m)) != EOF) {
    while (m--) {
      scanf("%d %d", &u, &v);
      arr[u].push_back(v);
      arr[v].push_back(u);
    }
    for (i = 1; i <= n; i++) {
      scanf("%d", &dispute[i]);
      current[i] = 0;
      if (dispute[i] == 0) button.push(i);
    }
    while (!button.empty()) {
      u = button.front();
      button.pop();
      if (dispute[u] != current[u]) continue;
      current[u]++;
      ans.push_back(u);
      for (i = 0; i < arr[u].size(); i++) {
        v = arr[u][i];
        current[v]++;
        if (current[v] == dispute[v]) button.push(v);
      }
    }
    printf("%d\n", ans.size());
    for (i = 0; i < ans.size(); i++) {
      if (i == 0)
        printf("%d", ans[i]);
      else
        printf(" %d", ans[i]);
    }
    if (ans.size() > 0) printf("\n");
    ans.clear();
    while (!button.empty()) button.pop();
    for (i = 1; i <= n; i++) arr[i].clear();
  }
  return 0;
}
