This game is played by two persons, who are regarded as the Positive player (P player) and the Negative player (N player). There is a graph G=(V, E ) with P vertexs and Q bidirectional edges between the vertexs. Sometimes there are a lot of edges between two vertexs, and all the edges differ from each other. V1 is the first vertex and Vp is the last vertex.
Everytime P player marks a ‘+’ on one of the remained edges which have neither a ‘+’ nor ‘-‘ at all, and N player marks a ‘-‘ on that kind of edges without any marks. At the beginning, N player acts first, and then P player does, and then N player does alternately. The game comes to an end when all the edges are marked with either a ‘+’ or a ‘-‘.
Now we give the rules to judge the winner:
1) If there exists a road from V1 to Vp, whose edges are all marked with ‘+’, P player wins the game ultimately. So we can see, P player tries his best to create a such road to win the game.
2) If there exists none such road ,whose edges are all marked with ‘+’ from V1 to Vp, P player losses the game finally. Also we can see, N player does the best to destory that kind of roads described above in rule(1).
Now give you such a graph, you need to verdict the result whether the P player can win the game. If true, print “Yes”, or “No”.