#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> g[100005];
int a[100005];
int b[100005];
vector<int> ans;
bool used[100005];
queue<int> q;
int main() {
  cin >> n >> m;
  int u, v;
  for (int i = 0; i < m; ++i) {
    cin >> u >> v;
    u--, v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < n; ++i) {
    if (a[i] == b[i]) q.push(i);
  }
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    if (a[u] != b[u]) continue;
    ans.push_back(u);
    for (int i = 0; i < g[u].size(); ++i) {
      int v = g[u][i];
      b[v]++;
      if (b[v] == a[v]) q.push(v);
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); ++i) {
    cout << ans[i] + 1 << ' ';
  }
  return 0;
}
