#include <iostream>
#include <cmath>
#include <fstream>

using namespace std;

bool isPrime(int x)
{

     if (x % 2 || x % 3)
     {
        return false;      
     }
     
     int maxCheck = (int) sqrt(x) ;
     
     for (int i(5); i < maxCheck; i++)
     {
         if (!(x % i))
         {
             return false;  
         }     
     }
     
     return true;
}

int main()
{
    
    int toCheck(0);
    ifstream in("DATA1.txt");
    ofstream out("OUT1.txt");

    
    for (int i(0); i < 5; i++)
    {
        int nMatches(0);
        in>>toCheck;
        
        for (int k(1); k < toCheck; k++)
        {
                if (nMatches == 2) 
                {
                   break;
                }
                
                if ( !(toCheck % k) && !isPrime(k) )
                {
                     nMatches++;   
                }
        }    
        
        if (nMatches == 2)
        {
            out<<"semiprime\n"; 
        } else {
            out<<"not\n";       
        }
        
    }
    
    
    
    return 0;
}

