#include <bits/stdc++.h>
#pragma warning(disable : 4786)
using namespace std;
int Max(int a, int b) { return a > b ? a : b; }
int n, m, inx[100009], match[100009], valu[100009], flag[100009], pos;
vector<int> cont[100009];
int goline(int i);
int press(int i) {
  int j, k;
  flag[i] = 1;
  valu[i]++;
  for (j = 0; j < inx[i]; j++) {
    k = goline(cont[i][j]);
    if (k == 0) return 0;
  }
  return 1;
}
int goline(int i) {
  valu[i]++;
  if (valu[i] == match[i]) {
    int p, k;
    if (flag[i] == 0) p = press(i);
    if (p == 0) {
      int q;
      for (k = 0; k < inx[i]; k++) {
        if (flag[k]) q = press(k);
        if (q == 0) break;
      }
    }
  }
  return 1;
}
int main() {
  int i, j, a, b, c;
  pos = true;
  scanf("%d %d", &n, &m);
  for (i = 0; i < m; i++) {
    scanf("%d %d", &a, &b);
    cont[a].push_back(b);
    inx[a]++;
    cont[b].push_back(a);
    inx[b]++;
  }
  for (i = 1; i <= n; i++) {
    scanf("%d", &match[i]);
  }
  for (i = 1; i <= n; i++) {
    if (match[i] == valu[i]) {
      c = press(i);
      if (c == 0) {
        pos = 0;
        break;
      }
    }
  }
  if (pos == true) {
    int cnt = 0;
    for (i = 1; i <= n; i++)
      if (flag[i]) cnt++;
    printf("%d\n", cnt);
    for (i = 1; i <= n; i++)
      if (flag[i]) printf("%d ", i);
  } else
    printf("-1\n");
  return 0;
}
