#include <bits/stdc++.h>
using namespace std;
using namespace std;
long long n, m, i, j, k, a[100001], vis[100001], stat, dp[100001];
vector<long long> graph[100001], ans;
void dfs(long long node) {
  if (vis[node] == 1 and a[node] == dp[node]) {
    stat = 0;
    return;
  }
  if (vis[node] == 1) return;
  vis[node] = 1;
  dp[node]++;
  ans.push_back(node);
  for (long long x : graph[node]) {
    dp[x]++;
    if (dp[x] == a[x]) dfs(x);
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  stat = 1;
  cin >> n >> m;
  ans.clear();
  for (i = 0; i < m; i++) {
    cin >> j >> k;
    graph[j].push_back(k);
    graph[k].push_back(j);
  }
  for (i = 1; i < n + 1; i++) {
    cin >> a[i];
    vis[i] = 0;
    dp[i] = 0;
  }
  for (i = 1; i < n + 1; i++) {
    if (vis[i] == 1 and a[i] == dp[i]) {
      stat = 0;
      break;
    }
    if (a[i] == dp[i]) dfs(i);
  }
  if (stat == 0)
    cout << -1;
  else {
    cout << ans.size() << endl;
    for (long long x : ans) cout << x << " ";
  }
  return (0);
}
