The Maximum Number of Squares in a Tree