#include <bits/stdc++.h>
using namespace std;
int n, m, d[100005], curr[100005], tmp;
queue<int> q;
vector<int> v[100005], bas;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1, a, b; i <= m; i++) {
    scanf("%d %d", &a, &b);
    v[a].push_back(b);
    v[b].push_back(a);
  }
  for (int i = 1; i <= n; i++) {
    scanf("%d", &d[i]);
    if (d[i] == 0) q.push(i);
  }
  while (!q.empty()) {
    tmp = q.front();
    q.pop();
    if (curr[tmp] != d[tmp]) continue;
    bas.push_back(tmp);
    for (int i = 0; i < (int)v[tmp].size(); i++) {
      curr[v[tmp][i]]++;
      if (curr[v[tmp][i]] == d[v[tmp][i]]) {
        q.push(v[tmp][i]);
      }
    }
    curr[tmp]++;
  }
  sort(bas.begin(), bas.end());
  printf("%d \n", bas.size());
  for (int i = 0; i < (int)bas.size(); i++) printf("%d ", bas[i]);
}
