#include <bits/stdc++.h>
using namespace std;
int n, m, par[200005], s, t, ds, dt;
vector<int> v[200005], vs[200005], vt[200005];
vector<pair<int, int> > ans;
int f(int i) {
  if (par[i] != i) par[i] = f(par[i]);
  return par[i];
}
void merge(int a, int b) {
  a = f(a), b = f(b);
  par[a] = b;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 1; i <= n; i++) par[i] = i;
  while (m--) {
    int a, b;
    cin >> a >> b;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  cin >> s >> t >> ds >> dt;
  for (int i = 1; i <= n; i++) {
    if (i == s) continue;
    if (i == t) continue;
    for (__typeof(v[i].begin()) it = v[i].begin(); it != v[i].end(); it++) {
      int to = *it;
      if (to == s || to == t) continue;
      if (f(i) != f(to)) ans.push_back(make_pair(i, to));
      merge(i, to);
    }
  }
  int foo = 0;
  set<int> s1, t1, comm;
  for (__typeof(v[s].begin()) it = v[s].begin(); it != v[s].end(); it++) {
    int to = *it;
    if (to != t)
      s1.insert(f(to)), vs[f(to)].push_back(to);
    else
      foo = 1;
  }
  for (__typeof(v[t].begin()) it = v[t].begin(); it != v[t].end(); it++) {
    int to = *it;
    if (to != s)
      t1.insert(f(to)), vt[f(to)].push_back(to);
    else
      foo = 1;
  }
  for (__typeof(s1.begin()) it = s1.begin(); it != s1.end(); it++) {
    int to = *it;
    if (!(t1.find(to) != t1.end())) {
      if (ds) {
        ds--;
        ans.push_back(make_pair(vs[to][0], s));
        merge(to, s);
      }
    }
  }
  for (__typeof(s1.begin()) it = s1.begin(); it != s1.end(); it++) {
    int to = *it;
    if ((t1.find(to) != t1.end())) {
      if (ds) {
        ds--;
        ans.push_back(make_pair(s, vs[to][0]));
        merge(to, s);
        comm.insert(to);
      }
    }
  }
  for (__typeof(t1.begin()) it = t1.begin(); it != t1.end(); it++) {
    int to = *it;
    if (!(comm.find(to) != comm.end())) {
      if (dt) {
        dt--;
        ans.push_back(make_pair(vt[to][0], t));
        merge(to, t);
      }
    }
  }
  for (int i = 1; i <= n; i++)
    if (!(f(i) == f(s) || f(i) == f(t))) {
      cout << "No";
      return 0;
    }
  if (comm.size() == 0) {
    if (foo == 0) {
      cout << "No";
      return 0;
    } else {
      if (dt >= 1 && ds >= 1) {
        cout << "Yes\n";
        ans.push_back(make_pair(s, t));
        for (__typeof(ans.begin()) it = ans.begin(); it != ans.end(); it++) {
          cout << it->first << " " << it->second;
          cout << "\n";
        }
      } else
        cout << "No";
    }
  } else {
    if (dt >= 1) {
      cout << "Yes\n";
      ans.push_back(make_pair(t, vt[*comm.begin()][0]));
      for (__typeof(ans.begin()) it = ans.begin(); it != ans.end(); it++) {
        cout << it->first << " " << it->second;
        cout << "\n";
      }
    } else
      cout << "No";
  }
  return 0;
}
