Friendly numbers
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Two different natural numbers are called friendly if the first one is the sum of divisors of the second number, with the exception of the second number, and the second is the sum of divisors of the first day, except for the very first day. Want to find all the pairs of friendly numbers, both of which belong to the interval from M to N.
Input
In the first row are integers M and N (1 ≤ M ≤ N ≤ 1 000 000).
Output
In each line of output from a pair of numbers separated by spaces. The first number pair must be less than the second. Rows must be sorted in ascending order of the first of the pair. If the pairs of friendly numbers in the interval not to withdraw "Absent".
Examples
Input #1
Answer #1
Submissions 2K
Acceptance rate 30%