#include <bits/stdc++.h>
const int Maxn = 1e5 + 7;
const int inf = 1e9 + 7;
using namespace std;
vector<int> v[Maxn], ans;
queue<int> q;
int a[Maxn], vis[Maxn], cnt[Maxn];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  for (__typeof(m) i = (0) - ((0) > (m)); i != (m) - ((0) > (m));
       i += 1 - 2 * ((0) > (m))) {
    int x, y;
    cin >> x >> y;
    v[--x].push_back(--y);
    v[y].push_back(x);
  }
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n))) {
    cin >> a[i];
    if (a[i] == 0) q.push(i), vis[i] = true;
  }
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    ans.push_back(u);
    cnt[u]++;
    for (__typeof(v[u].end()) i =
             (v[u].begin()) - ((v[u].begin()) > (v[u].end()));
         i != (v[u].end()) - ((v[u].begin()) > (v[u].end()));
         i += 1 - 2 * ((v[u].begin()) > (v[u].end()))) {
      cnt[*i]++;
      if (!vis[*i] && cnt[*i] == a[*i]) vis[*i] = true, q.push(*i);
    }
  }
  cout << (((int)ans.size())) << endl;
  for (__typeof(ans.end()) i = (ans.begin()) - ((ans.begin()) > (ans.end()));
       i != (ans.end()) - ((ans.begin()) > (ans.end()));
       i += 1 - 2 * ((ans.begin()) > (ans.end())))
    cout << *i + 1 << ' ';
}
