https://it.etudes.ru/etudes/ham-sandwich-theorem/3/