#include <bits/stdc++.h>
using namespace std;
const int N = int(1e5) + 5;
const int INF = int(1e9) + 7;
const long long MINF = 1e18;
vector<int> g[N];
set<int> x;
int a[N];
int b[N];
vector<int> ans;
void solve() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int l, r;
    cin >> l >> r;
    g[l].push_back(r);
    g[r].push_back(l);
  }
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] == 0) {
      x.insert(i);
    }
  }
  int kol = 0;
  while (x.size() != 0) {
    int num = *x.begin();
    x.erase(num);
    ans.push_back(num);
    kol++;
    b[num]++;
    int v = num;
    for (int i = 0; i < g[v].size(); i++) {
      if (b[g[v][i]] == a[g[v][i]]) {
        b[g[v][i]]++;
        x.erase(g[v][i]);
      } else {
        b[g[v][i]]++;
        if (b[g[v][i]] == a[g[v][i]]) {
          x.insert(g[v][i]);
        }
      }
    }
    if (kol == n && x.size() != 0) {
      cout << -1;
      return;
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
}
int main() {
  ios_base::sync_with_stdio(0);
  int TT = 1;
  while (TT--) {
    solve();
  }
  return 0;
}
