import javax.swing.*;
class prime
{    public static int[] prime(int n1,int n2)
     { int n=n2-n1;
      int n3[]=new int[n];
      int k=0,i,j;
      for(i=n1;i<=n2;i++)
       {for(j=2;j<i && (i%j)!=0;j++) {}
      if(i==j) {n3[k]=i;k++;}
      }
      int n4[]=new int[k];
      for(i=0;i<k;i++)
      {n4[i]=n3[i];}      
      return n4;	     
	 }	     
      public static void main(String args[])
      {    
           int n1=Integer.parseInt(JOptionPane.showInputDialog("ilk sayżyż giriniz : "));
           int n2=Integer.parseInt(JOptionPane.showInputDialog("ikinci sayżyż giriniz : "));
           int n[]=prime(n1,n2);
           Text.printT(n);          
     }
 }
