Олимпиадный тренинг

Задача 38946. prime numbers


Задача

Темы: ЕГЭ
Write a program that searches among the integers belonging to the numerical interval [1014260; 3025423], prime numbers. Print the first 20 found prime numbers in ascending order, to the left of each number print its number in order.
 
Example of displaying the first 3 numbers
1 1014263
2 1014287
3 1014301
...

You need to output all numbers from the given range.