def find_next_square3(sq: int) -> int:
    """
    This version uses the .is_integer() method instead of %.
    """
    sqrt_of_sq = sq ** 0.5
    return int((sqrt_of_sq+1)**2) if sqrt_of_sq.is_integer() else -1