#include <bits/stdc++.h>
using namespace std;
bool debug = false;
string s;
int p;
vector<string> v;
void readFilename() {
  int cnt = 0;
  string name;
  while (p < s.size() && s[p] != '.') {
    name += s[p];
    p++;
    cnt++;
    if (cnt > 8) {
      cout << "NO" << endl;
      if (debug) cout << "File name is longer than 8." << endl;
      exit(0);
    }
  }
  if (p == s.size()) {
    cout << "NO" << endl;
    if (debug) cout << "Expected '.' but not found." << endl;
    exit(0);
  }
  if (debug) cout << "Name=" << name << endl;
  if (name.empty()) {
    cout << "NO" << endl;
    if (debug) cout << "Name field should be not empty" << endl;
    exit(0);
  }
  string ext;
  p++;
  cnt = 0;
  while (p < s.size() && s[p] != '.') {
    ext += s[p];
    p++;
    cnt++;
    if (cnt == 3) {
      break;
    }
  }
  if (ext.empty()) {
    cout << "NO" << endl;
    if (debug) cout << "Two dots closed by." << endl;
    exit(0);
  }
  if (s[p] == '.') {
    ext.erase(ext.begin() + ext.size() - 1);
    p--;
  }
  if (debug) cout << "Ext=" << ext << endl;
  if (ext.size() == 0) {
    cout << "NO" << endl;
    if (debug) cout << "Empty Extension Name." << endl;
    exit(0);
  }
  v.push_back(name + "." + ext);
}
int main(int argc, char* argv[]) {
  cin >> s;
  while (p < s.size()) {
    readFilename();
  }
  cout << "YES" << endl;
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << endl;
  }
  return 0;
}
