#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> adj[100005];
int t[100002];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    x--, y--;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  for (int i = 0; i < n; i++) cin >> t[i];
  vector<int> ans;
  bool cont = true;
  while (cont) {
    cont = false;
    for (int i = 0; i < n; i++) {
      if (t[i] == 0) {
        ans.push_back(i);
        cont = true;
        for (int j = 0; j < adj[i].size(); j++) {
          t[adj[i][j]]--;
        }
        t[i]--;
      }
    }
  }
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) cout << ans[i] + 1 << " ";
  cout << "\n";
  return 0;
}
