#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long INF = 1e18;
void solve() {
  long long n, m;
  cin >> n >> m;
  vector<vector<long long>> adj(n + 1);
  for (long long i = 0; i < m; i++) {
    long long x, y;
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  long long a[n + 1];
  for (long long i = 1; i <= n; ++i) cin >> a[i];
  vector<long long> vis(n + 1, 0), val(n + 1, 0);
  queue<long long> q;
  for (long long i = 1; i <= n; ++i) {
    if (a[i] == val[i]) q.push(i);
  }
  vector<long long> ans;
  while (!q.empty()) {
    long long x = q.front();
    q.pop();
    if (vis[x] || val[x] != a[x]) continue;
    ans.push_back(x);
    val[x]++;
    vis[x] = 1;
    for (long long v : adj[x]) {
      val[v]++;
      if (val[v] == a[v]) q.push(v);
    }
  }
  cout << ans.size() << "\n";
  for (long long xx : ans) cout << xx << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long no_of_test_cases = 1;
  while (no_of_test_cases--) {
    solve();
  }
  return 0;
}
