LearnPy Hub
← Arena
IntermediateRating 1300

Amicable Pairs

Two different numbers are amicable if each one's proper divisors (divisors smaller than itself) add up to the other. Print every amicable pair (a, b) with a < b ≤ n, one per line, ordered by a. Print NONE if there are none.

Input

One integer n (n ≤ 100000).

Output

Lines 'a b' or NONE.

Sample 1

Input
300
Output
220 284

Sample 2

Input
100
Output
NONE
solution.py
Output appears here
Amicable Pairs · Python Arena problem · LearnPy Hub