#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
vector<int> a[MAXN], ans;
bool mark[MAXN];
int p[MAXN];
set<pair<int, int> > s;
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    a[x].push_back(y);
    a[y].push_back(x);
  }
  for (int i = 0; i < n; i++) {
    cin >> p[i + 1];
    s.insert({p[i + 1], i + 1});
  }
  while (s.size()) {
    int val = s.begin()->first, v = s.begin()->second;
    mark[v] = true;
    s.erase(s.begin());
    if (val != 0) continue;
    ans.push_back(v);
    for (auto u : a[v]) {
      if (mark[u]) continue;
      s.erase({p[u], u});
      p[u]--;
      s.insert({p[u], u});
    }
  }
  cout << ans.size() << '\n';
  for (auto u : ans) cout << u << ' ';
  return 0;
}
