Question
Sacred Sum
In a mystical land, wise Ram faces a numeric enigma. A young seeker tasks him with finding all sacred numbers between two values, a and b.
Sacred numbers are those equal to the sum of their proper divisors (excluding the number itself). Assist Ram in listing all sacred numbers within this range.
Sacred numbers are those equal to the sum of their proper divisors (excluding the number itself). Assist Ram in listing all sacred numbers within this range.
Input
The first line of the input will contain an integer a representing the start of the range.
The second line of the input will contain an integer b representing the end of the range.
The second line of the input will contain an integer b representing the end of the range.
Output
Print all sacred numbers between a and b in a space-separated manner.
Example
Sample Input
1
100
Sample Output
6 28
Explanation
6 (1 + 2 + 3), and 28 (1 + 2 + 4 + 7 + 14) are all divine numbers between 1 and 100.
1
100
Sample Output
6 28
Explanation
6 (1 + 2 + 3), and 28 (1 + 2 + 4 + 7 + 14) are all divine numbers between 1 and 100.