#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N], b[N];
vector<vector<int> > g;
vector<int> ans;
void solve() {
  int n, m;
  cin >> n >> m;
  g.resize(n + 1);
  deque<int> dq;
  for (int i = 1; i <= m; i++) {
    int u, v;
    cin >> u >> v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (!a[i]) dq.push_front(i);
  }
  while (!dq.empty()) {
    int u = dq.front();
    dq.pop_front();
    if (b[u] > a[u]) continue;
    ans.push_back(u);
    b[u]++;
    for (auto v : g[u]) {
      b[v]++;
      if (b[v] == a[v]) dq.push_back(v);
    }
  }
  cout << (int)ans.size() << '\n';
  for (auto x : ans) cout << x << ' ';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
}
