#include <bits/stdc++.h>
using namespace std;
int n, m;
int target[101010];
int current[101010];
class Graph {
 private:
  int mNodeCount;

 public:
  vector<int> edge[101010];

 public:
  Graph(int nodeCount) {
    mNodeCount = nodeCount;
    return;
  }
  void addEdge(int u, int v) {
    edge[u].push_back(v);
    edge[v].push_back(u);
  }
};
Graph jittat(100007);
queue<int> bank;
bool visited[101010];
queue<int> pressBank;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    jittat.addEdge(u, v);
  }
  for (int i = 1; i <= n; i++) scanf("%d", &target[i]);
  for (int i = 1; i <= n; i++) current[i] = 0;
  for (int i = 1; i <= n; i++)
    if (target[i] == 0) {
      bank.push(i);
      visited[i] = true;
    }
  while (!bank.empty()) {
    int cur = bank.front();
    bank.pop();
    if (current[cur] != target[cur]) continue;
    pressBank.push(cur);
    current[cur]++;
    for (int i = 0; i < jittat.edge[cur].size(); i++) {
      int tar = jittat.edge[cur][i];
      current[tar]++;
      if (current[tar] != target[tar]) continue;
      if (visited[tar]) continue;
      visited[tar] = true;
      bank.push(tar);
    }
  }
  printf("%d\n", pressBank.size());
  while (!pressBank.empty()) {
    printf("%d ", pressBank.front());
    pressBank.pop();
  }
  return 0;
}
