#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e11;
const long long mod = 1e9 + 7;
const long long N = 1e5 + 5;
long long n, m, a[N], vis[N], cnt[N];
vector<long long> G[N];
void dfs(long long v) {
  vis[v] = 1;
  cnt[v]++;
  for (long long i : G[v]) cnt[i]++;
  for (long long i : G[v])
    if (a[i] == cnt[i]) dfs(i);
}
int main() {
  ios_base::sync_with_stdio(false);
  memset(vis, 0, sizeof(vis));
  memset(cnt, 0, sizeof(cnt));
  cin >> n >> m;
  while (m--) {
    long long u, v;
    cin >> u >> v;
    u--, v--;
    G[u].push_back(v);
    G[v].push_back(u);
  }
  for (long long i = 0; i < (n); ++i) cin >> a[i];
  for (long long i = 0; i < (n); ++i) {
    if (a[i] == cnt[i]) dfs(i);
  }
  long long k = 0;
  for (long long i = 0; i < (n); ++i) k += vis[i];
  cout << k << endl;
  for (long long i = 0; i < (n); ++i)
    if (vis[i]) cout << i + 1 << " ";
}
