# -*- encoding:utf8 -*-

# Script engendrant des triplets pythagoriciens inférieurs à 50

print("Les triplets pythagoriciens inférieurs à 50 sont: ")

cathete1 = 1        # initialisation de la cathète1

while cathete1 <= 50:
    cathete2 = cathete1
    while cathete2 <= 50:
        hypotenuse = cathete2
        while hypotenuse <= 50:
            if hypotenuse**2 == cathete1**2 + cathete2**2:
                print("(" + str(cathete1) +", " + str(cathete2) + ", " \
                      + str(hypotenuse) + ")")
            hypotenuse +=1
        cathete2 +=1
    cathete1 +=1
