#include <bits/stdc++.h>
using namespace std;
namespace FGF {
int n, m;
int read() {
  int s = 0, w = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') w = -w;
    ch = getchar();
  }
  while (isdigit(ch)) {
    s = s * 10 + ch - '0';
    ch = getchar();
  }
  return s * w;
}
const int N = 1e5 + 5;
int cnt, head[N], a[N], val[N];
struct edg {
  int to, nxt;
} e[N << 1];
void add(int u, int v) {
  cnt++;
  e[cnt].to = v;
  e[cnt].nxt = head[u];
  head[u] = cnt;
}
vector<int> g;
queue<int> q;
void work() {
  n = read(), m = read();
  for (int i = 1; i <= m; i++) {
    int u = read(), v = read();
    add(u, v);
    add(v, u);
  }
  for (int i = 1; i <= n; i++) {
    a[i] = read();
    if (a[i] == 0) {
      q.push(i);
      g.push_back(i);
      val[i]++;
    }
  }
  while (q.size()) {
    if (g.size() > n) {
      puts("-1");
      return;
    }
    int u = q.front();
    q.pop();
    for (int i = head[u]; i; i = e[i].nxt) {
      int v = e[i].to;
      val[v]++;
      if (val[v] == a[v]) {
        val[v]++;
        q.push(v);
        g.push_back(v);
      }
    }
  }
  if (g.size() > n) {
    puts("-1");
    return;
  }
  printf("%d\n", (int)g.size());
  for (int i = 0; i < g.size(); i++) printf("%d ", g[i]);
}
}  // namespace FGF
int main() {
  FGF::work();
  return 0;
}
