#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double EPS = 1e-9;
const int ioo = (~0) - (1 << 31);
const long long loo = (~(long long)0) - ((long long)1 << 63);
int n, m;
vector<int> g[100005];
queue<int> q;
int a[100005];
int num[100005];
int ans[100005];
int ansn;
bool vis[100005];
int main() {
  while (scanf("%d%d", &n, &m) == 2) {
    for (int(i) = 1; (i) <= (n); (i)++) g[i].clear();
    for (int(i) = 1; (i) <= (m); (i)++) {
      int j, k;
      scanf("%d%d", &j, &k);
      g[j].push_back(k);
      g[k].push_back(j);
    }
    while (!q.empty()) q.pop();
    for (int(i) = 1; (i) <= (n); (i)++) {
      scanf("%d", &a[i]);
      if (!a[i]) q.push(i);
    }
    ansn = 0;
    memset((num), 0, sizeof((num)));
    memset((vis), 0, sizeof((vis)));
    bool flag = 1;
    while (!q.empty()) {
      int u = q.front();
      q.pop();
      int l = g[u].size();
      vis[u] = 1;
      num[u]++;
      ans[++ansn] = u;
      if (num[u] == a[u]) {
        for (int(i) = 0; (i) < (l); (i)++) {
          int v = g[u][i];
          num[v]++;
          if (!vis[v]) q.push(v);
        }
      } else {
        for (int(i) = 0; (i) < (l); (i)++) {
          int v = g[u][i];
          num[v]++;
          if (!vis[v] && num[v] == a[v]) q.push(v);
        }
      }
    }
    for (int(i) = 1; (i) <= (n); (i)++)
      if (num[i] == a[i]) flag = 0;
    if (!flag)
      printf("0\n");
    else {
      printf("%d\n", ansn);
      for (int(i) = 1; (i) <= (ansn); (i)++) printf("%d ", ans[i]);
      printf("\n");
    }
  }
  return (0);
}
