#include <map>
#include <set>
#include <list>
#include <cmath>
#include<cctype>
#include <ctime>
#include <deque>
#include <stack>
#include <queue>
#include <cstdio>
#include <string>
#include <vector>
#include<climits>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#define LL long long
#define PI 3.1415926535897932626
using namespace std;
int gcd(int a, int b) {return a % b == 0 ? b : gcd(b, a % b);}
bool prime[66000];
LL N;
void init()
{
for (int i=0;i<66000;i++) prime[i]=true;
prime[0]=prime[1]=false;
for (int i=2;i*i<66000;i++)
if (prime[i])
for (int j=i+i;j<66000;j+=i)
prime[j]=false;
}
LL pow_mod(LL a,LL b,LL m)
{
LL ans=1;
a%=m;
while (b)
{
if (b&1) ans=(ans*a)%m;
a=(a*a)%m;
b>>=1;
}
return ans;
}
int main()
{
init();
while (scanf("%lld",&N)!=EOF)
{
if (N==0) break;
if (prime[N]) {printf("%lld is normal.\n",N);continue;}
bool flag=false;
for (LL i=2;i<N;i++)
if (pow_mod(i,N,N)!=i)
{
flag=true;
break;
}
if (flag) printf("%lld is normal.\n",N);
else printf("The number %lld is a Carmichael number.\n",N);
}
return 0;
}