#include <bits/stdc++.h>
template <class T>
inline void checkmax(T &x, T y) {
  if (x < y) x = y;
}
template <class T>
inline void checkmin(T &x, T y) {
  if (x > y) x = y;
}
template <class T>
inline T Min(T x, T y) {
  return (x > y ? y : x);
}
template <class T>
inline T Max(T x, T y) {
  return (x < y ? y : x);
}
using namespace std;
vector<int> a[111111], ans;
int n, m, b[111111], c[111111];
int main() {
  while (scanf("%d%d", &n, &m) == 2) {
    for (int i = 1; i <= n; ++i) a[i].clear();
    ans.clear();
    memset(c, 0, sizeof(c));
    for (int i = 1; i <= m; ++i) {
      int u, v;
      scanf("%d%d", &u, &v);
      a[u].push_back(v);
      a[v].push_back(u);
    }
    for (int i = 1; i <= n; ++i) scanf("%d", b + i);
    queue<int> q;
    for (int i = 1; i <= n; ++i)
      if (!b[i]) q.push(i);
    while (!q.empty()) {
      int v = q.front();
      q.pop();
      if (b[v] == c[v])
        ans.push_back(v);
      else
        continue;
      c[v]++;
      for (int i = 0; i < a[v].size(); ++i) {
        c[a[v][i]]++;
        if (b[a[v][i]] == c[a[v][i]]) q.push(a[v][i]);
      }
    }
    printf("%d\n", ans.size());
    for (int i = 0; i < ans.size(); ++i) printf("%d ", ans[i]);
    if (ans.size()) puts("");
  }
  return 0;
}
