#include <bits/stdc++.h>
using namespace std;
inline int ReadInt() {
  static int n, ch;
  n = 0, ch = getchar();
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) n = n * 10 + ch - '0', ch = getchar();
  return n;
}
const int MAX_N = 200000 + 3, MAX_M = 400000 + 3;
vector<int> G[MAX_N];
int n, m, s, t, ds, dt, bel[MAX_N];
bool vis[MAX_N];
int cc = 0;
vector<pair<int, int> > output;
void dfs(int u) {
  bel[u] = cc;
  vis[u] = true;
  for (int i = 0; i < (int)G[u].size(); ++i) {
    int v = G[u][i];
    if (!vis[v] && v != s && v != t) dfs(v), output.push_back(make_pair(u, v));
  }
}
void die() {
  puts("No");
  exit(0);
}
int st[MAX_N], nCnt[MAX_N][2];
void solve() {
  cc = 0;
  for (int i = 0; i < n; ++i)
    if (!vis[i] && i != s && i != t) dfs(i), cc++;
  bool flag = false;
  for (int i = 0; i < (int)G[s].size(); ++i) {
    int v = G[s][i];
    if (v == t)
      flag = true;
    else
      st[bel[v]] |= 1, nCnt[bel[v]][0] = v;
  }
  for (int i = 0; i < (int)G[t].size(); ++i) {
    int v = G[t][i];
    if (v == s) continue;
    st[bel[v]] |= 2, nCnt[bel[v]][1] = v;
  }
  int left = cc;
  for (int i = 0; i < cc; ++i)
    if (st[i] != 3) {
      if (st[i] == 0) die();
      if (st[i] == 1)
        ds--, output.push_back(make_pair(s, nCnt[i][0]));
      else if (st[i] == 2)
        dt--, output.push_back(make_pair(t, nCnt[i][1]));
      left--;
    }
  if (left == 0) {
    if (!flag) die();
    flag = true;
  } else
    flag = false;
  if (flag)
    output.push_back(make_pair(s, t)), ds--, dt--;
  else
    ds--, dt--, left--;
  if (ds < 0 || dt < 0 || (ds + dt < left)) die();
  puts("Yes");
  for (int i = 0; i < cc; ++i)
    if (st[i] == 3) {
      if (!flag) {
        output.push_back(make_pair(s, nCnt[i][0]));
        output.push_back(make_pair(t, nCnt[i][1]));
        flag = true;
      } else {
        if (ds > 0)
          ds--, output.push_back(make_pair(s, nCnt[i][0]));
        else if (dt > 0)
          dt--, output.push_back(make_pair(t, nCnt[i][1]));
        else
          assert(false);
      }
    }
  assert(n - 1 == (int)output.size());
  for (int i = 0; i < (int)output.size(); ++i)
    printf("%d %d\n", output[i].first + 1, output[i].second + 1);
}
int main() {
  n = ReadInt(), m = ReadInt();
  for (int i = 0, u, v; i < m; ++i) {
    u = ReadInt() - 1, v = ReadInt() - 1;
    G[u].push_back(v), G[v].push_back(u);
  }
  s = ReadInt() - 1, t = ReadInt() - 1, ds = ReadInt(), dt = ReadInt();
  solve();
  return 0;
}
