


def 				UpperCamelCase_(      lowerCamelCase_ )    ->						bool:
    _lowercase       :							str      		=		(1 + 24 * n) ** 0.5
    return ((1 + root) / 6) % 1 == 0



def 				UpperCamelCase_(      lowerCamelCase_ = 5000 )    ->						int:
    _lowercase       :							Optional[Any]      		=		[(i * (3 * i - 1)) // 2 for i in range(1							, lowerCamelCase_ )]
    for i, pentagonal_i in enumerate(lowerCamelCase_ ):
        for j in range(lowerCamelCase_							, len(lowerCamelCase_ ) ):
            _lowercase       :							List[Any]      		=		pentagonal_nums[j]
            _lowercase       :							Optional[int]      		=		pentagonal_i + pentagonal_j
            _lowercase       :							str      		=		pentagonal_j - pentagonal_i
            if is_pentagonal(lowerCamelCase_ ) and is_pentagonal(lowerCamelCase_ ):
                return b

    return -1


if __name__ == "__main__":
 print(F"{solution() = }")



'''simple docstring'''




def 							lowerCamelCase	(      UpperCAmelCase__       :					list )			->      list:
							if any(not isinstance(UpperCAmelCase__      ,      UpperCAmelCase__ ) or x < 0 for x in sequence ):
														raise TypeError("""Sequence must be list of non-negative integers""" )
							for _ in range(len(UpperCAmelCase__ ) ):
														for i, (rod_upper, rod_lower) in enumerate(zip(UpperCAmelCase__      ,      sequence[1:] ) ):
																					if rod_upper > rod_lower:
																												sequence[i] -= rod_upper - rod_lower
																												sequence[i + 1] += rod_upper - rod_lower
							return sequence


if __name__ == "__main__":
						assert bead_sort([5, 4, 3, 2, 1]) == [1, 2, 3, 4, 5]
						assert bead_sort([7, 9, 4, 3, 5]) == [3, 4, 5, 7, 9]





