#include <bits/stdc++.h>
using namespace std;
const int maxn = 100 * 1000 + 100;
vector<int> v[maxn];
int mark[maxn], a[maxn], val[maxn];
queue<int> q;
priority_queue<int> pq;
int n, m;
void bfs() {
  while (q.size() > 0) {
    int x = q.front();
    if (val[x] > a[x]) {
      q.pop();
      continue;
    }
    val[x]++;
    pq.push(-x - 1);
    for (int i = 0; i < v[x].size(); i++) {
      val[v[x][i]]++;
      if (val[v[x][i]] == a[v[x][i]] && mark[v[x][i]] == 0) {
        mark[v[x][i]] = 1;
        q.push(v[x][i]);
      }
    }
    q.pop();
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;
    v[x].push_back(y);
    v[y].push_back(x);
  }
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++)
    if (a[i] == 0) {
      mark[i] = 1;
      q.push(i);
    }
  bfs();
  cout << pq.size() << endl;
  while (pq.size() > 0) {
    cout << -1 * pq.top() << " ";
    pq.pop();
  }
  cout << endl;
  return 0;
}
