SP16177 CODHASH - Hashcodes and primes
Description
There are n cards arranged in a row.The rth card from the left has rth prime number written on it on one side the other side is blank.Some cards have the blank side up and the others have the number side up.
Input Format
The first line contains 0
Output Format
For every test case print in a separate line the number of distinct hash codes that can be generated for the given arrangement of cards modulo 1000000007 (10^9 + 7).