1831: 【CSP函数】亲密数对█

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:7 Solved:5

Description

键盘输入 lns="http://www.w3.org/1998/Math/MathML">N ,lns="http://www.w3.org/1998/Math/MathML">N 在 lns="http://www.w3.org/1998/Math/MathML">2 至 lns="http://www.w3.org/1998/Math/MathML">2000 之间,求 lns="http://www.w3.org/1998/Math/MathML">2 至 lns="http://www.w3.org/1998/Math/MathML">N 中的亲密数对,就是 lns="http://www.w3.org/1998/Math/MathML">A 的因子和等于 lns="http://www.w3.org/1998/Math/MathML">B ,lns="http://www.w3.org/1998/Math/MathML">B 的因子和等于 lns="http://www.w3.org/1998/Math/MathML">A ,且 lns="http://www.w3.org/1998/Math/MathML">A=B 。

如 lns="http://www.w3.org/1998/Math/MathML">48 和 lns="http://www.w3.org/1998/Math/MathML">75 是亲密数对。lns="http://www.w3.org/1998/Math/MathML">48 的因子和为 lns="http://www.w3.org/1998/Math/MathML">2+3+4+6+8+12+16+24=75 ,而 lns="http://www.w3.org/1998/Math/MathML">75 的因子和为 lns="http://www.w3.org/1998/Math/MathML">3+5+15+25=48 。

Input

只有一行,为一个整数 lns="http://www.w3.org/1998/Math/MathML">N  lns="http://www.w3.org/1998/Math/MathML">2N2000 

Output

输出若干行,每行两个整数(用一个空格隔开)。

Sample Input Copy

200

Sample Output Copy

48 75
75 48
140 195
195 140

HINT

请注意,求出的亲密数对的 lns="http://www.w3.org/1998/Math/MathML">2 个数都不应该超过 lns="http://www.w3.org/1998/Math/MathML">n 的范围。