#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int a[N];
int b[N];
vector<int> ivec[N];
queue<int> ique;
queue<int> isol;
int main() {
  int n, m, x, y;
  while (scanf("%d %d", &n, &m) != EOF) {
    while (!ique.empty()) {
      ique.pop();
    }
    while (!isol.empty()) {
      isol.pop();
    }
    for (int i = 1; i <= n; i++) {
      ivec[i].clear();
      b[i] = 0;
    }
    for (int i = 1; i <= m; i++) {
      scanf("%d %d", &x, &y);
      ivec[x].push_back(y);
      ivec[y].push_back(x);
    }
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      if (a[i] == 0) {
        ique.push(i);
      }
    }
    while (ique.size() > 0) {
      int t = ique.front();
      ique.pop();
      if (a[t] != b[t]) continue;
      isol.push(t);
      b[t] += 1;
      for (int i = 0; i < ivec[t].size(); i++) {
        int tmp = ivec[t][i];
        b[tmp] += 1;
        if (b[tmp] == a[tmp]) {
          ique.push(tmp);
        }
      }
    }
    printf("%d\n", isol.size());
    while (isol.size() > 0) {
      printf("%d ", isol.front());
      isol.pop();
    }
    printf("\n");
  }
  return 0;
}
