My task here is to find the minimal positive integer number say 'A' so that the product of digits of 'A' is exactly equal to N.

example: lets say my N = 32
so my A would be 48 coz the divisors of 32 would be 1,2,4,8,16,32 and the minimum numbers that would make 32 is 4 and 8. so output is 48.

what i did is first read N, then found the divisors and stored them in a list. and used

`if(l.get(i)*l.get(i+1)==N) {
sysout.print(l.get(i));
sysout.print(l.get(i+1));`

but im not able to make the numbers as minimum. and also i need to print as -1 if no match is found.

for that i did:

```
if (l.get(i)*l.get(i+1)!=N) {
              System.out.print(-1);
break;
          }

```

but it is printing -1 initially only and breaking off. now im stuck here. please find my code below:

my code:

```
int N=1;
     Scanner in = new Scanner(System.in);
     List<Integer> l = new ArrayList<Integer>();
      System.out.println("Enter N: ");
      if (N>=0 && N<=Math.pow(10, 9)) {
          N = in.nextInt();  
      }

      for (int i=1; i<=N;i++) {
          if (N%i==0) {
              l.add(i);
          }
      }
       System.out.println(l);
      for (int i=0; i<l.size()-1;i++) {
          if (l.get(i)*l.get(i+1)==N) {
              System.out.print(l.get(i));
              System.out.print(l.get(i+1));
          }

      }

     in.close();

```

kindly help. thanks.