
Opening of the Odyssey (I 1–10). London, British Library, Harley MS 6325, f. 1r; third quarter of the 15th c.
Poetry sometimes is set in dactylic hexameter. Henry
Longfellow's poem Evangeline is an example of this form:

This is the meter the Odyssey uses, as written by Homer.
Syllables either are longa or brevis, the former are stressed, the
latter are not. Two or three of these syllables make up a foot. A
spondee consists of two longae (like "daylight"). Trochees (like "meter")
start with a longa, but then comes a brevis. A dactyl consists of
longa, then brevis, then brevis (like "beautiful"), named for the finger.
Lines must begin with five feet each of which is a dactyl or spondee;
last in the line (at foot six) is a trochee or else just a spondee.
Input shows longa as hyphen and brevis as lowercase "u". You're
given a line of such symbols and need to decide if it's truly
valid dactylic hexameter—or not.
The input consists of:
Output "yes" if $$$s$$$ is in dactylic hexameter, and "no" otherwise.
-uu-uu---uu-uu-u
yes
-uu-uu-uu-uu-uu-uu
no
------------
yes
uuuuuuuuuuuu
no
| Name |
|---|


