#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 200005;
int p[N];
int f(int u) { return u == p[u] ? u : p[u] = f(p[u]); }
int vis[N];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  vector<pair<int, int>> a, b, c, all;
  for (int i = 0; i < m; i++) {
    int u, v;
    scanf("%d %d", &u, &v);
    all.emplace_back(u, v);
  }
  int s, t, ds, dt;
  scanf("%d %d %d %d", &s, &t, &ds, &dt);
  for (auto e : all) {
    int u, v;
    tie(u, v) = e;
    if (v == s or u == t) swap(u, v);
    if (u == s and v == t) {
      c.emplace_back(u, v);
    } else if (u == s or v == t) {
      b.emplace_back(u, v);
    } else {
      a.emplace_back(u, v);
    }
  }
  for (int i = 1; i <= n; i++) p[i] = i;
  vector<pair<int, int>> ans;
  for (auto e : a) {
    int u, v;
    tie(u, v) = e;
    if (f(u) == f(v)) continue;
    ans.emplace_back(u, v);
    p[f(u)] = f(v);
  }
  for (auto e : b) {
    int u, v;
    tie(u, v) = e;
    if (f(u) == f(v)) continue;
    if (u == s) vis[f(v)] |= 1;
    if (v == t) vis[f(u)] |= 2;
  }
  for (auto e : b) {
    int u, v;
    tie(u, v) = e;
    if (f(u) == f(v)) continue;
    if (vis[f(u)] == 3 or vis[f(v)] == 3) {
      continue;
    }
    if (u == s) ds--;
    if (v == t) dt--;
    ans.emplace_back(u, v);
    p[f(u)] = f(v);
  }
  for (auto e : b) {
    int u, v;
    tie(u, v) = e;
    if (f(u) == f(v)) continue;
    if (u == s and ds == 0) continue;
    if (v == t and dt == 0) continue;
    if (u == s) ds--;
    if (v == t) dt--;
    ans.emplace_back(u, v);
    p[f(u)] = f(v);
  }
  for (auto e : c) {
    int u, v;
    tie(u, v) = e;
    if (f(u) == f(v)) continue;
    if (u == s) ds--;
    if (v == t) dt--;
    ans.emplace_back(u, v);
    p[f(u)] = f(v);
  }
  bool eq = true;
  for (int i = 1; i + 1 <= n; i++) eq &= f(i) == f(i + 1);
  if (ds < 0 or dt < 0 or !eq) return printf("No\n"), 0;
  printf("Yes\n");
  for (auto e : ans) {
    printf("%d %d\n", e.first, e.second);
  }
}
