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*.
## https://codeforces.com/contest/244/problem/D
n, m, h, t = map(int, input().split())
g   = {}
e   = []

for _ in range(m):
    u, v = map(int, input().split())
    if u not in g:
        g[u]   = []
        
    if v not in g:
        g[v]   = []
        
    g[u].append(v)
    g[v].append(u)
    e.append([u, v])

def pr(a):
    print(' '.join([str(x) for x in a]))
    
def check(u, v, h, t, g):
    max_ht = max(h, t) 
    min_ht = min(h, t)
    max_uv = max(len(g[u]), len(g[v])) - 1
    min_uv = min(len(g[u]), len(g[v])) - 1
    
    if min_uv < min_ht:
        return False, [], []
    elif max_uv >= h+t:
        big   =  u if len(g[u]) - 1 == max_uv else v
        small =  v if len(g[v]) - 1 == min_uv else u

        s = []
        b = []
        used = {}
        while len(s) < min_ht:
            for x in g[small]:
                if x == big:continue
                s.append(x)
                used[x] = True
                
        while len(b) < max_ht:
            for x in g[big]:
                if x == small:continue
                if x not in used:
                    b.append(x)
        return True, [small, big], [s, b] 
    else:
        big   =  u if len(g[u]) - 1 == max_uv else v
        small =  v if len(g[v]) - 1 == min_uv else u
        #print(u, v)
        #print(g[u], g[v])
        b = {x:True for x in g[big]}
        del b[small]
        
        s = {}
        common = []
        for x in g[small]:
            if x == big:continue
            if x in b:
                del b[x]
                common.append(x)
            else:
                s[x] = True
                
        if len(s) < min_ht:
            while len(s) < min_ht and len(common) > 0:
                s[common.pop()] = True
        
        if len(b) < max_ht:
            while len(b) < max_ht and len(common) > 0:
                b[common.pop()] = True
        
        if len(s) < min_ht or len(b) < max_ht:
            return False, [], []
        
        return True, [small, big], [list(s.keys())[:min_ht], list(b.keys())[:max_ht]]

flag = False
for u, v in e:
    flg, sb, sb_list = check(u, v, h, t, g)
    
    if flg == True:
        flag = True
        print('Yes')
        
        if h == len(sb_list[0]):
            pr(sb)
            pr(sb_list[0])
            pr(sb_list[1])
        else:
            print(sb[1], sb[0])
            pr(sb_list[1])
            pr(sb_list[0])
            
        break
        
if flag == False:
    print('No')
        
#9 12 2 3
#1 2
#2 3
#1 3
#1 4
#2 5
#4 5
#4 6
#6 5
#6 7
#7 5
#8 7
#9 1