#Z16115. 素数对
素数对
Description
A pair of prime numbers that differ by 2 is called a twin prime pair. For example, 5 and 7, 17 and 19, etc. This problem requires finding all twin prime pairs where both numbers are less than or equal to n.
Input Format
A positive integern.1≤n≤10000.
Output Format
All twin prime pairs less than or equal ton. Each pair should be printed on a separate line, separated by a single space. If no twin prime pairs are found, output "empty".
CodesOnline