#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return a % b == 0 ? b : gcd(b, a % b); }
const int MAXN = 100010;
struct Edge {
  int u, v, next;
  int w;
} edge[MAXN * 4];
int head[MAXN], tot, N, M;
struct node {
  int a, idx;
  friend bool operator<(const node &A, const node &B) { return A.a < B.a; }
} src[MAXN];
void init() {
  tot = 0;
  memset(head, -1, sizeof(head));
}
void add_edge(int u, int v, int w) {
  edge[tot].u = u;
  edge[tot].v = v;
  edge[tot].w = w;
  edge[tot].next = head[u];
  head[u] = tot++;
}
int val[MAXN];
vector<int> ans;
queue<int> q;
void update(int u) {
  while (!q.empty()) q.pop();
  q.push(u);
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int i = head[u]; i != -1; i = edge[i].next) {
      int v = edge[i].v;
      val[v] += 1;
      if (val[v] == src[v].a) {
        val[v]++;
        ans.push_back(v);
        q.push(v);
      }
    }
  }
}
int main() {
  while (scanf("%d%d", &N, &M) != EOF) {
    init();
    for (int i = 0; i < M; i++) {
      int u, v;
      scanf("%d%d", &u, &v);
      add_edge(u, v, 97);
      add_edge(v, u, 97);
    }
    for (int i = 1; i <= N; i++) {
      scanf("%d", &src[i].a);
      src[i].idx = i;
    }
    ans.clear();
    memset(val, 0, sizeof(val));
    bool flag = false;
    for (int i = 1; i <= N; i++) {
      if (src[i].a == val[i]) {
        ans.push_back(i);
        val[i]++;
        update(i);
      }
    }
    if (flag)
      puts("-1");
    else {
      printf("%d\n", ans.size());
      for (int i = 0; i < (int)ans.size(); i++) printf("%d ", ans[i]);
      puts("");
    }
  }
  return 0;
}
