


'''simple docstring'''
def      __snake_case       (       ):
				'''simple docstring'''




				for a in range(300						):
								for b in range(a + 1	,  400						):
												for c in range(b + 1	,  500						):
																if (a + b + c) == 1000 and (a**2) + (b**2) == (c**2):
																				return a * b * c

				return -1




def      __snake_case       (       ):
				'''simple docstring'''




				for a in range(300						):
								for b in range(400						):
												__magic_name__	  = 1000 - a - b
												if a < b < c and (a**2) + (b**2) == (c**2):
																return a * b * c

				return -1




def      __snake_case       (       ):
				'''simple docstring'''




				import timeit

				print(
				    timeit.timeit("solution()"	,  setup="from __main__ import solution"	,  number=1000						)						)
				print(
				    timeit.timeit(
				        "solution_fast()"	,  setup="from __main__ import solution_fast"	,  number=1000						)						)


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







'''simple docstring'''
from __future__ import annotations




def      __snake_case       (       lowerCamelCase_ :				list[list[int]]	,  lowerCamelCase_ :				list[list[int]]						):
				'''simple docstring'''




				assert len(lowerCamelCase_						) == len(lowerCamelCase_						)

				__magic_name__	  = len(lowerCamelCase_						)
				__magic_name__	  = list(range(lowerCamelCase_						)						)
				__magic_name__	  = [-1] * n  # who the donor has donated to
				__magic_name__	  = [-1] * n  # who the recipient has received from
				__magic_name__	  = [0] * n

				while unmatched_donors:
								__magic_name__	  = unmatched_donors[0]
								__magic_name__	  = donor_pref[donor]
								__magic_name__	  = donor_preference[num_donations[donor]]
								num_donations[donor] += 1
								__magic_name__	  = recipient_pref[recipient]
								__magic_name__	  = rec_record[recipient]

								if prev_donor != -1:
												if rec_preference.index(lowerCamelCase_						) > rec_preference.index(lowerCamelCase_						):
																__magic_name__	  = donor
																__magic_name__	  = recipient
																unmatched_donors.append(lowerCamelCase_						)
																unmatched_donors.remove(lowerCamelCase_						)
								else:
												__magic_name__	  = donor
												__magic_name__	  = recipient
												unmatched_donors.remove(lowerCamelCase_						)
				return donor_record



