#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
struct edge {
  int to, next;
} e[N * 2];
int n, m, tot, cnt, head[N], a[N], cur[N], p[N];
inline void add(int u, int v) {
  e[++tot].to = v, e[tot].next = head[u], head[u] = tot;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    add(u, v), add(v, u);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  queue<int> que;
  for (int i = 1; i <= n; i++) {
    if (!a[i]) que.push(i);
  }
  while (!que.empty()) {
    int x = que.front();
    que.pop();
    if (cur[x] != a[x]) continue;
    p[++cnt] = x, cur[x]++;
    for (int i = head[x]; i; i = e[i].next) {
      int y = e[i].to;
      if (++cur[y] == a[y]) {
        que.push(y);
      }
    }
  }
  printf("%d\n", cnt);
  for (int i = 1; i <= cnt; i++) {
    printf("%d ", p[i]);
  }
  return 0;
}
