#! /usr/bin/env python



# A Pythagorean triplet is a set of three natural numbers, a < b < c,
# for which, a2 + b2 = c2

# For example, 32 + 42 = 9 + 16 = 25 = 52.

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



def is_pythagorean_triplet(a,b,c):
    return a**2 + b**2 == c**2

def main():
    for a in range(1, 1000):
        for b in range(1, 1000-a):
            c = 1000 - b - a
            if is_pythagorean_triplet(a,b,c):
                print(f"{a}**2 + {b}**2 = {c}**2")
                print(f"a*b*c={a*b*c}")





    return

if __name__ == "__main__":
    main()
