The Right Path of the Left Tree
In a suspended binary tree, the potential of a vertex is defined as the shortest distance to a vertex with fewer than two children. A tree is termed left if the left child of each vertex has a potential that is not less than that of the right child. Additionally, there must not be any vertex that has a right child without also having a left child.
The right path of a tree is the path starting from the root and moving exclusively to the right. The length of the path is determined by the number of vertices it contains.
Given a number of vertices N, determine the length of both the longest and shortest right path in a left tree.
Input
You are provided with a single number, which is the total number of vertices in the tree N (1 ≤ N ≤ 10^9).
Output
Output two numbers: the lengths of the longest and shortest right paths in the left tree.