Write an algorithm that determines if a string is a haiku.
Treat the input as exactly three newline-separated lines. A line's syllable count is estimated by counting contiguous vowel groups in each alphabetic word, treating a, e, i, o, u, and y as vowels, subtracting a trailing silent e unless the word ends in le, and never returning fewer than one syllable per word. Ignore punctuation and capitalization. Return True only when the lines contain exactly 5, 7, and 5 syllables respectively; otherwise return False.
Examples: An old silent pond / A frog jumps into the pond / Silence fills the air returns True. Red birds sing / Across the blue sky / Soft winds pass by returns False because the first line has only three syllables.
Input: a string. Output: a boolean.
def is_haiku(text):