#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000 * 100 + 10;
vector<int> g[maxn];
int a[maxn], b[maxn];
bool p[maxn];
int n, m;
void input() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  for (int i = 0; i < n; i++) cin >> a[i];
}
void bfs(int v) {
  queue<int> q;
  q.push(v);
  while (!q.empty()) {
    p[q.front()] = true;
    int u = q.front();
    b[u]++;
    for (int i = 0; i < g[u].size(); i++) {
      b[g[u][i]]++;
      if (b[g[u][i]] == a[g[u][i]]) q.push(g[u][i]);
    }
    q.pop();
  }
}
int main() {
  input();
  for (int i = 0; i < n; i++)
    if (b[i] == a[i]) bfs(i);
  int ans = 0;
  for (int i = 0; i < n; i++) ans += p[i];
  cout << ans << endl;
  ;
  for (int i = 0; i < n; i++)
    if (p[i]) cout << i + 1 << " ";
  return 0;
}
