PROGRAMMING:Determine whether there is a path between two vertices
Try to write an algorithm to judge whether there is a path from vertex VI to vertex VJ (I - > J, i.e. VI - > VJ) in the digraph stored by adjacency table or adjacency matrix. Some words output "yes", otherwise output "no". Note: the basic operations of the graph involved in the algorithm must be implemented on the storage structure【 Test case: IOT engineering level 16 [Liu Donglin]
###Input format:
In the first line, enter positive integers V (0 < V ≤ 100) and E (0 < e ≤ 200), which are the number of vertices and the number of directed edges.
On the next line, enter the values of the V nodes (1-V).
Next, enter two values in each row to represent the edge between the first node and the second node
In the next line, enter two numbers I, J (I < V, J < V).
###Output format:
If there is a path I - > J between VI and VJ in the graph, it outputs "yes", otherwise it outputs "no".
###Input example:
Here is a set of inputs. For example:
```in
3 4
1 2 3
1 2
1 3
2 1
3 2
2 3
```
###Output example:
The corresponding output is given here. For example:
```out
yes
```
answer:If there is no answer, please comment
###Input format:
In the first line, enter positive integers V (0 < V ≤ 100) and E (0 < e ≤ 200), which are the number of vertices and the number of directed edges.
On the next line, enter the values of the V nodes (1-V).
Next, enter two values in each row to represent the edge between the first node and the second node
In the next line, enter two numbers I, J (I < V, J < V).
###Output format:
If there is a path I - > J between VI and VJ in the graph, it outputs "yes", otherwise it outputs "no".
###Input example:
Here is a set of inputs. For example:
```in
3 4
1 2 3
1 2
1 3
2 1
3 2
2 3
```
###Output example:
The corresponding output is given here. For example:
```out
yes
```
answer:If there is no answer, please comment