#include <bits/stdc++.h>
using namespace std;
long long int binpowmod(long long int a, long long int b, long long int m) {
  a %= m;
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
long long int binpow(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long int modInverse(long long int n, long long int p) {
  return binpowmod(n, p - 2, p);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int i, f = 0, j, ans = 0, l, r, k, t1, t2, t3, x, y, cnt, w, n, m;
  cin >> n >> m;
  vector<vector<long long int>> adj(n + 1);
  for (i = 0; i < m; ++i) {
    cin >> x >> y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  vector<long long int> val(n + 1, 0), a(n + 1);
  for (i = 1; i <= n; ++i) cin >> a[i];
  set<long long int> s;
  while (1) {
    f = 0;
    for (i = 1; i <= n; ++i) {
      if (a[i] == val[i] && s.find(i) == s.end()) {
        f = 1;
        s.insert(i);
        val[i]++;
        for (auto u : adj[i]) {
          val[u]++;
        }
      }
    }
    if (f == 0) break;
  }
  cout << s.size() << endl;
  for (auto it : s) cout << it << " ";
  return 0;
}
