Amicable Numbers

All submissions for this problem are available.
Guru V is very friendly and loves finding friendly objects. He wants to find something friendly in Mathematics and someone has told him about Amicable Numbers.
Amicable numbers are those pair of numbers for which the sum of divisors of one number is equal to the other number.
Guru V has come to you to help him devise a program for finding Amicable numbers.
Input
The first line contains a number X whose amicable pair is to be found such that 1 <= X <= 5 x 10^5
Output
The number which is the amicable pair of X. If no Amicable number is found for X, Print āNā.
Example
Input:1. 220 2. 10
Output:1. 284 2. N
Author:  codecheftsec 
Tags  codecheftsec 
Date Added:  1102012 
Time Limit:  0.134884  0.29 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, PYP3, CLOJ, FS 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions
HELP
If you are still having problems, see a sample solution here. 