#include <bits/stdc++.h>
using namespace std;
int n, m, u, v, a[100005];
vector<vector<int>> adjList;
vector<int> ans;
queue<int> q;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  adjList.resize(n + 5);
  for (int i = 0; i < m; i++) {
    cin >> u >> v;
    adjList[u].push_back(v);
    adjList[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] == 0) {
      q.push(i);
    }
  }
  while (!q.empty()) {
    u = q.front();
    q.pop();
    if (a[u] == 0) {
      ans.push_back(u);
      a[u]--;
      for (int i = 0; i < adjList[u].size(); i++) {
        v = adjList[u][i];
        a[v]--;
        if (a[v] == 0) {
          q.push(v);
        }
      }
    }
  }
  cout << ans.size() << '\n';
  for (int i = 0; i < ans.size(); i++) {
    if (i) {
      cout << " ";
    }
    cout << ans[i];
  }
  cout << '\n';
  return 0;
}
