#include <bits/stdc++.h>
using namespace std;
int num, to[400005 << 1], nxt[400005 << 1], last[200005];
int vis[200005], cnt, vs[200005], vt[200005], s, t, tot;
struct node {
  int x, y;
} ans[200005];
void add(int x, int y) {
  to[++num] = y;
  nxt[num] = last[x];
  last[x] = num;
}
void dfs(int u) {
  int i, v;
  vis[u] = 1;
  for (i = last[u]; i; i = nxt[i]) {
    v = to[i];
    if (v == s) vs[cnt] = u;
    if (v == t) vt[cnt] = u;
    if (!vis[v]) {
      ans[++tot].x = u;
      ans[tot].y = v;
      dfs(v);
    }
  }
}
int main() {
  int i, j, x, y, n, m, ds, dt, flag = 0, both = 0;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= m; i++) {
    scanf("%d%d", &x, &y);
    add(x, y);
    add(y, x);
  }
  scanf("%d%d%d%d", &s, &t, &ds, &dt);
  vis[s] = 1;
  vis[t] = 1;
  for (i = 1; i <= n; i++)
    if (!vis[i]) {
      cnt++;
      dfs(i);
    }
  for (i = 1; i <= cnt; i++) {
    if (vs[i] && !vt[i]) {
      ans[++tot].x = vs[i];
      ans[tot].y = s;
      ds--;
    } else if (!vs[i] && vt[i]) {
      ans[++tot].x = vt[i];
      ans[tot].y = t;
      dt--;
    } else if (!vs[i] && !vt[i])
      flag = 1;
    else
      both++;
  }
  if (flag || dt <= 0 || ds <= 0 || both + 1 > ds + dt) {
    printf("No\n");
    return 0;
  }
  if (!both) {
    ans[++tot].x = s;
    ans[tot].y = t;
  } else {
    flag = 0;
    for (i = 1; i <= cnt; i++)
      if (vs[i] && vt[i]) {
        if (!flag) {
          ans[++tot].x = vs[i];
          ans[tot].y = s;
          ans[++tot].x = vt[i];
          ans[tot].y = t;
          flag = 1;
          ds--;
          dt--;
        } else {
          if (ds) {
            ans[++tot].x = vs[i];
            ans[tot].y = s;
            ds--;
          } else {
            ans[++tot].x = vt[i];
            ans[tot].y = t;
            dt--;
          }
        }
      }
  }
  printf("Yes\n");
  for (i = 1; i <= tot; i++) printf("%d %d\n", ans[i].x, ans[i].y);
  return 0;
}
