#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, m, a[N], d[N];
vector<int> g[N];
queue<int> Q;
vector<int> ans;
int main() {
  scanf("%d%d", &n, &m);
  while (m--) {
    int u, v;
    scanf("%d%d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    if (!a[i]) Q.push(i);
  }
  while (!Q.empty()) {
    int u = Q.front();
    Q.pop();
    ans.push_back(u);
    d[u]++;
    for (int i = 0; i < (int)g[u].size(); i++) {
      int v = g[u][i];
      d[v]++;
      if (d[v] == a[v]) Q.push(v);
    }
  }
  printf("%d\n", (int)ans.size());
  for (int i = 0; i < (int)ans.size(); i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
