1085 - I2P CS 2016 Chen HW10 Scoreboard

Time

2016/11/26 00:00:00 2016/12/01 13:20:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
11233 Pass Through the Forest

11233 - Pass Through the Forest   

Description

The forest is described as follows:

S: the start of the forest

T: the destination of the forest

#: the passway in the forest

*: the trees in the forest

Now please figure out that is it possible to pass through the forest.

Input

The first line of the input give two integer M N, representing the height and the width of the forest.

Then the following M*N arrays gives the description of the forest.

Note. 3<=M, N<=100

Output

Give the answer(yes/no) that can we pass through the forest.

Remember to print a '\n' at the end of the output.

Sample Input  Download

Sample Output  Download

Tags




Discuss