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*.
from sys import stdin,stdout

line1 =[int(x) for x in stdin.readline().split()]
vertexes, edges, heads, tails = line1[0], line1[1] ,line1[2] ,line1[3]
graph = [[] for _ in range (vertexes + 1)]
arcs = []

while edges > 0:
    line1 = [int(x) for x in stdin.readline().split()]
    edges -= 1
    v1 = line1[0]
    v2 = line1[1]
    graph[v1].append(v2)
    graph[v2].append(v1)
    arcs.append((v1,v2))

def Search_Hydra(chest, stomach):
    if len(graph[chest]) >= heads + 1 and len(graph[stomach]) >= tails + 1 :
        taken = [0 for _ in range(vertexes + 1)]
        intersection = 0

        for ady in graph[chest]:
            if taken[ady] == 0:
                taken[ady] = 1
        
        for ady in graph[stomach]:
            if taken[ady] == 0:
                taken[ady] = 2
            
            else:
                taken[ady] = 3
                intersection += 1
        
        if len(graph[chest]) + len(graph[stomach]) - intersection >= heads + tails + 2 :
            stdout.write("YES\n")
            stdout.write("{} {}\n".format(chest, stomach))
            if len(graph[chest]) - 1 - intersection >= heads:
                i = 0
                k = 0
                while i < len(graph[chest]) and k < heads:
                    if taken[graph[chest][i]] == 1 and graph[chest][i] != stomach:
                        stdout.write("{} ".format(graph[chest][i]))
                        k += 1
                    i += 1

            else:
                d = intersection - (len(graph[chest]) - 1 - heads)
                i = 0
                k = 0
                while  i < len(graph[chest]) and k < heads:
                    if taken[graph[chest][i]] == 1 and graph[chest][i] != stomach:
                        stdout.write("{} ".format(graph[chest][i]))
                        k += 1 
                    elif taken[graph[chest][i]] == 3 and d > 0:
                        stdout.write("{} ".format(graph[chest][i]))
                        d -= 1
                        taken[graph[chest][i]] = 1
                        k += 1
                    i += 1
                    
            stdout.write("\n")
            i = 0
            k = 0
            while  i < len(graph[stomach]) and k < tails:
                if taken[graph[stomach][i]] > 1 and graph[stomach][i] != chest:
                    stdout.write("{} ".format(graph[stomach][i]))
                    k += 1
                i += 1
            return True
    return False

for i in range(0,len(arcs)):
    a, b = arcs[i]
    if Search_Hydra(a, b) or Search_Hydra(b, a):
        break
    elif i == len(arcs) - 1:
        stdout.write("NO")