#include <bits/stdc++.h>
using namespace std;
const int N = 100004, M = 18;
vector<int> g[N];
int a[N], b[N], n, m;
int main() {
  int x, y;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &x, &y);
    g[x].push_back(y);
    g[y].push_back(x);
  }
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  vector<int> z;
  queue<int> q;
  for (int i = 1; i <= n; i++)
    if (a[i] == 0) q.push(i);
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    if (a[u] != b[u]) continue;
    ++b[u];
    z.push_back(u);
    for (int v : g[u]) {
      if (++b[v] == a[v]) q.push(v);
    }
  }
  bool f = 1;
  for (int i = 1; i <= n; i++)
    if (a[i] == b[i]) f = 0;
  if (!f)
    puts("-1");
  else {
    printf("%d\n", z.size());
    for (int x : z) printf("%d ", x);
  }
}
