#include <bits/stdc++.h>
using namespace std;
list<int> connected[100000] = {};
int a[100000] = {};
int sch[100000] = {};
int beenpressed[100000] = {};
int pc = 0;
int line[300000] = {};
int lenline = 0;
int main() {
  int n, m, tx, ty;
  cin >> n >> m;
  for (int j = 0; j < m; j++) {
    cin >> tx >> ty;
    connected[tx - 1].push_back(ty - 1);
    connected[ty - 1].push_back(tx - 1);
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
    if (a[i] == 0) {
      line[lenline] = i;
      lenline++;
    }
  }
  if (lenline == 0) {
    cout << 0 << endl;
    return 0;
  } else {
    int prsi = 0;
    while (prsi < lenline) {
      if (sch[line[prsi]] > a[line[prsi]]) {
        prsi++;
        continue;
      }
      sch[line[prsi]]++;
      beenpressed[line[prsi]]++;
      pc++;
      list<int>::iterator iter = connected[line[prsi]].begin();
      if (connected[line[prsi]].size() != 0)
        while (iter != connected[line[prsi]].end()) {
          sch[*iter]++;
          if (sch[*iter] == a[*iter]) {
            line[lenline] = *iter;
            lenline++;
          }
          iter++;
        }
      prsi++;
    }
    cout << pc << endl;
    for (int i = 0; i < n; i++) {
      if (beenpressed[i] > 0) cout << i + 1 << ' ';
    }
  }
  return 0;
}
