#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200010;
vector<int> adj[MAXN];
int s, t;
vector<pair<int, int> > ans;
bool visi[MAXN];
int cnum;
int num[MAXN];
bool con_s[MAXN];
bool con_t[MAXN];
pair<int, int> withs[MAXN], witht[MAXN];
void dfs1(int src) {
  visi[src] = true;
  num[src] = cnum;
  for (int x : adj[src])
    if (!visi[x] && x != s && x != t) {
      ans.push_back(make_pair(src, x));
      dfs1(x);
    }
}
int main() {
  int ds, dt;
  int n, m;
  scanf(" %d %d", &(n), &(m));
  for (int i = 0; i < (m); ++i) {
    int x, y;
    scanf(" %d %d", &(x), &(y));
    --x;
    --y;
    adj[x].push_back(y);
    adj[y].push_back(x);
  }
  scanf(" %d %d", &(s), &(t));
  scanf(" %d %d", &(ds), &(dt));
  --s;
  --t;
  for (int i = 0; i < (n); ++i)
    if (i != s && i != t && !visi[i]) {
      dfs1(i);
      ++cnum;
    }
  bool has_st = false;
  for (int i = 0; i < (n); ++i) {
    for (int x : adj[i]) {
      int y = i;
      if ((x == s && y == t) || (x == t && y == s)) {
        has_st = true;
      } else if (x == s || x == t || y == s || y == t) {
        int idx = (x != s && x != t ? num[x] : num[y]);
        if (x == s || y == s) {
          if (!con_s[idx]) {
            withs[idx] = {x, y};
            con_s[idx] = true;
          }
        } else {
          if (!con_t[idx]) {
            witht[idx] = {x, y};
            con_t[idx] = true;
          }
        }
      }
    }
  }
  int both = 0;
  for (int i = 0; i < (cnum); ++i) {
    if (con_s[i] != con_t[i]) {
      if (con_s[i]) {
        --ds;
        ans.push_back(withs[i]);
      } else {
        ans.push_back(witht[i]);
        --dt;
      }
    } else
      ++both;
  }
  if (has_st) {
    if (ds > 0 && dt > 0) {
      if (ds + dt - 2 >= both) {
        printf("Yes\n");
        ans.push_back(make_pair(s, t));
        --ds;
        --dt;
        for (int i = 0; i < (cnum); ++i) {
          if (con_s[i] == con_t[i]) {
            if (ds > 0) {
              --ds;
              ans.push_back(withs[i]);
            } else {
              --dt;
              ans.push_back(witht[i]);
            }
          }
        }
        for (auto p : ans) printf("%d %d\n", p.first + 1, p.second + 1);
        return 0;
      }
    }
  }
  if (ds > 0 && dt > 0 && ds + dt >= both + 1) {
    bool add = true;
    for (int i = 0; i < (cnum); ++i) {
      if (con_s[i] == con_t[i]) {
        if (add) {
          add = false;
          --ds;
          --dt;
          ans.push_back(withs[i]);
          ans.push_back(witht[i]);
        } else if (ds > 0) {
          --ds;
          ans.push_back(withs[i]);
        } else {
          --dt;
          ans.push_back(witht[i]);
        }
      }
    }
    printf("Yes\n");
    for (auto p : ans) printf("%d %d\n", p.first + 1, p.second + 1);
    return 0;
  }
  printf("No\n");
}
