#include <bits/stdc++.h>
using namespace std;
const int size = 200000;
vector<int> ar[size], ans;
int st[size];
queue<int> q;
bool mark[size];
int main() {
  int n, m, i, a, b;
  cin >> n >> m;
  for (i = 0; i < m; i++) cin >> a >> b, ar[a].push_back(b), ar[b].push_back(a);
  for (i = 1; i <= n; i++) {
    cin >> st[i];
    ar[i].push_back(i);
    if (st[i] == 0) q.push(i), mark[i] = 1;
  }
  while (q.size()) {
    a = q.front(), q.pop();
    if (!mark[a]) continue;
    ans.push_back(a);
    for (i = 0; i < ar[a].size(); i++) {
      st[ar[a][i]]--;
      if (st[ar[a][i]] == 0) q.push(ar[a][i]), mark[ar[a][i]] = 1;
      if (st[ar[a][i]] == -1) mark[ar[a][i]] = 0;
    }
  }
  cout << ans.size() << endl;
  for (i = 0; i < ans.size(); i++) cout << ans[i] << ' ';
  cout << endl;
  return 0;
}
