https://etudes.ru/models/partition-into-trapezoids/