#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
mt19937 gen(time(0));
int n, m;
set<int> s;
int cnt[200005], wa[200005];
vector<int> edge[200005];
queue<int> que;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0, a, b; i < m; i++) {
    cin >> a >> b;
    edge[a - 1].push_back(b - 1);
    edge[b - 1].push_back(a - 1);
  }
  for (int i = 0; i < n; i++) {
    cin >> wa[i];
    if (wa[i] == 0) que.push(i);
  }
  while (!que.empty()) {
    auto u = que.front();
    que.pop();
    if (s.count(u)) continue;
    s.insert(u);
    cnt[u]++;
    for (auto i : edge[u]) {
      cnt[i]++;
      if (cnt[i] == wa[i]) {
        que.push(i);
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (wa[i] == cnt[i]) {
      cout << -1 << '\n';
      return 0;
    }
  }
  cout << s.size() << '\n';
  for (auto i : s) cout << i + 1 << " ";
  cout << '\n';
  return 0;
}
