/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
if( primo
( 14 ) ) System.
out.
println("Verdadeiro"); else System.
out.
println("Falso"); if( primo
( 7 ) ) System.
out.
println("Verdadeiro"); else System.
out.
println("Falso"); //true if( primo
( 997 ) ) System.
out.
println("Verdadeiro"); else System.
out.
println("Falso"); //true if( primo
( 996 ) ) System.
out.
println("Verdadeiro"); else System.
out.
println("Falso");
}
public static boolean primo( int n )
{
int contador = 0;
for( int j
= 1; j
<= Math.
sqrt( n
); j
++ ) if( n % j == 0 )
if( ++contador == 2 )
return false;
return true;
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCWlmKCBwcmltbyggMTQgICkgKSBTeXN0ZW0ub3V0LnByaW50bG4oIlZlcmRhZGVpcm8iKTsgZWxzZSBTeXN0ZW0ub3V0LnByaW50bG4oIkZhbHNvIik7CgkJaWYoIHByaW1vKCA3ICAgKSApIFN5c3RlbS5vdXQucHJpbnRsbigiVmVyZGFkZWlybyIpOyBlbHNlIFN5c3RlbS5vdXQucHJpbnRsbigiRmFsc28iKTsgLy90cnVlCgkJaWYoIHByaW1vKCA5OTcgKSApIFN5c3RlbS5vdXQucHJpbnRsbigiVmVyZGFkZWlybyIpOyBlbHNlIFN5c3RlbS5vdXQucHJpbnRsbigiRmFsc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