You need to find if there exists an integer such that . This is a quadratic equation.
One approach: compute and check if it's an integer. But floating point can be imprecise.
Better approach: use binary search to find in the range . If exactly, return true.