Source: https://math.mit.edu/~rstan/bij.pdf