#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 9;
int a[N], b[N], n, vis[N], m;
vector<int> mp[N];
vector<int> o;
void dfs(int u) {
  b[u]++;
  o.push_back(u);
  for (int i = 0; i < int(mp[u].size()); ++i) {
    b[mp[u][i]]++;
  }
  for (int i = 0; i < int(mp[u].size()); ++i) {
    int to = mp[u][i];
    if (a[to] == b[to]) {
      dfs(to);
    }
  }
}
int main() {
  scanf("%d%d", &n, &m);
  while (m--) {
    int x, y;
    scanf("%d%d", &x, &y);
    mp[x].push_back(y);
    mp[y].push_back(x);
  }
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (int i = 1; i <= n; ++i) {
    if (a[i] == b[i]) {
      dfs(i);
    }
  }
  printf("%d\n", int(o.size()));
  for (int i = 0; i < int(o.size()); ++i) {
    printf("%d ", o[i]);
  }
  return 0;
}
