#include <bits/stdc++.h>
using namespace std;
vector<string> Split(const string &str) {
  constexpr int kMaxName = 8;
  constexpr int kMaxExtension = 3;
  vector<bool> start_new(str.size(), false);
  start_new[0] = true;
  int last = -1;
  for (int i = 0; i < (int)str.size(); i += 1) {
    if (str[i] == '.') {
      if (last != -1) {
        int dist = i - last - 1;
        if (dist < 2 || dist > kMaxName + kMaxExtension) {
          return vector<string>();
        }
        start_new[last + min(dist, kMaxExtension + 1)] = true;
      } else if (i > kMaxName || i == 0) {
        return vector<string>();
      }
      last = i;
    }
  }
  if (last == -1 || str.size() - last - 1 > kMaxExtension ||
      last + 1 >= (int)str.size()) {
    return vector<string>();
  }
  vector<string> files;
  for (size_t i = 0; i < str.size(); i += 1) {
    if (start_new[i]) {
      files.push_back("");
    }
    files.back().push_back(str[i]);
  }
  return files;
}
int main() {
  string str;
  getline(cin, str);
  auto files = Split(str);
  if (files.empty()) {
    cout << "NO\n";
    return 0;
  }
  cout << "YES\n";
  for (const auto &file : files) {
    cout << file << "\n";
  }
  return 0;
}
