#include <bits/stdc++.h>
using namespace std;
vector<int> L;
int n, dest[111111], nt[111111], head[111111], a[111111], m, b[111111], l = 0;
vector<int> ans;
vector<int> g[111111];
void add(int u, int v) {
  l++;
  dest[l] = v;
  nt[l] = head[u];
  head[u] = l;
}
int main() {
  int x, y;
  scanf("%d%d", &n, &m);
  for (int i = 1; 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]);
  }
  while (true) {
    int in = -1;
    for (int i = 1; i <= n; i++) {
      if (a[i] == b[i]) {
        L.push_back(i);
      }
    }
    if (L.empty()) break;
    int k = 0;
    while (k < L.size()) {
      ans.push_back(L[k]);
      b[L[k]]++;
      for (int j = 0; j < g[L[k]].size(); j++) b[g[L[k]][j]]++;
      k++;
    }
    L.erase(L.begin(), L.end());
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) printf("%d ", ans[i]);
  return 0;
}
