#include <bits/stdc++.h>
using namespace std;
vector<int> adj[int(1e5) + 10];
int ary[int(1e5) + 10];
bool mark[int(1e5) + 10];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a, b;
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  queue<int> que;
  for (int i = 1; i <= n; i++) {
    cin >> ary[i];
    if (ary[i] == 0) que.push(i);
  }
  while (!que.empty()) {
    int top = que.front();
    que.pop();
    if (ary[top] != 0) continue;
    ary[top]--;
    mark[top] = true;
    for (int v : adj[top]) {
      ary[v]--;
      if (ary[v] == 0) que.push(v);
    }
  }
  int ans = 0;
  for (bool i : mark) ans += i;
  cout << ans << endl;
  for (int i = 1; i <= n; i++)
    if (mark[i]) cout << i << " ";
  return 0;
}
