#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[100003];
int sz[100003];
int cnt[100003];
bool mark[100003];
vector<int> ans;
vector<int> adj[100003];
void dfs(int node) {
  mark[node] = true;
  cnt[node]++;
  ans.push_back(node);
  for (int i = 0; i < sz[node]; i++) cnt[adj[node][i]]++;
  for (int i = 0; i < sz[node]; i++)
    if (a[adj[node][i]] == cnt[adj[node][i]] && !mark[adj[node][i]])
      dfs(adj[node][i]);
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0, x, y; i < m; i++) {
    scanf("%d%d", &x, &y);
    adj[x].push_back(y);
    adj[y].push_back(x);
    sz[x]++, sz[y]++;
  }
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++)
    if (a[i] == cnt[i] && !mark[i]) dfs(i);
  int vsz = ans.size();
  printf("%d\n", vsz);
  for (int i = 0; i < vsz; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
