def myCOUNT(l):
newlist=[[x,y,z] for x in l for y in l for z in l if (z%y==0 and y%x==0 and l.index(x)<l.index(y) and l.index(y)<l.index(z))]
return len(newlist)
print(myCOUNT([1, 1, 1]))
ZGVmIG15Q09VTlQobCk6CiAgICBuZXdsaXN0PVtbeCx5LHpdIGZvciB4IGluIGwgZm9yIHkgaW4gbCBmb3IgeiBpbiBsIGlmICh6JXk9PTAgYW5kIHkleD09MCBhbmQgbC5pbmRleCh4KTxsLmluZGV4KHkpIGFuZCBsLmluZGV4KHkpPGwuaW5kZXgoeikpXQogICAgcmV0dXJuIGxlbihuZXdsaXN0KQoKcHJpbnQobXlDT1VOVChbMSwgMSwgMV0pKQ==