PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SP0000014. Từ nguyên tố (Prime Words)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Từ nguyên tố (Prime Words)

Prime Words

Source: UVa

Version: Phuoc Hung OJ Extended

Problem Statement

A word contains only English lowercase a–z and uppercase A–Z letters. Assign lowercase letters values 11 through 2626 (a is 11, ..., z is 2626) and uppercase letters values 2727 through 5252 (A is 2727, ..., Z is 5252). The value of a word is the sum of its letter values. It is a prime word if this sum is prime under the original UVa problem convention, which exceptionally counts 11 as prime as well as the usual prime numbers. Determine whether the input is a prime word.

Input

One line containing the word ss, consisting only of uppercase and lowercase English letters. Its length is LL.

Output

Print exactly It is a prime word. if the word is prime, and It is not a prime word. otherwise. Preserve the final period.

Subtasks

  • Subtask 1 (20 points): 1≤L≤31\le L\le 3; each character is in a–z or A–Z.
  • Subtask 2 (30 points): 1≤L≤101\le L\le 10; each character is in a–z or A–Z.
  • Subtask 3 (50 points): 1≤L≤201\le L\le 20; each character is in a–z or A–Z.

Examples

Input

UFRN

Output

It is a prime word.

Explanation

The letters have values U =47=47, F =32=32, R =44=44, N =40=40. Their sum is 163163, which is prime, so print It is a prime word..

Input

contest

Output

It is not a prime word.

Explanation

The letters of contest are worth 3,15,14,20,5,19,203,15,14,20,5,19,20, totaling 9696. Since 9696 is composite, the word is not prime.

Input

a

Output

It is a prime word.

Explanation

The letter a has value 11. By the special convention of UVa 10924, 11 counts as prime, so the word is prime.