#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e5 + 40;
int n, m;
vector<int> g[N];
int cnt[N], a[N];
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  queue<int> q;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    if (a[i] == 0) {
      q.push(i);
    }
  }
  vector<int> ans;
  while (q.size()) {
    auto fr = q.front();
    q.pop();
    if (cnt[fr] != a[fr]) continue;
    ans.push_back(fr);
    cnt[fr]++;
    for (int j : g[fr]) {
      cnt[j]++;
      if (cnt[j] == a[j]) {
        q.push(j);
      }
    }
  }
  cout << ans.size() << "\n";
  for (int i : ans) cout << i << " ";
  return 0;
}
