← Home
package main

import (
	"bufio"
	"fmt"
	"os"
)

func countVowels(s string) int {
	c := 0
	for _, ch := range s {
		switch ch {
		case 'a', 'e', 'i', 'o', 'u':
			c++
		}
	}
	return c
}

func main() {
	sc := bufio.NewScanner(os.Stdin)
	lines := make([]string, 0, 3)
	for sc.Scan() && len(lines) < 3 {
		lines = append(lines, sc.Text())
	}
	for len(lines) < 3 {
		lines = append(lines, "")
	}
	target := []int{5, 7, 5}
	for i := 0; i < 3; i++ {
		if countVowels(lines[i]) != target[i] {
			fmt.Print("NO")
			return
		}
	}
	fmt.Print("YES")
}