/*
(3, 5)
(5, 7)
(11, 13)
(17, 19)
(29, 31)
(41, 43)
(59, 61)
(71, 73)
(101, 103)
(107, 109)
(137, 139)
(149, 151)
(179, 181)
(191, 193)
(197, 199)
(227, 229)
(239, 241)
(269, 271)
(281, 283)
(311, 313)
(347, 349)
(419, 421)
(431, 433)
(461, 463)
(521, 523)
(569, 571)
(599, 601)
(617, 619)
(641, 643)
(659, 661)
(809, 811)
(821, 823)
(827, 829)
(857, 859)
(881, 883)
*/
public class DoublePrime {
public static void main(String[] args) {
int temp;
for (int i = 2; i < 1000; i++)
if (isPrime(i) && isPrime(i + 2))
System.out.println("(" + i + ", " + (i + 2) + ")");
}
public static boolean isPrime(int n) {
for (int i = 2; i <= n / 2; i++)
if (n % i == 0)
return false;
return true;
}
}