#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int N, M;
int ar[MAXN];
vector<int> way[MAXN];
vector<int> res;
int cnt[MAXN];
void dfs(int node) {
  if (cnt[node] != ar[node]) return;
  cnt[node]++;
  res.push_back(node);
  if (res.size() > N) {
    puts("-1");
    exit(0);
  }
  for (int i = 0; i < way[node].size(); i++) cnt[way[node][i]]++;
  for (int i = 0; i < way[node].size(); i++) dfs(way[node][i]);
}
int main() {
  cin >> N >> M;
  while (M--) {
    int a, b;
    scanf(" %d %d", &a, &b);
    way[a].push_back(b);
    way[b].push_back(a);
  }
  for (int i = 1; i <= N; i++) scanf(" %d", ar + i);
  for (int i = 1; i <= N; i++)
    if (cnt[i] == ar[i]) {
      cnt[i]++;
      res.push_back(i);
      for (int j = 0; j < way[i].size(); j++) cnt[way[i][j]]++;
      for (int j = 0; j < way[i].size(); j++) dfs(way[i][j]);
    }
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); i++) printf("%d ", res[i]);
  return 0;
}
