SP12304 INVDIV - Smallest Inverse Sum of Divisors

Description

First, we define σ(**i**) = Sum of all positive divisors of **i**. example: all positive divisors of 60 = {1,2,3,4,5,6,10,12,15,20,30,60} so σ(60)=1+2+3+4+5+6+10+12+15+20+30+60=168 Now for the task: given an integer **n** find smallest integer **i** such that σ(**i**)=**n****.**

Input Format

The first line is an integer **T**(1 T For each test case, there is an integer **n**(1 n

Output Format

For each test case, output Smallest Inverse Sum of Divisors of **n**. if **n** doesn't have inverse, output -1.