#include <bits/stdc++.h>
using namespace std;
vector<int> adjList[200001];
int up[200001], weight[200001];
vector<pair<int, int> > treeEdges;
int findNode(int a) {
  if (up[up[a]] != up[a]) {
    up[a] = findNode(up[a]);
  }
  return up[a];
}
void unionNode(int a, int b) {
  int u1 = findNode(a);
  int u2 = findNode(b);
  if (u1 == u2) return;
  treeEdges.push_back(pair<int, int>(a, b));
  if (weight[u1] < weight[u2]) {
    weight[u2] += weight[u1];
    up[u1] = u2;
  } else {
    weight[u1] += weight[u2];
    up[u2] = u1;
  }
}
int main() {
  ios::sync_with_stdio(false);
  int N, M, i, j;
  cin >> N >> M;
  int S, T, Ds, Dt;
  for (i = 0; i < M; i++) {
    int a, b;
    cin >> a >> b;
    adjList[a].push_back(b);
    adjList[b].push_back(a);
  }
  cin >> S >> T >> Ds >> Dt;
  for (i = 1; i <= N; i++) up[i] = i, weight[i] = 1;
  for (i = 1; i <= N; i++) {
    if (i == S || i == T) continue;
    for (j = 0; j < adjList[i].size(); j++) {
      int c = adjList[i][j];
      if (c == S || c == T) continue;
      unionNode(i, c);
    }
  }
  vector<bool> isS, isT;
  isS.push_back(false);
  isT.push_back(false);
  vector<int> isSN, isTN;
  isSN.push_back(-1);
  isTN.push_back(-1);
  for (i = 1; i <= N; i++) {
    isS.push_back(false);
    isT.push_back(false);
    isSN.push_back(-1);
    isTN.push_back(-1);
  }
  for (i = 0; i < adjList[S].size(); i++) {
    int c = findNode(adjList[S][i]);
    isSN[c] = adjList[S][i];
    isS[c] = true;
  }
  for (i = 0; i < adjList[T].size(); i++) {
    int c = findNode(adjList[T][i]);
    isTN[c] = adjList[T][i];
    isT[c] = true;
  }
  bool STEdge = isS[T] || isT[S];
  isS[T] = false;
  isT[S] = false;
  int onlyS = 0, onlyT = 0, bothST = 0, noneST = 0;
  for (i = 1; i <= N; i++) {
    if (findNode(i) == i) {
      if (isS[i] && isT[i])
        bothST++;
      else if (isS[i])
        onlyS++;
      else if (isT[i])
        onlyT++;
      else if (i != S && i != T)
        noneST++;
    }
  }
  assert(bothST > 0 || STEdge);
  assert(noneST == 0);
  Ds -= onlyS;
  Dt -= onlyT;
  if (Ds <= 0 || Dt <= 0 || Ds + Dt < bothST + 1) {
    cout << "No";
    return 0;
  }
  cout << "Yes" << endl;
  int printN = 0;
  for (i = 0; i < treeEdges.size(); i++) {
    cout << treeEdges[i].first << " " << treeEdges[i].second << endl;
    printN++;
  }
  for (i = 1; i <= N; i++) {
    if (isS[i] && !isT[i]) {
      cout << isSN[i] << " " << S << endl;
      printN++;
    }
  }
  for (i = 1; i <= N; i++) {
    if (isT[i] && !isS[i]) {
      cout << isTN[i] << " " << T << endl;
      printN++;
    }
  }
  if (bothST == 0) {
    assert(STEdge);
    cout << S << " " << T << endl;
    assert(printN == N - 2);
    return 0;
  }
  bool bothLeft = true;
  for (i = 1; i <= N; i++) {
    if (isS[i] && isT[i]) {
      if (bothLeft) {
        bothLeft = false;
        cout << isSN[i] << " " << S << endl;
        cout << isTN[i] << " " << T << endl;
        printN += 2;
        assert(Ds > 0 && Dt > 0);
        Ds--;
        Dt--;
      } else {
        if (Ds > 0) {
          cout << isSN[i] << " " << S << endl;
          printN++;
          Ds--;
        } else if (Dt > 0) {
          cout << isTN[i] << " " << T << endl;
          printN++;
          Dt--;
        } else {
          assert(false);
        }
      }
    }
  }
  assert(printN == N - 1);
  return 0;
}
