Haskell, 62 bytes
f 0=[0,2] f 7=f 0 f _= g q|r<-q>>=f=sum r==17&&r!!4*r!!11>0
The first thing we do is convert the input to a sort of syllable map. That is a list of integers, one for each syllables with the following meaning:
- First syllable of 2 syllable word.
- One syllable word.
- Second syllable of 2 syllable word.
Notably this selection makes it so that the sum of the syllable list is equal to it's length. This is done because
sum is shorter than
So with this we check that this sum is 17, that is there are 17 syllables all in all. Then we index the syllable codes at the end of the two lines. We multiply these together. If either of them is the first syllable of a 2 syllable word this product is zero because zero times any number is zero. And if both of them are something else then it is not zero. So we check that this is not zero.
And that's it.