public static void main(String[] args) throws IOException {
        criba();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s;
        StringBuilder sb = new StringBuilder();
        while ((s = br.readLine()) != null) {
            if (sb.length() != 0) {
                sb.append("\n");
            }
            Integer sum = new Integer("0");
            int k = 0;
            for (int i = 0; i < s.length(); i++) {
                if ((int) s.charAt(i) >= 65 && (int) s.charAt(i) <= 90) {
                    k = (int) s.charAt(i) - (65 - 27);
                }
                if ((int) s.charAt(i) >= 97 && (int) s.charAt(i) <= 122) {
                    k = (int) s.charAt(i) - (97 - 1);
                }
                sum += k;
            }
            boolean y = hs.contains(sum);
            if (y) {
                sb.append("It is a prime word.");
            } else {
                sb.append("It is not a prime word.");
            }
        }
        System.out.println(sb);
    }