#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5;
vector<int> rel[MAXN + 2];
int a[MAXN + 2];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    rel[u].push_back(v);
    rel[v].push_back(u);
  }
  queue<int> cola;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] == 0) cola.push(i);
  }
  vector<int> solucion;
  while (!cola.empty()) {
    int nodo = cola.front();
    cola.pop();
    solucion.push_back(nodo);
    for (int i = 0; i < rel[nodo].size(); i++) {
      int sig = rel[nodo][i];
      a[sig]--;
      if (a[sig] == 0) cola.push(sig);
    }
  }
  int k = solucion.size();
  cout << k << "\n";
  for (int i = 0; i < k; i++) {
    cout << solucion[i] << " ";
  }
  cout << "\n";
  return 0;
}
