It used sieve of Eratosthenes as the algorithm for finding prime numbers.