Greatest agreement subtree