#include <bits/stdc++.h>
using namespace std;
const int N = 100500;
vector<int> a[N];
bool was[N];
int c[N], b[N];
int kol, n;
void dfs(int v) {
  if (was[v]) return;
  was[v] = true;
  b[v]++;
  for (int j = 0; j < a[v].size(); j++) {
    int to = a[v][j];
    b[to]++;
    if (!was[to] && b[to] == c[to]) {
      dfs(to);
    }
  }
  if (b[v] > n) cout << -1, exit(0);
}
int main() {
  srand(time(NULL));
  int m;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    int x, y;
    cin >> x >> y;
    a[x].push_back(y);
    a[y].push_back(x);
  }
  for (int i = 1; i <= n; i++) {
    cin >> c[i];
  }
  for (int i = 1; i <= n; i++) {
    if (c[i] == 0 && b[i] == 0) {
      dfs(i);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (was[i]) kol++;
    if (c[i] == b[i]) cout << -1, exit(0);
  }
  cout << kol << endl;
  for (int i = 1; i <= n; i++) {
    if (was[i]) cout << i << " ";
  }
  return 0;
}
