#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 5;
vector<int> adj[MAX];
int a[MAX], b[MAX];
int n, m;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = int(0); i < int(m); i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    adj[u].push_back(v);
    adj[v].push_back(u);
  }
  for (int i = int(1); i < int(n + 1); i++) {
    scanf("%d", a + i);
  }
  queue<int> q;
  for (int i = int(1); i < int(n + 1); i++) {
    if (a[i] == b[i]) {
      q.push(i);
    }
  }
  vector<int> ans;
  while (!q.empty()) {
    int cur = q.front();
    q.pop();
    ans.push_back(cur);
    b[cur]++;
    for (auto &each : adj[cur]) {
      b[each]++;
      if (b[each] == a[each]) {
        q.push(each);
      }
    }
  }
  printf("%d\n", (int)ans.size());
  for (auto &each : ans) {
    printf("%d ", each);
  }
  printf("\n");
  return 0;
}
