One day Petya got a birthday present from his mom: a book called "The Legends and Myths of Graph Theory". From this book Petya learned about a hydra graph.

A non-oriented graph is a hydra, if it has a structure, shown on the figure below. Namely, there are two nodes *u* and *v* connected by an edge, they are the hydra's chest and stomach, correspondingly. The chest is connected with *h* nodes, which are the hydra's heads. The stomach is connected with *t* nodes, which are the hydra's tails. Note that the hydra is a tree, consisting of *h* + *t* + 2 nodes.

Also, Petya's got a non-directed graph *G*, consisting of *n* nodes and *m* edges. Petya got this graph as a last year birthday present from his mom. Graph *G* contains no self-loops or multiple edges.

Now Petya wants to find a hydra in graph *G*. Or else, to make sure that the graph doesn't have a hydra.
The first line contains four integers *n*, *m*, *h*, *t* (1 ≤ *n*, *m* ≤ 10<sup class="upper-index">5</sup>, 1 ≤ *h*, *t* ≤ 100) — the number of nodes and edges in graph *G*, and the number of a hydra's heads and tails.

Next *m* lines contain the description of the edges of graph *G*. The *i*-th of these lines contains two integers *a*<sub class="lower-index">*i*</sub> and *b*<sub class="lower-index">*i*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub>, *b*<sub class="lower-index">*i*</sub> ≤ *n*, *a* ≠ *b*) — the numbers of the nodes, connected by the *i*-th edge.

It is guaranteed that graph *G* contains no self-loops and multiple edges. Consider the nodes of graph *G* numbered with integers from 1 to *n*.
s = input().strip().split()
n = int(s[0])
m = int(s[1])
h = int(s[2])
t = int(s[3])
inclist = []
for i in range(n):
    inclist += [[]]
for i in range(m):
    s = input().strip().split()
    a1 = int(s[0]) - 1
    a2 = int(s[1]) - 1
    inclist[a1] += [a2]
    inclist[a2] += [a1]
possu = []
possv = []
for i in range(n):
    if len(inclist[i]) > h:
        possu += [i]
    if len(inclist[i]) > t:
        possv += [i]
possarc = []
for u in possu:
    for v in inclist[u]:
        if v in possv:
            possarc += [(u, v)]
fl = False
for arc in possarc:
    u = arc[0]
    v = arc[1]
    tmp = set(inclist[u]) | set(inclist[v])
    if len(tmp) >=  h + t + 2:
        print("YES")
        print("{0} {1}".format(u + 1, v + 1))
        tmp = set(inclist[u]) & set(inclist[v])
        heads = set(inclist[u]) - {v} - tmp
        tails = set(inclist[v]) - {u} - tmp
        toadd = []
        for i in range(h - len(heads)):
            cur = tmp.pop()
            toadd += [cur]
        heads |= set(toadd)
        toadd = []
        for i in range(t - len(tails)):
            cur = tmp.pop()
            toadd += [cur]
        tails |= set(toadd)
        s = ""
        for i in heads:
            s += str(i + 1) + " "
        print(s.strip())
        s = ""
        for i in tails:
            s += str(i + 1) + " "
        print(s.strip())
        fl = True
        break
if not fl:
    print("NO")
