eolymp
bolt
Try our new interface for solving problems

Aaah!

\includegraphics{https://static.e-olymp.com/content/11/11cacd55d5964eece45a52859f758adacc10bc6c.jpg} Jon Marius shouted too much at the recent Justin Bieber concert, and now needs to go to the doctor because of his sore throat. The doctor’s instructions are to say "\textbf{aaah}". Unfortunately, the doctors sometimes need Jon Marius to say "\textbf{aaah}" for a while, which Jon Marius has never been good at. Each doctor requires a certain level of "\textbf{aah}" -- some require "\textbf{aaaaaah}", while others can actually diagnose his throat with just a "\textbf{h}". (They often diagnose wrongly, but that is beyond the scope of this problem.) Since Jon Marius does not want to go to a doctor and have his time wasted, he wants to compare how long he manages to hold the "\textbf{aaah}" with the doctor’s requirements. (After all, who wants to be all like "\textbf{aaah}" when the doctor wants you to go "\textbf{aaaaaah}"?) Each day Jon Marius calls up a different doctor and asks them how long his "\textbf{aaah}" has to be. Find out if Jon Marius would waste his time going to the given doctor. \InputFile The input consists of two lines. The first line is the "\textbf{aaah}" Jon Marius is able to say that day. The second line is the "\textbf{aah}" the doctor wants to hear. Only lowercase '\textbf{a}' and '\textbf{h}' will be used in the input, and each line will contain between \textbf{0 }and \textbf{999} '\textbf{a}'s, inclusive, followed by a single '\textbf{h}'. \OutputFile Output "\textbf{go}" if Jon Marius can go to that doctor, and output "\textbf{no}" otherwise.
Time limit 1 second
Memory limit 128 MiB
Input example #1
aaah
aaaaah
Output example #1
no
Input example #2
aaah
ah
Output example #2
go
Source 2012 Nordic Collegiate Programming Contest, October 6, Problem A