~/algor $ cat problems/funksiya-dost-sonlar
Amicable numbers
Write a function AreAmicable(a, b) that returns true if the positive integers $a$ and $b$ are amicable and false otherwise. Two different numbers are amicable if, for each of them, the sum of its positive divisors smaller than itself equals the other number.
Example 1: AreAmicable(220, 284) → true — the divisors of $220$: $1 + 2 + 4 + 5 + 10 + 11 + 20 + 22 + 44 + 55 + 110 = 284$, of $284$: $1 + 2 + 4 + 71 + 142 = 220$.
Example 2: AreAmicable(10, 8) → false — the divisors of $10$: $1 + 2 + 5 = 8$, but of $8$: $1 + 2 + 4 = 7$.
Write only the function body.
Input
One line with two positive integers $a$ and $b$ — the arguments of the function.
Output
The value returned by the function: true or false.
Note
$1 \le a, b \le 10^{6}$
Examples
220 284
true
10 8
false