Switch to using allowed denominators

Summary: Simplify hint code

Reviewers: eater

Reviewed By: eater

Differential Revision: http://phabricator.khanacademy.org/D11897