#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> ans;
  queue<int> q;
  int n, m;
  cin >> n >> m;
  int counters[n];
  vector<int> graph[n];
  int array[n];
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    graph[x - 1].push_back(y - 1);
    graph[y - 1].push_back(x - 1);
  }
  for (int i = 0; i < n; i++) {
    cin >> array[i];
    counters[i] = 0;
  }
  for (int i = 0; i < n; i++) {
    if (array[i] == counters[i]) {
      q.push(i);
    }
  }
  int counter = 0;
  while (!q.empty()) {
    int t = q.front();
    if (counters[q.front()] == array[q.front()]) {
      counters[q.front()]++;
      counter++;
      ans.push_back(q.front() + 1);
      for (int i = 0; i < graph[q.front()].size(); i++) {
        counters[graph[q.front()][i]]++;
      }
      q.pop();
    } else {
      q.pop();
    }
    for (int i = 0; i < graph[t].size(); i++) {
      if (counters[graph[t][i]] == array[graph[t][i]]) {
        q.push(graph[t][i]);
      }
    }
  }
  cout << counter << "\n";
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
