SP18532 TREEORD - Tree _order

Description

.center { margin-right: auto; margin-left: auto; } .example-table { margin-top: 10px; text-align: left; width: 100%; } .example-table td { max-width: 0; word-wrap: break-word; vertical-align: top; } .example-table .vertical-spacer { height: 5px; } .section { margin-top: 19px; margin-bottom:19px; } .section:first-child, .section:first-child > h3:first-child { margin-top: 0; } .paragraph { margin-top: 10px; margin-bottom: 10px; text-align: left; } .paragraph ul, .paragraph pre { margin-top: 3px; margin-bottom: 3px; } pre { tab-size: 4; } .billboard { line-height: 1em; outline: solid 1px black; }

Input Format

The first line is the number of nodes in each traversal, 0 < N

Output Format

Print "yes" if all three traversals can be of the same tree, and "no" otherwise.