import math
import sys

def is_triple (a, b, c):
    if a*a+b*b==c*c:
        return True
    return False

for a in range (1,1000):
    a2=a*a
    for b in range (a+1,1000):
        b2=b*b
        max_c=math.floor (math.sqrt(a2+b2))+1
        #max_c=a2+b2
        #print ("max_c=", max_c)
        for c in range (b+1, max_c):
            if a<b and b<c:
                if is_triple (a, b, c):
                    print ("triple! %d %d %d" % (a, b, c))
                    if a+b+c==1000:
                        print ("OK! %d %d %d" % (a, b, c))
                        print ("product=", a*b*c)
                        sys.exit(0)
