#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
const double eps = 1e-9;
const int inf = 2000000000;
const long long infLL = 9000000000000000000;
int main() {
  vector<int> v;
  for (int i = 0; i < 3; i++) {
    string s;
    getline(cin, s);
    int size = s.size();
    int count = 0;
    for (int j = 0; j < size; j++) {
      if (s[j] == 'a' || s[j] == 'e' || s[j] == 'i' || s[j] == 'o' ||
          s[j] == 'u')
        count++;
    }
    v.push_back(count);
  }
  if (v[0] == 5 && v[1] == 7 && v[2] == 5)
    cout << "YES" << '\n';
  else
    cout << "NO" << '\n';
  return 0;
}
