2013 Canadian Computing Competition, Stage 1

Problem J2: Rotating letters

An artist wants to construct a sign whose letters will rotate freely in the breeze. In order to do this, she must only use letters that are not changed by rotation of 180 degrees: I, O, S, H, Z, X, and N.

Write a program that reads a word and determines whether the word can be used on the sign.

Input

The input will consist of one word, all in uppercase letters, with no spaces. The maximum length of the word will be 30 letters, and the word will have at least one letter in it.

Output

Output YES if the input word can be used on the sign; otherwise, output NO.

Sample Input 1

SHINS

Sample Output 1

YES

Sample Input 2

NOISE

Sample Output 2

NO

All Submissions
Best Solutions


Point Value: 5
Time Limit: 2.00s
Memory Limit: 16M
Added: May 18, 2013

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

I noticed that instead of the usual test case ouput it said: 'Batch case #1 Test case #1b: OK [0.004s, 224K] (3/3)
Test case #1c: OK [0.004s, 224K] (3/3)
Overall score: 3/3'
I got everything right and it seems to be fine, I was just wondering if that was done intentionally.

Batches cases are a feature of the judge to prevent people from outputting the same or random values (in this case "YES" and "NO") to get partial points. One would need to get an entire batch of test cases correct to get scores for them. It doesn't matter for this problem because partial points are not enabled.

Okay, thanks for clearing that up.