A twin prime pair is $(p, p+2)$ where both are prime. Given $a$ and $b$, print every twin prime pair with both members in $[a, b]$, one pair per line p p+2, in increasing order of $p$. Print nothing if there are none.
Input
One line: $a$ and $b$ ($2 \le a \le b \le 4000000$).
Output
Print each twin prime pair, one per line.
Example 1
Input
2 20
Output
3 5 5 7 11 13 17 19
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.