#include <bits/stdc++.h>
const int MOD = 1E9 + 7;
const int N = 500000 + 5;
const int dx[] = {-1, 1, 0, 0, -1, -1, 1, 1};
const int dy[] = {0, 0, -1, 1, -1, 1, -1, 1};
using namespace std;
vector<int> G[N];
queue<int> Q;
int res[N];
int a[N];
int num[N];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    G[x].push_back(y);
    G[y].push_back(x);
  }
  int tot = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == 0) {
      res[++tot] = i;
      Q.push(i);
    }
  }
  while (!Q.empty()) {
    int x = Q.front();
    Q.pop();
    for (int y = 0; y < G[x].size(); y++) {
      int temp = G[x][y];
      num[x]++;
      num[temp]++;
      if (a[temp] == num[temp]) {
        Q.push(temp);
        res[++tot] = temp;
      }
    }
  }
  printf("%d\n", tot);
  sort(res + 1, res + 1 + tot);
  for (int i = 1; i <= tot; i++) printf("%d ", res[i]);
  printf("\n");
  return 0;
}
