import java.awt.*;
import java.applet.*;


public class Applet1 extends Applet
{
	int num[]={3,6,9,8,15,2,18,11,14};
		int i,j,cont;

	public void init()
	{
	setBackground(Color.blue);
	setForeground(Color.white);	
	}
public void paint(Graphics g)
{
	for(i=0;i<num.length;i++)
	{
		cont=0;
		for(j=1;j<=num[i];j++)
			if(num[i]%j==0) cont++;
		if(cont==2)
			g.drawString("El no."+num[i]+" es primo.",100,10*i);
		else
			g.drawString("El no."+num[i]+" no es primo.",100,10*i);
	}
}
}
