PROGRAMMING:Sort by factor and
We define the sum of factors of a positive integer as the sum of all other factors excluding itself. For example, the sum of factors of 4 is 1 + 2 = 3, the sum of factors of 6 is 1 + 2 + 3 = 6, the sum of factors of 7 is 1, the sum of factors of 8 is 1 + 2 + 4 = 7, and the sum of factors of 9 is 1 + 3 = 4. We agree that the sum of factors of 1 is 0. You are required to write a program to sort a group of positive integers from small to large according to the sum of each number factor. The test data ensures that all positive integer factor sums entered are different.
###Input format:
There are two lines of input. The first line is a positive integer n, which means that there will be n positive integers in the second line. Each positive integer in the second line is separated by a space.
###Output format:
Output n positive integers according to the sum of factors. The output of each number includes the number and the sum of its factors, which are enclosed in a pair of parentheses. Add a space after each output.
###Input example:
```in
five
9 6 7 4 8
```
###Output example:
```out
7(1) 4(3) 9(4) 6(6) 8(7)
```
answer:If there is no answer, please comment
###Input format:
There are two lines of input. The first line is a positive integer n, which means that there will be n positive integers in the second line. Each positive integer in the second line is separated by a space.
###Output format:
Output n positive integers according to the sum of factors. The output of each number includes the number and the sum of its factors, which are enclosed in a pair of parentheses. Add a space after each output.
###Input example:
```in
five
9 6 7 4 8
```
###Output example:
```out
7(1) 4(3) 9(4) 6(6) 8(7)
```
answer:If there is no answer, please comment