#include <bits/stdc++.h>
using namespace std;
vector<int> v[100100];
int n, m;
int val[100100];
queue<int> q;
int a[100100];
bool press[100100];
int k;
int main() {
  int i, j;
  scanf("%d %d", &n, &m);
  memset(val, 0, sizeof(val));
  memset(press, false, sizeof(press));
  for (i = 0; i < m; i++) {
    int x, y;
    scanf("%d %d", &x, &y);
    x--, y--;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == 0) {
      q.push(i);
    }
  }
  int pre, cur;
  while (!q.empty()) {
    pre = q.front();
    q.pop();
    press[pre] = true;
    k++;
    val[pre]++;
    for (i = 0; i < v[pre].size(); i++) {
      cur = v[pre][i];
      val[cur]++;
      if (val[cur] == a[cur]) {
        q.push(cur);
      }
    }
  }
  printf("%d\n", k);
  int temp = 0;
  for (i = 0; i < n; i++) {
    if (press[i]) {
      if (temp == k - 1)
        printf("%d\n", i + 1);
      else
        printf("%d ", i + 1);
      temp++;
    }
  }
}
