#!/bin/python

#Solution to Project Euler - problem 9
#Leigh Hall / 2-jun-14

#a^2+b^2=c^2, where a+b+c=1000

def problem9():
	max=1000
	a=1
	b=1
	c=1

	for a in range(1,998):
		for b in range(1,998):
			c=max-a-b
			if (a*a)+(b*b)==(c*c): 
				print a, b, c
				return a*b*c

print problem9()


