An undirected graph is given. The weight of its edges can be or only. Find the shortest distance between vertices and .
The first line contains four integers: the number of vertices , the number of edges m~(n, m \le 10^5), and the vertex numbers and d~(1 \le s, d \le n). Each of the following lines contains three integers , , and , representing an undirected edge with an integer weight w~(0 \le w \le 1).
Print the shortest distance between vertices and .

Example 1