#include <bits/stdc++.h>
using namespace std;
int n, k;
vector<int> edges[100001];
int inp[100001]{0};
int counter[100001] = {0};
bool clicked[100001] = {false};
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
  }
  int a, b;
  for (int i = 0; i < k; i++) {
    cin >> a >> b;
    edges[a - 1].push_back(b - 1);
    edges[b - 1].push_back(a - 1);
  }
  for (int i = 0; i < n; i++) {
    cin >> inp[i];
  }
  queue<int> q;
  for (int i = 0; i < n; i++) {
    if (inp[i] == 0) {
      q.push(i);
    }
  }
  vector<int> result;
  while (!q.empty()) {
    int p = q.front();
    q.pop();
    if (counter[p] == inp[p]) {
      clicked[p] = true;
      result.push_back(p);
      counter[p]++;
      vector<int> v = edges[p];
      for (int i = 0; i < v.size(); i++) {
        counter[v[i]]++;
        if (counter[v[i]] == inp[v[i]]) {
          q.push(v[i]);
        }
      }
    }
  }
  cout << result.size() << endl;
  for (int i = 0; i < result.size(); i++) {
    cout << result[i] + 1 << ' ';
  }
  return 0;
}
