#include <bits/stdc++.h>
using namespace std;
int A[100010], D[100010], n;
set<int> edge[100010];
vector<int> ans;
void bfs() {
  int i, u;
  memset(A, 0, sizeof(A));
  queue<int> que;
  ans.clear();
  for (i = 1; i <= n; i++) {
    if (D[i] == A[i]) {
      que.push(i);
    }
  }
  set<int>::iterator it;
  while (!que.empty()) {
    u = que.front();
    que.pop();
    if (A[u] != D[u]) continue;
    A[u]++;
    ans.push_back(u);
    for (it = edge[u].begin(); it != edge[u].end(); it++) {
      i = *it;
      A[i]++;
      if (D[i] == A[i]) {
        que.push(i);
      }
    }
  }
  printf("%d\n", ans.size());
  for (i = 0; i + 1 < ans.size(); i++) printf("%d ", ans[i]);
  if (ans.size()) printf("%d\n", ans[ans.size() - 1]);
}
int main() {
  int m, i, a, b;
  while (scanf("%d%d", &n, &m) != EOF) {
    for (i = 1; i <= n; i++) edge[i].clear();
    for (i = 1; i <= m; i++) {
      scanf("%d%d", &a, &b);
      edge[a].insert(b);
      edge[b].insert(a);
    }
    for (i = 1; i <= n; i++) scanf("%d", &D[i]);
    bfs();
  }
  return 0;
}
