#include <bits/stdc++.h>
using namespace std;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
int n;
int m;
int was[100000];
vector<int> v[100000];
int p[100000];
int q[100000];
vector<int> res;
int fix(int x) {
  if (was[x] != 2 || p[x] != q[x]) return 0;
  res.push_back(x + 1);
  q[x]++;
  for (int i = 0; i < ((int)(v[x]).size()); i++) q[v[x][i]]++;
  for (int i = 0; i < ((int)(v[x]).size()); i++) fix(v[x][i]);
  return 0;
}
int go(int x) {
  was[x] = 1;
  for (int i = 0; i < ((int)(v[x]).size()); i++) {
    int y = v[x][i];
    if (!was[y]) go(y);
  }
  was[x] = 2;
  fix(x);
  return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int a, b;
    scanf("%d%d", &a, &b);
    a--;
    b--;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  for (int i = 0; i < n; i++) scanf("%d", &p[i]);
  for (int i = 0; i < n; i++)
    if (!was[i]) go(i);
  printf("%d\n", ((int)(res).size()));
  sort((res).begin(), (res).end());
  for (int i = 0; i < ((int)(res).size()); i++) printf("%d ", res[i]);
  printf("\n");
  return 0;
}
