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

#SP0000197. Ông Azad và con trai (Mr. Azad and his Son)

HỌC THEO LỘ TRÌNH

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

1 lộ trình

Ông Azad và con trai (Mr. Azad and his Son)

Mr. Azad and his Son

Phuoc Hung OJ ID: PRIME000202
Source: UVa 10490 (PHOJ Extended, one input instance per run).

Problem statement

Given nn, consider P=2n−1(2n−1)P=2^{n-1}(2^n-1). If PP is a perfect number, print it in the exact required format. Otherwise print the exact status message depending on whether nn is prime or composite.

Input

One integer nn.

Output

For a perfect value print Perfect: P!. If nn is prime but produces no perfect number, print Given number is prime. But, NO perfect number is available.. Otherwise print Given number is NOT prime! NO perfect number is available.

Subtasks

  • Subtask 1 (20 points): 2≤n≤112\le n\le11.
  • Subtask 2 (30 points): 12≤n≤2112\le n\le21.
  • Subtask 3 (50 points): 22≤n≤3122\le n\le31.

Example

Input

6

Output

Given number is NOT prime! NO perfect number is available.

Explanation: Since 6 is composite, the required output is the exact non-prime status sentence.