#include <bits/stdc++.h>
using namespace std;
const int nmax = 1e5 + 5;
vector<int> adj[nmax];
int val[nmax];
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);
  }
  vector<int> wrong, ans;
  for (int i = 1; i <= n; ++i) {
    cin >> val[i];
    if (val[i] == 0) wrong.push_back(i);
  }
  for (int i = 0; i < wrong.size(); ++i) {
    int cur = wrong[i];
    if (val[cur] != 0) continue;
    ans.push_back(cur);
    for (int j = 0; j < adj[cur].size(); ++j) {
      int nxt = adj[cur][j];
      if (--val[nxt] == 0) wrong.push_back(nxt);
    }
  }
  cout << ans.size() << '\n';
  for (int i = 0; i < ans.size(); ++i)
    cout << ans[i] << " \n"[i == ans.size() - 1];
}
