#227. 魏老板的危机

    ID: 227 Type: Default 1000ms 256MiB Tried: 24 Accepted: 5 Difficulty: 8 Uploaded By: Tags>字符串KMP哈希2024寒假一期结训赛2025暑假二期结训赛

魏老板的危机

Upd1: The data has been strengthened, and code during the contest with incorrect time complexity CAN NOT pass this problem again!

Upd2: Due to differences in line breaks between OS, the judgement was mistake, and it has now been fixed.

Background

DNA, short for deoxyribonucleic acid, has basic units called deoxyribonucleotides (hereinafter referred to as nucleotides). Each nucleotide consists of a phosphate group, a five-carbon sugar (deoxyribose), and a nitrogenous base. We use nitrogenous bases to identify different nucleotides. There are four types of nitrogenous bases: A\text{A} (adenine), C\text{C} (cytosine), G\text{G} (guanine), and T\text{T} (thymine). Nucleotides form a double-helix structure through phosphodiester bonds, creating long DNA chains that give rise to the proliferation and evolution of all living things.
For the convenience of research, in this problem, we assume that DNA is circular. In fact, only prokaryotes have circular DNA.

Description

One day, while browsing Bilibili, Boss Wei came across a video. A life sciences research institute had published the sequence of a certain segment of circular DNA in humans, claiming that this segment's DNA sequence is unique to each species.

So, Boss Wei measured his own DNA sequence for this segment and found that it seemed different from the published one!? Boss Wei was shocked and terrified, fearing that he might not be human. Please verify whether Boss Wei is human.

Format

Input

The input consists of two lines, each containing a string SS and TT (1S,T106)(1\le |S|,|T|\le 10^6), (S,T{A,C,G,T})(S,T\in \{\text{A},\text{C},\text{G},\text{T}\}), representing the published DNA sequence and Boss Wei's DNA sequence, respectively.

Output

If the verification confirms that Boss Wei is human, output YES; otherwise, output OHHH!.

Samples

ATCAAGCTTCGAAC  
AAGCTTCGAACATC  
YES  
ATCAAGCTTCGAAC  
AAGCTTCGAACAGC  
OHHH!  

P.S.

"I have no interest in ordinary humans. If there are any aliens, time travelers, people from other worlds, or superhumans among you, come see me! That's all."