def    UpperCAmelCase__(						lowerCamelCase_  ):



			"""simple docstring"""





			if not isinstance(lowerCamelCase_							,	lowerCamelCase_  ):
						_snake_case              =      f'Input value of [number={number}] must be an integer'
						raise TypeError(lowerCamelCase_  )
			if number < 0 or number % 2 == 1:
						return False
			_snake_case              =      int(number**0.5  )
			return number == number_sqrt * (number_sqrt + 1)


if __name__ == "__main__":
			import doctest

			doctest.testmod()


def    UpperCAmelCase__(						lowerCamelCase_							,	lowerCamelCase_  ):



			"""simple docstring"""





			_snake_case              =      sorted(lowerCamelCase_							,	key=lambda lowerCamelCase_  : value[2]							,	reverse=lowerCamelCase_  )

			# Create a list of size equal to the maximum deadline
			# and initialize it with -1
			_snake_case              =      max(lowerCamelCase_							,	key=lambda lowerCamelCase_  : value[1]  )[1]
			_snake_case              =      [-1] * max_deadline

			# Finding the maximum profit and the count of jobs
			_snake_case              =      0
			_snake_case              =      0
			for job in jobs:
						# Find a free time slot for this job
						# (Note that we start from the last possible slot)
						for i in range(job[1] - 1							,	-1							,	-1  ):
									if time_slots[i] == -1:
												_snake_case              =      job[0]
												count += 1
												max_profit += job[2]
												break
			return [count, max_profit]


if __name__ == "__main__":
			import doctest

			doctest.testmod()

