#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > g;
vector<int> ans;
int t1, t2, n, m;
int a[100001], d[100001];
int main() {
  scanf("%d%d", &n, &m);
  g.resize(n + 1);
  for (int i = 0; i < m; i++) {
    scanf("%d%d", &t1, &t2);
    g[t1].push_back(t2);
    g[t2].push_back(t1);
  }
  queue<int> q;
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    if (d[i] == a[i]) q.push(i);
  }
  while (!q.empty()) {
    int v = q.front();
    q.pop();
    if (d[v] == a[v]) {
      d[v]++;
      ans.push_back(v);
      for (int i = 0; i < (int)g[v].size(); i++) {
        int to = g[v][i];
        if (++d[to] == a[to]) {
          q.push(to);
        }
      }
    }
  }
  sort(ans.begin(), ans.end());
  printf("%d\n", ans.size());
  for (int i = 0; i < (int)ans.size(); i++) printf("%d ", ans[i]);
}
