#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, m, a[N], cnt[N];
bool vis[N];
vector<int> g[N], ans;
void dfs(int x) {
  vis[x] = 1;
  cnt[x]++;
  ans.push_back(x);
  for (auto ver : g[x]) {
    cnt[ver]++;
    if (!vis[ver] && a[ver] == cnt[ver]) dfs(ver);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] == cnt[i]) {
      dfs(i);
    }
  }
  cout << ans.size() << "\n";
  for (auto x : ans) {
    cout << x << " ";
  }
  return 0;
}
