Modular algorithms (Stanford Team Notebook) NONNEGATIVE INTEGERS ONLY