Here is the solution ! It's to do a GCD on the different minimumCubeSides