clever code, permutation, geometry

Level D