#include <bits/stdc++.h>
using namespace std;
const int maxed = 200000 + 10;
struct Node {
  int u, v;
} node[maxed * 2], answer[maxed];
int n, m, s, t, ds, dt, gen[maxed];
set<int> ss, st;
int main() {
  void slove1();
  int slove2(int);
  scanf("%d%d", &n, &m);
  slove1();
  for (int i = 0; i < m; i++) scanf("%d%d", &node[i].u, &node[i].v);
  scanf("%d%d%d%d", &s, &t, &ds, &dt);
  int cnt = n, ans = 0;
  bool flag = false;
  for (int i = 0; i < m; i++) {
    if (!(node[i].u == s || node[i].v == s || node[i].u == t ||
          node[i].v == t)) {
      int x = slove2(node[i].u), y = slove2(node[i].v);
      if (x != y) {
        gen[x] = y;
        cnt--;
        answer[ans].u = node[i].u;
        answer[ans].v = node[i].v;
        ans++;
      }
      continue;
    }
    if ((node[i].u == s && node[i].v == t) ||
        (node[i].v == s && node[i].u == t)) {
      flag = true;
      continue;
    }
    if (node[i].u == s) ss.insert(node[i].v);
    if (node[i].v == s) ss.insert(node[i].u);
    if (node[i].u == t) st.insert(node[i].v);
    if (node[i].v == t) st.insert(node[i].u);
  }
  set<int>::iterator it;
  for (it = ss.begin(); it != ss.end(); it++)
    if (!st.count((*it))) {
      int x = slove2(s), y = slove2((*it));
      if (x != y) {
        gen[x] = y;
        cnt--;
        ds--;
        answer[ans].u = s;
        answer[ans].v = (*it);
        ans++;
      }
    }
  for (it = st.begin(); it != st.end(); it++)
    if (!ss.count((*it))) {
      int x = slove2(t), y = slove2((*it));
      if (x != y) {
        gen[x] = y;
        cnt--;
        dt--;
        answer[ans].u = t;
        answer[ans].v = (*it);
        ans++;
      }
    }
  bool f = false;
  for (it = ss.begin(); it != ss.end(); it++) {
    bool f1 = false;
    if (st.count((*it))) {
      int x = slove2((*it));
      if (ds) {
        int y = slove2(s);
        if (x != y) {
          gen[y] = x;
          cnt--;
          ds--;
          answer[ans].u = s;
          answer[ans].v = (*it);
          ans++;
          f1 = true;
        }
      }
      if (dt) {
        int y = slove2(t);
        if (x != y) {
          gen[y] = x;
          cnt--;
          dt--;
          answer[ans].u = t;
          answer[ans].v = (*it);
          ans++;
          if (f1) f = true;
        }
      }
    }
  }
  if (!f && (slove2(s) != slove2(t))) {
    if (!flag) return printf("No\n");
    answer[ans].u = s;
    answer[ans].v = t;
    ans++;
    cnt--;
    ds--;
    dt--;
  }
  if (cnt == 1 && ds >= 0 && dt >= 0) {
    printf("Yes\n");
    for (int i = 0; i < ans; i++) printf("%d %d\n", answer[i].u, answer[i].v);
    return 0;
  }
  printf("No\n");
  return 0;
}
void slove1() {
  for (int i = 1; i <= n; i++) gen[i] = i;
}
int slove2(int x) {
  if (x == gen[x]) return x;
  return gen[x] = slove2(gen[x]);
}
