https://medium.com/@eyajamuehaque/472a-design-tutorial-learn-from-math-codeforces-solution-in-c-21c1d93f98cc