#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
vector<int> g[maxn];
int src[maxn], dest[maxn];
bool vis[maxn];
int main() {
  int n, m;
  int a, b;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &a, &b);
    a--, b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }
  queue<int> Q;
  for (int i = 0; i < n; i++) {
    scanf("%d", &dest[i]);
    if (dest[i] == 0) {
      Q.push(i);
    }
  }
  int ans = 0;
  while (!Q.empty()) {
    int i = Q.front();
    Q.pop();
    if (dest[i] == src[i]) {
      vis[i] = true;
      ans++;
      src[i]++;
      int len = g[i].size();
      for (int j = 0; j < len; j++) {
        src[g[i][j]]++;
        if (src[g[i][j]] == dest[g[i][j]]) {
          Q.push(g[i][j]);
        }
      }
    }
  }
  printf("%d\n", ans);
  for (int i = 0; i < n; i++) {
    if (vis[i]) {
      ans--;
      printf("%d%c", i + 1, ans ? ' ' : '\n');
    }
  }
  return 0;
}
