#include <bits/stdc++.h>
using namespace std;
int a[100005], value[100005], que[100105];
vector<int> relation[100005], ans;
int main() {
  int n, m, i, j, frnt, rear, now;
  while ((scanf("%d %d", &n, &m)) != EOF) {
    frnt = 0;
    rear = 0;
    while (m--) {
      scanf("%d %d", &i, &j);
      relation[i].push_back(j);
      relation[j].push_back(i);
    }
    for (i = 1; i <= n; i++) {
      value[i] = 0;
      scanf("%d", &a[i]);
      if (!a[i]) que[rear++] = i;
    }
    while (frnt != rear) {
      now = que[frnt++];
      if (a[now] == value[now]) {
        value[now]++;
        ans.push_back(now);
        for (i = 0; i < relation[now].size(); i++) {
          j = relation[now][i];
          value[j]++;
          if (value[j] == a[j]) que[rear++] = j;
        }
      }
    }
    printf("%d\n", ans.size());
    if (ans.size() > 0) {
      printf("%d", ans[0]);
      for (i = 1; i < ans.size(); i++) printf(" %d", ans[i]);
      printf("\n");
    }
    ans.clear();
    for (i = 1; i <= n; i++) relation[i].clear();
  }
  return 0;
}
