#include <bits/stdc++.h>   using namespace std;   int check(string s) {     int d = 0;     for (int i = 0; i < s.length(); i++)       if (s[i] ==  a  || s[i] ==  e  || s[i] ==  o  || s[i] ==  u  || s[i] ==  i )         d++;     return d;   }   int main() {     string s1, s2, s3;     getline(cin, s1);     getline(cin, s2);     getline(cin, s3);     if (check(s1) == 5 && check(s2) == 7 && check(s3) == 5)       cout <<  YES ;     else       cout <<  NO ;   }   