#include <bits/stdc++.h>
using namespace std;
vector<vector<int> > G, H;
int vis[200010];
int done[200010];
int deg[200010];
int comp[200010];
int type[200010][2];
int s, t, ds, dt;
int check(int v, int k) {
  if (vis[k] || k == t || ((k == s || v == s) && deg[s] + 1 > ds)) return 0;
  return 1;
}
void dfs(int v, int x) {
  vis[v] = 1;
  comp[v] = x;
  for (int i = 0; i < G[v].size(); i++) {
    int k = G[v][i];
    if (k == s) type[comp[v]][0] = 1;
    if (k == t) type[comp[v]][1] = 1;
    if (vis[k] || k == s || k == t) continue;
    dfs(k, x);
    deg[v]++, deg[k]++;
    H[v].push_back(k);
  }
}
int check2(int v, int k) {
  if (vis[k] || k == s || ((k == t || v == t) && deg[t] + 1 > dt)) return 0;
  return 1;
}
void dfs2(int v) {
  vis[v] = 2;
  for (int i = 0; i < G[v].size(); i++) {
    int k = G[v][i];
    if (!check2(v, k)) continue;
    dfs2(k);
    deg[v]++, deg[k]++;
    H[v].push_back(k);
  }
}
int main() {
  int i, j, k, l;
  int n, m;
  cin >> n >> m;
  G.resize(n + 2);
  H.resize(n + 2);
  for (i = 0; i < m; i++) {
    cin >> k >> l;
    G[k].push_back(l);
    G[l].push_back(k);
  }
  cin >> s >> t >> ds >> dt;
  int cnt = 1;
  for (i = 1; i <= n; i++) {
    if (!vis[i] && i != s && i != t) dfs(i, cnt++);
  }
  for (j = 0; j < G[s].size(); j++) {
    int x = G[s][j];
    if (x == t || type[comp[x]][1] == 1 || type[comp[x]][0] != 1 ||
        done[comp[x]])
      continue;
    H[s].push_back(x);
    deg[s]++, deg[x]++;
    done[comp[x]] = 1;
  }
  for (j = 0; j < G[t].size(); j++) {
    int x = G[t][j];
    if (x == s || type[comp[x]][0] == 1 || type[comp[x]][1] != 1 ||
        done[comp[x]])
      continue;
    H[t].push_back(x);
    deg[t]++, deg[x]++;
    done[comp[x]] = 1;
  }
  comp[s] = cnt++;
  comp[t] = cnt++;
  type[comp[s]][0] = 1;
  type[comp[s]][1] = 1;
  type[comp[t]][0] = 1;
  type[comp[t]][1] = 1;
  for (i = 0; i < G[t].size(); i++) {
    int x = G[t][i];
    if (x == s || deg[t] >= dt) continue;
    if (type[comp[x]][0] && type[comp[x]][1] && !done[comp[x]]) {
      H[t].push_back(x);
      deg[t]++, deg[x]++;
      done[comp[x]] = 1;
    }
  }
  for (i = 0; i < G[s].size(); i++) {
    int x = G[s][i];
    if (x == t || deg[s] >= ds) continue;
    if (type[comp[x]][0] && type[comp[x]][1] && !done[comp[x]]) {
      H[s].push_back(x);
      deg[s]++, deg[x]++;
      done[comp[x]] = 2;
    }
  }
  int ST = 0;
  done[comp[s]] = 2;
  done[comp[t]] = 1;
  for (i = 0; i < G[t].size(); i++) {
    int x = G[t][i];
    if (x == s && deg[s] >= ds || deg[t] >= dt) continue;
    if (type[comp[x]][0] && type[comp[x]][1] && done[comp[x]] == 2) {
      H[t].push_back(x);
      deg[x]++, deg[t]++;
      ST = 1;
      break;
    }
  }
  for (i = 0; i < G[s].size(); i++) {
    if (ST) break;
    int x = G[s][i];
    if (x == t && deg[t] >= dt || deg[s] >= ds) continue;
    if (type[comp[x]][0] && type[comp[x]][1] && done[comp[x]] == 1) {
      H[s].push_back(x);
      deg[x]++, deg[s]++;
      ST = 1;
      break;
    }
  }
  int tot = 0;
  for (i = 0; i <= n; i++) {
    tot += H[i].size();
  }
  ds -= deg[s];
  dt -= deg[t];
  if (tot != n - 1 || ds < 0 || dt < 0) {
    cout << "No";
    return 0;
  }
  cout << "Yes\n";
  for (i = 1; i <= n; i++) {
    for (j = 0; j < H[i].size(); j++) {
      cout << i << ' ' << H[i][j] << '\n';
    }
  }
}
