import java.util.*;
import java.lang.*;
import java.io.*;
// The main method must be in a class named "Main".
class Main {
public static void main(String[] args) {
//System.out.println("Hello world!");
// Scanner scn = new Scanner(System.in);
// int N = scn.nextInt();
// int count = 0;
// for(int i=1; i<=N;i++){
// if(N%i==0){
// System.out.print(i + " ");
// count = count + 1;
// }
// }
// System.out.println("");
// System.out.println("The total number of Count of Factors for " + N + " are " + count);
// -----------------------------------------------------------------------------
// Given the Number of Test Cases as T, For each test case, take an integer N as input, you have to tell whether it
// is a perfect number or not.
// Scanner scn = new Scanner(System.in);
// int T = scn.nextInt();
// for (int i=1;i<=T;i++){
// int N = scn.nextInt();
// int sum = 0;
// for(int j=1;j<N;j++){
// if(N%j==0){
// sum +=j;
// }
// }
// if (sum == N){
// System.out.println("Yes");
// }
// else
// System.out.println("No");
// }
// -----------------------------------------------------------------------------
// You are given an integer N you need to print all the Prime Numbers between 1 and N.
// Scanner scn = new Scanner(System.in);
// int N = scn.nextInt();
// for(int i=1;i<=N;i++){
// int count = 0;
// for(int j=1;j<=i*2;j++){
// if(i%j==0){
// count = count+1;
// if(count>=3){
// break;
// }
// }
// }
// if(count==2){
// System.out.print(i + " ");
// }
// }
// -----------------------------------------------------------------------------
// Given a number N, print whether it is a prime or composoite number:
Scanner scn = new Scanner(System.in);
int N = scn.nextInt();
for(int i=1;i<=N;i++){
int count = 0;
if(N%i==0){
count = count + 1;
if(count>=3){
System.out.println("Composite");
break;
}
if(count==2){
System.out.println("Prime");
}
}
}
}
}
To embed this program on your website, copy the following code and paste it into your website's HTML: