#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  vector<int> adj[n + 5];
  for (int i = 1; i <= m; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  vector<int> ans;
  queue<int> q;
  int ara[n + 5];
  for (int i = 1; i <= n; i++) {
    scanf("%d", &ara[i]);
    if (!ara[i]) {
      q.push(i);
    }
  }
  while (!q.empty()) {
    int t = q.front();
    q.pop();
    if (ara[t]) continue;
    ans.push_back(t);
    for (int i = 0; i < adj[t].size(); i++) {
      ara[adj[t][i]]--;
      if (ara[adj[t][i]] == 0) {
        q.push(adj[t][i]);
      }
    }
  }
  cout << ans.size() << endl;
  for (auto it : ans) {
    cout << it << " ";
  }
}
