#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void umax(T &a, T b) {
  if (a < b) a = b;
}
const int maxn = 100000 + 10;
const int INF = 1e9 + 7;
vector<int> Adj[maxn];
vector<int> ans;
int a[maxn], visit[maxn];
inline void solve(void) {
  int n, m, x, y;
  cin >> n >> m;
  for (int i = (0); i < (m); i++) {
    cin >> x >> y;
    --x;
    --y;
    Adj[x].push_back(y), Adj[y].push_back(x);
  }
  for (int i = (0); i < (n); i++) {
    cin >> a[i];
  }
  while (true) {
    int f1 = 0;
    for (int j = (0); j < (n); j++) {
      if (a[j]) continue;
      f1++;
      int f = j;
      ans.push_back(f);
      a[f]--;
      for (int i = (0); i < (Adj[f].size()); i++) {
        int u = Adj[f][i];
        a[u]--;
      }
    }
    if (f1 == 0) break;
  }
  cout << ans.size() << endl;
  for (int i = (0); i < (ans.size()); i++) cout << ans[i] + 1 << " ";
}
void init() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
}
int main(int argc, const char *argv[]) {
  init();
  solve();
  return 0;
}
