#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
inline long long input() {
  long long n;
  cin >> n;
  return n;
}
long long poww(long long a, long long b, long long md) {
  return (!b ? 1
             : (b & 1 ? a * poww(a * a % md, b / 2, md) % md
                      : poww(a * a % md, b / 2, md) % md));
}
const int MAXN = 1e5 + 10;
const int MOD = 1e9 + 7;
const int MOD2 = 998244353;
const long long INF = 8e18;
long long n, m;
long long a[MAXN];
long long b[MAXN];
bool mark[MAXN];
vector<long long> adj[MAXN];
vector<long long> ans;
queue<long long> q;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> m;
  long long cnt1, cnt2;
  for (int i = 1; i <= m; i++) {
    cin >> cnt1 >> cnt2;
    adj[cnt1].push_back(cnt2);
    adj[cnt2].push_back(cnt1);
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (b[i] == a[i]) {
      q.push(i);
      b[i]++;
      mark[i] = true;
      ans.push_back(i);
    }
  }
  while (!q.empty()) {
    long long v = q.front();
    q.pop();
    for (auto u : adj[v]) {
      b[u]++;
      if (a[u] == b[u]) {
        q.push(u);
        b[u]++;
        mark[u] = true;
        ans.push_back(u);
      }
    }
  }
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << ' ';
  }
}
