#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  std::cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
long long int n, m;
vector<long long int> adj[100010];
map<long long int, long long int> visited;
vector<long long int> value, fin_ans;
long long int dfs(long long int num) {
  visited[num] = 1;
  stack<long long int> s;
  long long int count = 0;
  vector<long long int> connect;
  s.push(num);
  while (!s.empty()) {
    long long int z = s.top();
    s.pop();
    count++;
    connect.push_back(z);
    for (long long int i = 0; i < adj[z].size(); i++) {
      long long int k = adj[z][i];
      if (!visited[k]) {
        s.push(k);
        visited[k] = 1;
      }
    }
  }
  map<long long int, long long int> counter;
  queue<long long int> x;
  for (long long int i = 0; i < connect.size(); i++) {
    if (counter[connect[i]] == value[connect[i] - 1]) {
      x.push(connect[i]);
    }
  }
  while (!x.empty()) {
    long long int z = x.front();
    x.pop();
    if (counter[z] != value[z - 1]) {
      continue;
    }
    fin_ans.push_back(z);
    counter[z]++;
    for (long long int i = 0; i < adj[z].size(); i++) {
      counter[adj[z][i]]++;
      if (counter[adj[z][i]] == value[adj[z][i] - 1]) {
        x.push(adj[z][i]);
      }
    }
  }
  return 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int T = 1;
  while (T--) {
    cin >> n >> m;
    for (long long int i = 0; i < m; i++) {
      long long int a, b;
      cin >> a >> b;
      adj[a].push_back(b);
      adj[b].push_back(a);
    }
    for (long long int i = 0; i < n; i++) {
      long long int tmp;
      cin >> tmp;
      value.push_back(tmp);
    }
    for (long long int i = 1; i <= n; i++) {
      if (!visited[i]) {
        dfs(i);
      }
    }
    cout << fin_ans.size() << endl;
    for (long long int i = 0; i < fin_ans.size(); i++) {
      cout << fin_ans[i] << " ";
    }
  }
  return 0;
}
