#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
const int mx = 1e5 + 5;
int n, m;
vector<int> G[mx];
int d[mx];
bool v[mx], on[mx];
queue<int> q;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0, a, b; i < m; i++) {
    cin >> a >> b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  for (int i = 1; i <= n; i++) {
    cin >> d[i];
    if (!d[i]) q.push(i);
  }
  while (!q.empty()) {
    int t = q.front();
    q.pop();
    if (d[t] != 0) continue;
    on[t] = 1;
    for (int u : G[t]) {
      --d[u];
      if (!d[u]) {
        v[u] = 1;
        q.push(u);
      }
    }
  }
  cout << count(on + 1, on + n + 1, true) << '\n';
  for (int i = 1; i <= n; i++) {
    if (on[i] == 1) cout << i << ' ';
  }
  cout << '\n';
}
