#include <bits/stdc++.h>
using namespace std;
int main() {
  string input;
  cin >> input;
  vector<bool> newline(input.size(), false);
  bool pass = false;
  int prvnitecka = -1;
  for (int i = 0; i < 9; i++) {
    if (int(input[i]) == 46) {
      prvnitecka = i;
      break;
    }
  }
  if (prvnitecka < 1) {
    cout << "NO" << endl;
    return 0;
  }
  int counter = 0;
  for (int i = prvnitecka + 1; i < input.size(); i++) {
    if (int(input[i]) == 46) {
      prvnitecka = i;
      if (counter <= 1 || counter > 11) {
        cout << "NO" << endl;
        return 0;
      }
      if (counter >= 2 && counter <= 3) {
        newline[i - 2] = true;
      }
      if (counter > 3 && counter <= 11) {
        newline[i - counter + 2] = true;
      }
      counter = 0;
    } else {
      counter++;
    }
  }
  if (counter == 0 || counter > 3) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 0; i < input.size(); i++) {
    cout << input[i];
    if (newline[i]) {
      cout << endl;
    }
  }
  cout << endl;
  return 0;
};
