p s x x fac 0 s 0 fac s x times s x fac p s x rand x x rand x rand s x s 1 p 1 0 0 fac 1 times 2 rand 1 FULL