1834: 【CSP函数】孪生素数▅

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:7 Solved:4

Description

我们定义,如果 lns="http://www.w3.org/1998/Math/MathML">a  lns="http://www.w3.org/1998/Math/MathML">a+2 都是素数(如 lns="http://www.w3.org/1998/Math/MathML">5  lns="http://www.w3.org/1998/Math/MathML">7 ),那么我们就称 lns="http://www.w3.org/1998/Math/MathML">a  lns="http://www.w3.org/1998/Math/MathML">a+2 是一对孪生素数。请写一个程序找出 lns="http://www.w3.org/1998/Math/MathML">2N 之间的所有孪生素数。

Input

一个整数 lns="http://www.w3.org/1998/Math/MathML">N lns="http://www.w3.org/1998/Math/MathML">2<N<1000 )。

Output

若干行,每行两个整数,即一对孪生素数。

Sample Input Copy

10

Sample Output Copy

3 5
5 7