For this Question: Abhijit has an Array <b>Arr</b> which may or may not be in strictly increasing order. He wants to make this array increasing but does not wish to change the position of any element so he came with an idea that he will replace an element with any of its divisors i.e <b> he changes an element X to M if X%M=0.</b>

Your task is to tell whether the given array can be transformed to <b>strictly increasing</b> by performing the operation given above.First line of input contains the size of the array N. Next line of input contains N space- separated integers depicting the values of the array Arr.

Constraints:-
1 <= N <= 100000
1 <= Arr[i] <= 100000Print "YES" if the array can be transformed in the strictly increasing order else print "NO".Sample Input:-
5
1 2 16 16 16 

Sample Output:-
YES

Sample Input:-
4
1 3 8 4

Sample Output:-
NO, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args)throws IOException{
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
	String str[] = br.readLine().split(" ");
    boolean flag=true;
	  int arr[] = new int[n];
	for(int i=0;i<n;i++)
	 arr[i]=Integer.parseInt(str[i]);

	arr[0]=1;
	int j=2;
	for(int i=1;i<n;i++){
		if(arr[i]%j==0)
		  j=j+1;
	   else if((arr[i]%j)!=0 && (arr[i]/j)>=1){
		   int fight=1;
		   while(fight==1){
			   for(int x=j+1;x<=arr[i];x++){
				   if(arr[i]%x==0){
					   j=x+1;
					   fight=0;
					   break;
				   }
				   else
				     fight=1;
			   }
		   }
	   }
	   else
	      flag=false;
	}






	   if(flag)
	    System.out.println("YES");
	   else
	    System.out.println("NO");


	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?