def is_x_a_square(x: int) -> bool:
    """Is x a square number?"""
    if x == 0:
        return False
    left = 1
    right = x
    while left <= right:
        mid = left + (right - left) // 2
        if mid ** 2 == x:
            return True
        elif mid ** 2 < x:
            left = mid + 1
        else:
            right = mid - 1
    return False