/**
* Author: Sergey Kopeliovich (Burunduk30@gmail.com)
* Date: 2014.05.01
*/
#include <cstdio>
#include <cassert>
#define forn(i, n) for (int i = 0; i < (int)(n); i++)
const int N = 1e5, M = 1e5, E = 2 * M + 2;
int e = 2, head[N], next[E], f[E], c[E], to[E];
int n, m, s, t, cc, u[N];
void add( int a, int b ) {
next[e] = head[a], to[e] = b, f[e] = 0, c[e] = 1, head[a] = e++;
next[e] = head[b], to[e] = a, f[e] = 0, c[e] = 0, head[b] = e++;
}
int dfs( int v ) {
u[v] = cc;
for (int e = head[v]; e; e = next[e]) {
int x = to[e];
if (f[e] < c[e] && u[x] != cc && (x == t || dfs(x))) {
f[e]++, f[e ^ 1]--;
return 1;
}
}
return 0;
}
void go( int v ) {
printf("%d ", v + 1);
for (int e = head[v]; e; e = next[e])
if (f[e] > 0) {
f[e]--, go(to[e]);
break;
}
}
int main() {
#define NAME "snails"
assert(freopen(NAME ".in", "r", stdin));
assert(freopen(NAME ".out", "w", stdout));
assert(scanf("%d%d%d%d", &n, &m, &s, &t) == 4 && n <= N && m <= M);
s--, t--;
while (m--) {
int a, b;
scanf("%d%d", &a, &b), a--, b--;
add(a, b);
}
forn(_, 2) {
cc++;
if (!dfs(s)) {
puts("NO");
return 0;
}
}
puts("YES");
forn(_, 2)
go(s);
return 0;
}