ID 7: Updated algorithm to list primes.

There is big change in the source, but basic idea for solution
was not changed. Therefore I update the source instead of creating
new one.