whether a tree is symmetric