#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100000;
int A[MAXN + 10];
int B[MAXN + 10];
vector<int> g[MAXN + 10];
int p[MAXN + 10];
int n, m, t;
void dfs(int cur) {
  p[t++] = cur;
  B[cur]++;
  for (int i = 0; i < (int)g[cur].size(); i++) {
    int next = g[cur][i];
    B[next]++;
    if (B[next] == A[next]) dfs(next);
  }
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (int i = 1; i <= n; i++) scanf("%d", &A[i]);
  t = 0;
  for (int i = 1; i <= n; i++) {
    if (A[i] == B[i]) dfs(i);
  }
  printf("%d\n", t);
  for (int i = 0; i < t; i++) printf("%d ", p[i]);
  printf("\n");
  return 0;
}
