func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2e5 + 10;   int n, m, s, t, ds, dt, cnt, f;   vector<pair<int, int>> ans;   vector<int> G[N];   pair<int, int> xx[N], yy[N];   bool vi[N];   void dfs(int u) {     vi[u] = true;     for (int v : G[u])       if (!vi[v]) {         ans.push_back({u, v});         dfs(v);       } else if (v == s)         xx[cnt] = {u, v};       else if (v == t)         yy[cnt] = {u, v};   }   int main() {     cin >> n >> m;     for (int i = 0; i < m; i++) {       int x, y;       cin >> x >> y;       G[x].push_back(y);       G[y].push_back(x);     }     cin >> s >> t >> ds >> dt;     vi[s] = true;     vi[t] = true;     for (int i = 1; i <= n; i++)       if (!vi[i]) {         dfs(i);         cnt++;       }     for (int i = 0; i < cnt; i++)       if (xx[i] == make_pair(0, 0) && yy[i] == make_pair(0, 0)) {         cout <<  No  << endl;         return 0;       } else if (xx[i] == make_pair(0, 0)) {         dt--;         ans.push_back(yy[i]);         f |= 2;       } else if (yy[i] == make_pair(0, 0)) {         ds--;         ans.push_back(xx[i]);         f |= 1;       }     if (ds <= 0 || dt <= 0) {       cout <<  No  << endl;       return 0;     }     for (int i = 0; i < cnt; i++)       if (xx[i] > make_pair(0, 0) && yy[i] > make_pair(0, 0)) {         ds--;         dt--;         ans.push_back(xx[i]);         ans.push_back(yy[i]);         f = 3;         yy[i] = {0, 0};         xx[i] = {0, 0};         break;       }     for (int i = 0; i < cnt; i++)       if (xx[i] > make_pair(0, 0) && yy[i] > make_pair(0, 0) && ds > 0) {         ds--;         ans.push_back(xx[i]);         f |= 1;         yy[i] = {0, 0};       }     for (int i = 0; i < cnt; i++)       if (xx[i] > make_pair(0, 0) && yy[i] > make_pair(0, 0) && dt > 0) {         dt--;         ans.push_back(yy[i]);         f |= 2;         xx[i] = {0, 0};       }     for (int i = 0; i < cnt; i++)       if (xx[i] > make_pair(0, 0) && yy[i] > make_pair(0, 0)) {         cout <<  No  << endl;         return 0;       }     if (ans.size() < n - 1) {       ans.push_back({s, t});       ds--;       dt--;     }     if (ds < 0 || dt < 0)       cout <<  No  << endl;     else {       cout <<  Yes  << endl;       for (auto z : ans) cout << z.first <<     << z.second << endl;     }     return 0;   }   