#include <bits/stdc++.h>   #pragma GCC optimize( Ofast )   using namespace std;   const int INF = 1e9, MOD = INF - 1755647;   int gcd(int a, int b) { return (b ? gcd(b, a % b) : a); }   int power(int a, int b) {     return (!b ? 1 : power(a, b / 2) * power(a, b / 2) * (b % 2 ? a : 1));   }   int mod(int a) { return (a % MOD + MOD) % MOD; }   const int N = 2e5 + 20;   struct node {     int val = 0;     bool marked = false;     vector<int> adj;   };   int a[N];   node g[N];   set<int> ans;   void run(int src) {     g[src].marked = true;     queue<int> q;     q.push(src);     while (!q.empty()) {       int v = q.front();       q.pop();       g[v].val++;       ans.insert(v);       for (int u : g[v].adj) {         g[u].val++;         if (!g[u].marked && g[u].val == a[u]) q.push(u);       }     }   }   int32_t main() {     ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);     int n, m;     cin >> n >> m;     for (int i = 0; i < m; i++) {       int v, u;       cin >> v >> u;       g[v].adj.push_back(u);       g[u].adj.push_back(v);     }     for (int i = 1; i <= n; i++) cin >> a[i];     for (int i = 1; i <= n; i++)       if (g[i].val == a[i]) run(i);     cout << ans.size() <<   n ;     for (int v : ans) cout << v <<    ;     cout <<   n ;     return 0;   }   