#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
vector<int> e[N];
bool ok[N];
int p[N], a[N];
int main() {
  int n, m, x, y;
  cin >> n >> m;
  for (int i = 1; i <= m; ++i) {
    cin >> x >> y;
    e[x].push_back(y);
    e[y].push_back(x);
  }
  for (int i = 1; i <= n; ++i) {
    ++p[i];
    for (int j = 0; j < e[i].size(); ++j) ++p[e[i][j]];
  }
  queue<int> q;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= n; ++i)
    if (p[i] == a[i]) q.push(i);
  int s;
  while (!q.empty()) {
    s = q.front();
    q.pop();
    if (p[s] != a[s]) continue;
    --p[s];
    ok[s] = 1;
    for (int i = 0; i < e[s].size(); ++i)
      if (--p[e[s][i]] == a[e[s][i]]) q.push(e[s][i]);
  }
  int ans = 0;
  for (int i = 1; i <= n; ++i)
    if (!ok[i]) ++ans;
  cout << ans << '\n';
  for (int i = 1; i <= n; ++i)
    if (!ok[i]) cout << i << ' ';
  return 0;
}
