eolymp
bolt
Try our new interface for solving problems
Problems

G. tourist

G. tourist

Time limit 3 seconds
Memory limit 256 MiB

The road system of Lemuria is quite complicated. Some of the cities are connected by some kind of one way or two way roads. However, lemurs keep their roads in the proper order and their road maps are always up to date.

G. the tourist just arrived by Penguin Air flight to Lemurian city S. His return flight departs from city F. G. has a list of the most popular attractions of Lemuria and he is eager to visit all of them. Also he has a latest version of the road map, so for every city P he has a list of cities that can be reached by a direct road from P. Your task is to help the tourist to plan the route across Lemuria that starts in S, goes through all cities with attractions (in arbitrary order) and ends in F.

Input data

The first line of the input file contains four integers: total number of Lemurian cities N (1N2000), number of cities with attractions K (0KN), and ordinal numbers of cities S and F (all cities are enumerated from 1). Second line contains K distinct numbers - cities with attractions.

Last N lines contain the road map. Each of these lines contains N characters: if q^th character of the (p+2)^nd line of input is 1 then there is a direct way from city p to city q, if it is 0 then there is no direct way. There is no road from a city to itself.

Output data

If there is no route that satisfies the conditions, output should contain one line with the word "NO". Otherwise the first line of output should contain the word "YES", the second line should contain the number of cities in the route M (MN^2), and in the following line(s) M numbers should follow - the numbers of cities in the route. The first city in the route should be S, the last city should be F, and for any two adjacent cities in the route, there should be a direct road from the firrst city to the second one.

Examples

Input example #1
4 4 1 2
1 2 3 4
0100
0011
1000
1000
Output example #1
YES
8
1 2 4 1 2 3 1 2