Almost working solution.
Fix: if res is negative `res = PRIME + res`
Merge branch 'manasa-and-combinatorics'