#include <bits/stdc++.h>
using namespace std;
vector<int> V[100010];
int s[100010];
int x[100010], ans[100010];
bool used[100010];
int c;
void dfs(int rt) {
  for (int i = 0; i < V[rt].size(); i++) s[V[rt][i]]++;
  for (int i = 0; i < V[rt].size(); i++) {
    if (s[V[rt][i]] == x[V[rt][i]]) {
      s[V[rt][i]]++;
      ans[++c] = V[rt][i];
      dfs(V[rt][i]);
    }
  }
}
int main() {
  int n, m;
  while (cin >> n >> m) {
    memset(s, 0, sizeof(s));
    c = 0;
    memset(used, 0, sizeof(used));
    for (int i = 1; i <= n; i++) V[i].clear();
    for (int i = 1; i <= m; i++) {
      int a, b;
      cin >> a >> b;
      V[a].push_back(b);
      V[b].push_back(a);
    }
    for (int i = 1; i <= n; i++) cin >> x[i];
    int w;
    for (int i = 1; i <= n; i++) {
      if (s[i] == x[i]) {
        s[i]++;
        dfs(i);
        ans[++c] = i;
      }
    }
    cout << c << endl;
    for (int i = 1; i <= c; i++) cout << ans[i] << " ";
    cout << endl;
  }
  return 0;
}
