#!/usr/bin/python

# There exists exactly one Pythagorean triplet for which a + b + c = 1000.  Find the product abc.

from math import sqrt

if __name__ == "__main__":
	for a in range(1, 1000):
		for b in range(1, 1000 - a):
			c = 1000 - a - b
			if a**2 + b**2 == c**2:
				print a,b,c
				print a*b*c
				exit(0)


