test the programs Poly and Triangle