#include <bits/stdc++.h>
using namespace std;
char buf[500000];
int main() {
  scanf("%s", buf);
  string s = buf;
  int n = s.size();
  string d = "";
  vector<string> a;
  for (int(i) = (0); (i) < (n); ++(i))
    if (s[i] == '.') {
      a.push_back(d);
      d = "";
    } else
      d.push_back(s[i]);
  a.push_back(d);
  n = a.size();
  if (a[0].size() < 1 || a[0].size() > 8 || n < 2) {
    cout << "NO";
    return 0;
  }
  string ans = a[0] + '.';
  for (int(i) = (1); (i) < (n); ++(i)) {
    if ((i < n - 1 && a[i].size() < 2) || a[i].size() == 0) {
      cout << "NO";
      return 0;
    }
    int x = min(3, int(a[i].size()) - 1);
    if (i == n - 1) x = min(3, int(a[i].size()));
    for (int(j) = (0); (j) < (x); ++(j)) ans.push_back(a[i][j]);
    if (i < n - 1) ans.push_back('\n');
    int k = 0;
    for (int(j) = (x); (j) < (a[i].size()); ++(j)) {
      k++;
      ans.push_back(a[i][j]);
    }
    if (k > 8 || (i == n - 1 && k)) {
      cout << "NO";
      return 0;
    }
    if (i < n - 1) ans.push_back('.');
  }
  cout << "YES" << endl;
  cout << ans << endl;
  return 0;
}
