#include <bits/stdc++.h>
using namespace std;
const long long maxN = 1e5 + 21;
long long n, m, a[maxN], cnt[maxN], ans;
bool p[maxN], f = true;
vector<long long> g[maxN];
int32_t main() {
  cin >> n >> m;
  for (long long i = 0; i < m; i++) {
    long long x, y;
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  queue<long long> q;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    if (!a[i]) q.push(i);
  }
  while (!q.empty()) {
    long long i = q.front();
    q.pop();
    if (a[i] == cnt[i]) {
      cnt[i]++, p[i] = true, ans++;
      for (long long j = 0; j < g[i].size(); j++) {
        long long u = g[i][j];
        cnt[u]++;
        if (a[u] == cnt[u]) q.push(u);
      }
    }
  }
  for (long long i = 1; i <= n; i++)
    if (a[i] == cnt[i]) f = false;
  if (!f)
    cout << -1 << endl;
  else {
    cout << ans << endl;
    for (long long i = 1; i <= n; i++) {
      if (p[i]) cout << i << ' ';
    }
  }
}
