#include <bits/stdc++.h>
using namespace std;
int n, m, s, t, ds, dt;
vector<int> a[200010];
vector<pair<int, int>> ans;
int l[200010];
bool con_s[200010];
bool con_t[200010];
bool con[200010];
void dfs(int v, int comp) {
  l[v] = comp;
  for (int i : a[v])
    if (i != s && i != t && !l[i]) {
      dfs(i, comp);
      ans.push_back({v, i});
    }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    a[x].push_back(y);
    a[y].push_back(x);
  }
  cin >> s >> t >> ds >> dt;
  int q = 1;
  for (int i = 1; i <= n; i++)
    if (i != s && i != t && !l[i]) dfs(i, q++);
  for (int i : a[s])
    if (i != t) con_s[l[i]] = true;
  for (int i : a[t])
    if (i != s) con_t[l[i]] = true;
  for (int i = 1; i < q; i++)
    if (!con_s[i] && !con_t[i]) {
      cout << "No" << endl;
      return 0;
    }
  for (int i : a[s])
    if (i != t && !con[l[i]] && con_s[l[i]] && !con_t[l[i]]) {
      ans.push_back({s, i});
      con[l[i]] = true;
      if (--ds < 0) {
        cout << "No" << endl;
        return 0;
      }
    }
  for (int i : a[t])
    if (i != s && !con[l[i]] && con_t[l[i]] && !con_s[l[i]]) {
      ans.push_back({t, i});
      con[l[i]] = true;
      if (--dt < 0) {
        cout << "No" << endl;
        return 0;
      }
    }
  if (!dt || !ds) {
    cout << "No" << endl;
    return 0;
  }
  for (int i : a[s])
    if (i != t) {
      if (ds == 0) break;
      if (!con[l[i]]) {
        ds--;
        ans.push_back({s, i});
        con[l[i]] = true;
      }
    }
  bool found = false;
  for (int i : a[t])
    if (i != s && con[l[i]] && con_s[l[i]]) {
      dt--;
      ans.push_back({t, i});
      found = true;
      break;
    }
  if (!found) {
    bool st = false;
    for (int i : a[s])
      if (i == t) {
        st = true;
        break;
      }
    if (st) {
      ans.push_back({s, t});
      ds--;
      dt--;
    } else {
      cout << "No" << endl;
      return 0;
    }
  }
  for (int i : a[t])
    if (i != s && !con[l[i]]) {
      if (--dt < 0) {
        cout << "No" << endl;
        return 0;
      }
      ans.push_back({t, i});
      con[l[i]] = true;
    }
  cout << "Yes" << endl;
  for (auto i : ans) cout << i.first << " " << i.second << endl;
  return 0;
}
