#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100 * 1000 + 10;
int n, m;
list<int> graph[MAXN];
int state[MAXN];
int forbidden[MAXN];
bool pushed[MAXN];
deque<int> ans;
void push(int u, deque<int> &queue) {
  ans.push_back(u);
  for (int v : graph[u]) {
    state[v]++;
    if (state[v] == forbidden[v]) queue.push_back(v);
  }
  state[u]++;
  if (state[u] == forbidden[u]) queue.push_back(u);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < m; ++i) {
    int u, v;
    cin >> u >> v;
    --u;
    --v;
    graph[u].push_back(v);
    graph[v].push_back(u);
  }
  for (int i = 0; i < n; ++i) {
    cin >> forbidden[i];
    pushed[i] = false;
    state[i] = 0;
  }
  deque<int> queue;
  for (int i = 0; i < n; ++i)
    if (state[i] == forbidden[i]) queue.push_back(i);
  while (!queue.empty()) {
    int u = queue.front();
    queue.pop_front();
    if (state[u] == forbidden[u]) {
      if (pushed[u]) {
        for (auto v : graph[u])
          if (!pushed[v]) {
            push(v, queue);
            break;
          }
      } else {
        push(u, queue);
      }
    }
  }
  for (int i = 0; i < n; ++i)
    if (state[i] == forbidden[i]) {
      cout << -1 << endl;
      return 0;
    }
  cout << ans.size() << endl;
  for (auto a : ans) cout << a + 1 << ' ';
  cout << endl;
  return 0;
}
