PROGRAMMING:Middle order traverses the tree and determines whether it is a binary search tree
For a given binary tree with 'n' nodes ('n > = 0 '), the middle order traversal sequence is given, and whether it is a binary search tree is judged.
The topic guarantees that there are no more than 200 nodes in the binary tree, and the node values are in the range of Integer 'Int'.
###Input format:
The first line is a non negative integer 'n', indicating that there are 'n' nodes
The second line is an integer 'k', which is the element value of the root of the tree
Next, there are 'n-1' rows, each of which is a new node in the form of three integers' R D E ',
`R 'represents the element value of the parent node of the node (to ensure the existence of the parent node)` D 'is the direction, ` 0' is the left son of the parent node, ` 1 'is the right son` E 'is the element value of the node
###Output format:
First, the binary tree traversal sequence is output, each element occupies a row. For an empty tree, nothing is output.
Then, if the given tree is a binary search tree, output 'yes', otherwise output' no '`
###Input example:

For the binary tree in the picture:
```in
three
twenty
20 0 10
20 1 25
```
###Output example:
```out
ten
twenty
twenty-five
Yes
```
answer:If there is no answer, please comment
The topic guarantees that there are no more than 200 nodes in the binary tree, and the node values are in the range of Integer 'Int'.
###Input format:
The first line is a non negative integer 'n', indicating that there are 'n' nodes
The second line is an integer 'k', which is the element value of the root of the tree
Next, there are 'n-1' rows, each of which is a new node in the form of three integers' R D E ',
`R 'represents the element value of the parent node of the node (to ensure the existence of the parent node)` D 'is the direction, ` 0' is the left son of the parent node, ` 1 'is the right son` E 'is the element value of the node
###Output format:
First, the binary tree traversal sequence is output, each element occupies a row. For an empty tree, nothing is output.
Then, if the given tree is a binary search tree, output 'yes', otherwise output' no '`
###Input example:

For the binary tree in the picture:
```in
three
twenty
20 0 10
20 1 25
```
###Output example:
```out
ten
twenty
twenty-five
Yes
```
answer:If there is no answer, please comment