#include <bits/stdc++.h>
using namespace std;
const int MaxN = 1e5;
int a[MaxN + 1], b[MaxN + 1];
int n, m;
vector<int> g[MaxN + 1];
queue<int> q;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= m; i++) {
    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]);
    if (!a[i]) q.push(i);
  }
  vector<int> ans;
  while (!q.empty()) {
    int cur = q.front();
    q.pop();
    b[cur]++;
    ans.push_back(cur);
    for (int i = 0; i < g[cur].size(); i++) {
      int v = g[cur][i];
      b[v]++;
      if (b[v] == a[v]) q.push(v);
    }
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) printf("%d ", ans[i]);
  return 0;
}
