PROGRAMMING:Finding twin primes
If the difference between two primes is 2, they are twin primes.
Input two positive integers n and m, find all the twin primes in the closed interval of [n, M], and output in the specified format.
###Input format:
Enter positive integers n and m in one line, neither of which is more than 1000.
###Output format:
From small to large, all the twin primes in the interval are output in turn.
For example, after inputting 1 10, output (3,5) and (5,7), each group of twin primes are followed by a space.
###Input sample 1:
Here is a set of inputs. For example:
```in
1 10
```
###Output sample 1:
The corresponding output is given here. For example:
```out
(3,5) (5,7)
```
###Input sample 2:
Here is a set of inputs. For example:
```in
5 30
```
###Output sample 2:
The corresponding output is given here. For example:
```out
(5,7) (11,13) (17,19)
```
###Input sample 3:
Here is a set of inputs. For example:
```in
10 31
```
###Output sample 3:
The corresponding output is given here. For example:
```out
(11,13) (17,19) (29,31)
```
answer:If there is no answer, please comment
Input two positive integers n and m, find all the twin primes in the closed interval of [n, M], and output in the specified format.
###Input format:
Enter positive integers n and m in one line, neither of which is more than 1000.
###Output format:
From small to large, all the twin primes in the interval are output in turn.
For example, after inputting 1 10, output (3,5) and (5,7), each group of twin primes are followed by a space.
###Input sample 1:
Here is a set of inputs. For example:
```in
1 10
```
###Output sample 1:
The corresponding output is given here. For example:
```out
(3,5) (5,7)
```
###Input sample 2:
Here is a set of inputs. For example:
```in
5 30
```
###Output sample 2:
The corresponding output is given here. For example:
```out
(5,7) (11,13) (17,19)
```
###Input sample 3:
Here is a set of inputs. For example:
```in
10 31
```
###Output sample 3:
The corresponding output is given here. For example:
```out
(11,13) (17,19) (29,31)
```
answer:If there is no answer, please comment