#include <iostream>
#include <stdint.h>
#include <string>

#define let auto

typedef size_t usize;
typedef int32_t i32;

using namespace std;

let main() -> i32 {
    let line = string();

    cin >> line;
    let flag = true;
    for (let c: line) {
        switch (c) {
            case 'I':
            case 'O':
            case 'S':
            case 'H':
            case 'Z':
            case 'X':
            case 'N': {
                break;
            }
            default:
                flag = false;
                break;
        }
    }

    cout << (flag ? "YES" : "NO") << endl;

    return 0;
}
