Eudokimus, a system administrator is in trouble again. As a result of an error in some script, a list of names of very important files has been damaged. Since they were files in the BerFS file system, it is known that each file name has a form "name.ext", where: 

  * name is a string consisting of lowercase Latin letters, its length is from 1 to 8 characters; 
  * ext is a string consisting of lowercase Latin letters, its length is from 1 to 3 characters. 



For example, "read.me", "example.txt" and "b.cpp" are valid file names and "version.info", "ntldr" and "contestdata.zip" are not.

Damage to the list meant that all the file names were recorded one after another, without any separators. So now Eudokimus has a single string.

Eudokimus needs to set everything right as soon as possible. He should divide the resulting string into parts so that each part would be a valid file name in BerFS. Since Eudokimus has already proved that he is not good at programming, help him. The resulting file list can contain the same file names.

Input

The input data consists of a single string s, its length is from 1 to 4·105 characters. The string can contain only lowercase Latin letters ('a' - 'z') and periods ('.').

Output

In the first line print "YES" (without the quotes), if it is possible to divide s into parts as required. In this case, the following lines should contain the parts of the required partition, one per line in the order in which they appear in s. The required partition can contain the same file names. If there are multiple solutions, print any of them.

If the solution does not exist, then print in a single line "NO" (without the quotes).

Examples

Input

read.meexample.txtb.cpp


Output

YES
read.m
eexample.t
xtb.cpp


Input

version.infontldrcontestdata.zip


Output

NO

Source: codeforces | Difficulty: MEDIUM
Tags: Dynamic programming

Implementation

Greedy algorithms


Solutions:
s = input()
n = len(s)
a = s.find('.')
b = s.rfind('.')
from sys import exit
if a == b == -1:
	print('NO')
	exit()
if a == 0 or n - b - 1 == 0:
	print('NO')
	exit()
if not 0 < a < 9 or not 0 < n - b - 1 < 4:
	print('NO')
	exit()
s2 = s[a + 1:b + 1]
res = [s[:a + 1]]
app = res.append
(length, item) = (0, '')
for (i, x) in enumerate(s2):
	if x == '.':
		if not 1 < length < 12:
			print('NO')
			exit()
		k = 0
		if length == 11:
			res[-1] += item[:3]
			k = 3
		elif length == 10:
			res[-1] += item[:2]
			k = 2
		else:
			res[-1] += item[0]
			k = 1
		app(item[k:] + '.')
		(length, item) = (0, '')
	else:
		length += 1
		item += x
res[-1] += s[b + 1:]
print('YES')
for (i, x) in enumerate(res):
	print(x)


s = input()
if s == '.':
	print('NO')
elif '.' not in s:
	print('NO')
else:
	arr = s.split('.')
	if arr[-1] == '' or arr[0] == '':
		print('NO')
	else:
		ans = []
		flag = 0
		for i in range(1, len(arr) - 1):
			s1 = arr[i - 1]
			s2 = arr[i]
			if len(s1) <= 8 and len(s1) >= 1:
				if len(s2) >= 2 and len(s2) <= 11:
					if len(s2) <= 8:
						s1 += '.' + s2[0]
						arr[i] = s2[1:]
					elif len(s2) > 8:
						index = len(s2) - 8
						s1 += '.' + s2[:index]
						arr[i] = s2[index:]
					ans.append(s1)
				else:
					print('NO')
					flag = 1
					break
			else:
				print('NO')
				flag = 1
				break
		if flag == 0:
			if len(arr[-1]) <= 3 and len(arr[-2]) <= 8:
				ans.append(arr[-2] + '.' + arr[-1])
				print('YES')
				for i in ans:
					print(i)
			else:
				print('NO')


import os
import sys
from io import BytesIO, IOBase
import threading
from collections import defaultdict

def seive(x):
	prime = [*range(x + 1)]
	for i in range(2, x + 1):
		if prime[i] == i:
			ind = i ** 2
			while ind < x + 1:
				if prime[ind] == ind:
					prime[ind] = i
				ind += i
	return prime

def main():
	s = input()
	l = s.split('.')
	for st in l[1:len(l) - 1]:
		if not 2 <= len(st) <= 11:
			print('NO')
			return
	if len(l) < 2 or len(l[0]) > 8 or len(l[-1]) > 3 or (len(l[0]) == 0) or (len(l[-1]) == 0):
		print('NO')
		return
	print('YES')
	prev = 0
	for (i, name) in enumerate(l[:len(l) - 1]):
		if i == len(l) - 2:
			print(name[prev:] + '.' + l[i + 1])
		else:
			print(name[prev:] + '.' + l[i + 1][:min(len(l[i + 1]) - 1, 3)])
		prev = min(len(l[i + 1]) - 1, 3)
83756765
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


def s():
	a = input().split('.')
	ans = [a[0] + '.']
	for i in range(1, len(a) - 1):
		i = a[i]
		if len(i) < 2 or len(i) > 11:
			print('NO')
			return
		if len(i) > 3:
			ans[-1] += i[:3]
			ans.append(i[3:] + '.')
		else:
			ans[-1] += i[0]
			ans.append(i[1:] + '.')
	ans[-1] += a[-1]
	if len(a) != len(ans) + 1:
		print('NO')
		return
	for i in ans:
		p = i.split('.')
		if len(p) != 2:
			print('NO')
			return
		if len(p[0]) < 1 or len(p[0]) > 8 or len(p[1]) < 1 or (len(p[1]) > 3):
			print('NO')
			return
	print('YES')
	print('\n'.join(ans))
s()


import sys
s = sys.stdin.readline()
k = 0
a = 1
dp = []
e = 0
lendp = 0
r = ''
for x in s:
	if x == '.':
		dp += [k]
		lendp += 1
		if e == 0:
			a = 0
			if k > 8 or k == 0:
				a = 1
				break
			e = 1
		elif k > 11 or k <= 1:
			a = 1
			break
		k = 0
	else:
		k += 1
if e == 1:
	dp += [k]
	if k == 1 or k > 4:
		a = 1
if a == 1:
	print('NO')
else:
	j = 0
	print('YES')
	for i in range(lendp):
		if dp[i + 1] > 3:
			print(s[j:j + dp[i] + 4])
			j += dp[i] + 4
			dp[i + 1] -= 3 * (i < lendp)
		elif dp[i + 1] == 2:
			print(s[j:j + dp[i] + 2])
			j += dp[i] + 2
			dp[i + 1] -= i < lendp
		else:
			print(s[j:j + dp[i] + 3])
			j += dp[i] + 3
			dp[i + 1] -= 2 * (i < lendp)


def main():
	s = input()
	a = list(s.split('.'))
	if len(a) == 1:
		print('NO')
		return
	if '' in a:
		print('NO')
		return
	if len(a[0]) > 8:
		print('NO')
		return
	if len(a[-1]) > 3:
		print('NO')
		return
	for i in range(1, len(a) - 1):
		if len(a[i]) > 11 or len(a[i]) <= 1:
			print('NO')
			return
	print('YES')
	print(a[0], end='.')
	for i in range(1, len(a) - 1):
		if len(a[i]) > 3:
			print(a[i][:3])
			print(a[i][3:], end='.')
		else:
			print(a[i][0])
			print(a[i][1:], end='.')
	print(a[-1])
	return
main()


import sys

def solve():
	a = input().split('.')
	if len(a) < 2:
		print('NO')
		return
	res = [[''] * 2 for _ in range(len(a) - 1)]
	res[0][0] = a[0]
	res[len(res) - 1][1] = a[-1]
	for i in range(1, len(a) - 1):
		if len(a[i]) < 2:
			print('NO')
			return
		extension = min(3, len(a[i]) - 1)
		res[i - 1][1] = a[i][:extension]
		res[i][0] = a[i][extension:]
	for (f, s) in res:
		if len(f) < 1 or len(f) > 8 or len(s) < 1 or (len(s) > 3):
			print('NO')
			return
	print('YES')
	print('\n'.join(('.'.join(entry) for entry in res)))

def prt(l):
	return print(' '.join(l))

def rv():
	return map(int, input().split())

def rl(n):
	return [list(map(int, input().split())) for _ in range(n)]
if sys.hexversion == 50594544:
	sys.stdin = open('test.txt')
solve()


import re
import sys
exit = sys.exit
from bisect import bisect_left as bsl, bisect_right as bsr
from collections import Counter, defaultdict as ddict, deque
from functools import lru_cache
cache = lru_cache(None)
from heapq import *
from itertools import *
from math import inf
from pprint import pprint as pp
enum = enumerate
ri = lambda : int(rln())
ris = lambda : list(map(int, rfs()))
rln = sys.stdin.readline
rl = lambda : rln().rstrip('\n')
rfs = lambda : rln().split()
mod = 1000000007
d4 = [(0, -1), (1, 0), (0, 1), (-1, 0)]
d8 = [(-1, -1), (0, -1), (1, -1), (-1, 0), (1, 0), (-1, 1), (0, 1), (1, 1)]

def solve(s):
	a = []
	n = len(s)
	i = 0
	while i < n:
		dot = s.find('.', i)
		if dot == i or dot == -1 or dot - i > 8 or (n - dot == 1):
			return []
		j = s.find('.', dot + 1)
		if j == -1:
			if n - dot > 4:
				return []
			j = n
		elif j - dot <= 2:
			return []
		elif j - dot > 4:
			j = dot + 4
		else:
			j -= 1
		a.append((i, j))
		i = j
	return a
s = rl()
n = len(s)
a = solve(s)
if not a:
	print('NO')
else:
	print('YES')
	ans = []
	for (i, j) in a:
		ans.append(s[i:j])
	print('\n'.join(ans))


import os, sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
try:
	(sys.stdin, sys.stdout) = (open('in.txt', 'r'), open('out.txt', 'w'))
except:
	pass
ii1 = lambda : int(sys.stdin.readline().strip())
is1 = lambda : sys.stdin.readline().strip()
iia = lambda : list(map(int, sys.stdin.readline().strip().split()))
isa = lambda : sys.stdin.readline().strip().split()
mod = int(1000000000.0 + 7)
from math import inf
s = is1()
dot = s.count('.')
if dot == 0:
	print('NO')
	exit()
arr = s.split('.')
while arr and len(arr[-1]) == 0:
	arr.pop()
if len(arr) - 1 != dot:
	print('NO')
	exit()
if not 1 <= len(arr[0]) <= 8:
	print('NO')
	exit()
if len(arr[-1]) > 3:
	print('NO')
	exit()
for i in range(1, len(arr) - 1):
	if not 2 <= len(arr[i]) <= 11:
		print('NO')
		exit()
print('YES')
prev = 0
for i in range(len(arr) - 1):
	print(arr[i][prev:], end='')
	print('.', end='')
	ne = len(arr[i + 1])
	prev = max(1, ne - 8)
	if i + 1 == len(arr) - 1:
		print(arr[i + 1])
	else:
		print(arr[i + 1][:prev])


import os
import sys
from io import BytesIO, IOBase
import math

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
import os
import sys
from io import BytesIO, IOBase

def main():
	pass
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
s = input()
l = s.split('.')
if len(l[-1]) > 3 or len(l[0]) > 8:
	print('NO')
elif s[0] == '.' or s[-1] == '.' or '.' not in s:
	print('NO')
else:
	na = [l[0]]
	e = []
	n = len(l)
	f = True
	for i in range(1, n - 1):
		le = len(l[i])
		if le < 2 or le > 11:
			print('NO')
			f = False
			break
		elif le <= 9:
			e.append(l[i][:1])
			na.append(l[i][1:])
		elif le == 10:
			e.append(l[i][:2])
			na.append(l[i][2:])
		else:
			e.append(l[i][:3])
			na.append(l[i][3:])
	e.append(l[-1])
	if f:
		print('YES')
		for i in range(0, len(na)):
			print(na[i] + '.' + e[i])


s = input()
v = s.split(sep='.')
flen = len(v[0])
llen = len(v[-1])
if len(v) < 2:
	print('NO')
elif not (flen >= 1 and flen <= 8):
	print('NO')
elif not (llen >= 1 and llen <= 3):
	print('NO')
else:
	for i in range(1, len(v) - 1):
		if not (len(v[i]) >= 2 and len(v[i]) <= 11):
			print('NO')
			exit()
	print('YES')
	print(v[0], end='')
	print('.', end='')
	for i in range(1, len(v) - 1):
		a = v[i]
		mi = min(3, len(a) - 1)
		print(a[0:mi])
		print(a[mi:len(a)], end='')
		print('.', end='')
	print(v[-1])


R = lambda : map(int, input().split())
s = input()
arr = []
for (i, c) in enumerate(s):
	if c == '.':
		arr.append(i)
n = len(s)
if not arr or not 1 <= arr[0] <= 8 or (not 1 <= n - arr[-1] - 1 <= 3):
	print('NO')
elif not all((2 <= abs(y - x - 1) <= 11 for (x, y) in zip(arr, arr[1:]))):
	print('NO')
else:
	print('YES')
	st = 0
	for i in range(len(arr) - 1):
		en = arr[i] + (1 if arr[i + 1] - arr[i] - 1 < 4 else 3) + 1
		print(s[st:en])
		st = en
	if st < n:
		print(s[st:])


import sys

def fail():
	print('NO')
	sys.exit()
parts = input().strip().split('.')
n = len(parts)
if n < 2:
	fail()
result = (n - 1) * [None]
for i in range(1, n):
	(s, t) = (parts[i - 1], parts[i])
	(a, b) = (len(s), len(t))
	if a < 1 or a > 8:
		fail()
	if b == 0:
		fail()
	c = max(1, min(3, b - 1))
	(t, parts[i]) = (t[:c], t[c:])
	result[i - 1] = '%s.%s' % (s, t)
result[-1] += parts[-1]
if len(result[-1][result[-1].index('.') + 1:]) > 3:
	fail()
print('YES')
print('\n'.join(result))


a = input().strip()
n = len(a)
possible = True
x = a.split('.')
y = []
y.append(x[0])
for i in range(1, len(x) - 1):
	l = len(x[i])
	if l == 1:
		possible = False
	else:
		idx = min(3, l // 2)
		y.extend([x[i][0:idx], x[i][idx:]])
y.append(x[-1])
n = len(y)
names = []
for i in range(1, n, 2):
	n = y[i - 1] + '.' + y[i]
	if len(y[i - 1]) not in range(1, 8 + 1):
		possible = False
	if len(y[i]) not in range(1, 3 + 1):
		possible = False
	names.append(n)
z = ''
for i in names:
	z += i
if a != z:
	possible = False
if not possible:
	print('NO')
else:
	print('YES')
	for n in names:
		print(n)


s = input().split('.')
y = 0 < len(s[0]) < 9 and 0 < len(s[-1]) < 4 and (len(s) > 1)
for i in range(1, len(s) - 1):
	if len(s[i]) < 2 or len(s[i]) > 11:
		y = 0
print(['NO', 'YES'][y])
if y < 1:
	exit()
print(s[0], end='')
for i in range(1, len(s) - 1):
	print('.' + [s[i][0] + '\n' + s[i][1:], s[i][:3] + '\n' + s[i][3:]][len(s[i]) > 3], end='')
print('.' + s[-1])


ok = 1
s = input().split('.')
n = len(s)
ver = 0
if n < 2:
	ok = 0
	ver = 1
for i in range(1, n - 1):
	t = s[i]
	if not t.isalpha() or not t.islower() or len(t) < 2 or (len(t) > 11):
		ok = 0
		ver = 2
		break
t = s[0]
if not t.isalpha() or not t.islower() or len(t) < 1 or (len(t) > 8):
	ok = 0
	ver = 3
t = s[n - 1]
if not t.isalpha() or not t.islower() or len(t) < 1 or (len(t) > 3):
	ok = 0
	ver = 4
if ok == 0:
	print('NO')
else:
	print('YES')
	if n == 2:
		print('.'.join(s))
	else:
		r = ['1', '2']
		m0 = len(s[0])
		for i in range(1, n):
			k = m0
			m = len(s[i])
			if m > 3:
				m0 = m - 3
				m = 3
			elif i < n - 1:
				m0 = m - 1
				m = 1
			l = len(s[i - 1])
			r[0] = s[i - 1][l - k:l]
			r[1] = s[i][0:m]
			print('.'.join(r))


q = []

def is_valid(s, n):
	first_dot = 0
	last_dot = n - 1
	for i in range(n):
		if s[i] == '.':
			break
		first_dot += 1
	for i in range(n - 1, -1, -1):
		if s[i] == '.':
			break
		last_dot -= 1
	if first_dot > last_dot:
		return False
	if first_dot > 8 or first_dot == 0 or n - 1 - last_dot == 0 or (n - 1 - last_dot > 3):
		return False
	cnt = 0
	for i in range(first_dot + 1, last_dot + 1):
		if s[i] == '.':
			if cnt > 11 or cnt <= 1:
				return False
			q.append(cnt)
			cnt = 0
			continue
		cnt += 1
	return True
s = input()
n = len(s)
if not is_valid(s, n):
	print('NO')
	exit()
print('YES')
ans = ''
answer = []
for j in range(n):
	if s[j] == '.':
		break
	ans += s[j]
for i in q:
	if i >= 4:
		for l in range(4):
			ans += s[j]
			j += 1
		answer.append(ans)
		ans = ''
	else:
		for l in range(2):
			ans += s[j]
			j += 1
		answer.append(ans)
		ans = ''
	while s[j] != '.':
		ans += s[j]
		j += 1
while j < n:
	ans += s[j]
	j += 1
answer.append(ans)
print('\n'.join(answer))


import sys
import string
from collections import Counter, defaultdict
from math import fsum, sqrt, gcd, ceil, factorial
from itertools import combinations, permutations
flush = lambda : sys.stdout.flush
comb = lambda x, y: factorial(x) // factorial(y) // factorial(x - y)
ip = lambda : input()
ii = lambda : int(input())
r = lambda : map(int, input().split())
rr = lambda : list(r())
ss = ip()
s = ss.split('.')
f = True
if not 1 <= len(s[0]) <= 8 or not 0 < len(s[-1]) < 4 or '.' not in ss:
	exit(print('NO'))
ans = [s[0]]
for i in s[1:-1]:
	if len(i) < 2 or len(i) > 11:
		f = False
		break
	if len(i) == 10:
		ans[-1] += '.' + i[0] + i[1]
		ans.append(i[2:])
	elif len(i) == 11:
		ans[-1] += '.' + i[:3]
		ans.append(i[3:])
	else:
		ans[-1] += '.' + i[0]
		ans.append(i[1:])
ans[-1] += '.' + s[-1]
if f:
	print('YES')
	print(*ans, sep='\n')
else:
	print('NO')


s = input().strip().split('.')
d = {2: 1, 3: 1, 4: 1, 5: 2, 6: 3, 7: 3, 8: 3, 9: 3, 10: 3, 11: 3}
if len(s) <= 1 or len(s[0]) > 8 or len(s[-1]) > 3 or (len(s[0]) == 0) or (len(s[-1]) == 0):
	print('NO')
	exit(0)
matches = []
for i in range(1, len(s) - 1):
	if len(s[i]) not in d:
		print('NO')
		exit(0)
	matches.append(s[i - 1] + '.' + s[i][:d[len(s[i])]])
	s[i] = s[i][d[len(s[i])]:]
matches.append(s[-2] + '.' + s[-1])
print('YES')
for m in matches:
	print(m)


s = input()
words = s.split('.')
n = s.count('.')
numberOfWordsWithSizeLessThanTwo = len([x for x in words[1:-1] if len(x) < 2])
numberOfWordsWithSizeMoreThanEleven = len([x for x in words[1:-1] if len(x) > 11])
if len(words) == 1:
	print('NO')
elif len(words[0]) < 1 or len(words[0]) > 8 or len(words[-1]) < 1 or (len(words[-1]) > 3) or (numberOfWordsWithSizeLessThanTwo != 0) or (numberOfWordsWithSizeMoreThanEleven != 0):
	print('NO')
else:
	s0 = words[0]
	sn = words[-1]
	s1 = ''
	s2 = ''
	print('YES')
	for word in words[1:-1]:
		if len(word) > 9:
			s2 = word[-8:]
			s1 = word[:-8]
		else:
			s1 = word[0]
			s2 = word[1:]
		res = s0 + '.' + s1
		print(res)
		s0 = s2
	print(s0 + '.' + sn)


s = [x for x in input().split('.')]
if len(s) == 1:
	print('NO')
	exit(0)
file = s[0]
s = s[1:]
ending = s[-1]
s = s[:-1]
store = []
if len(file) == 0:
	print('NO')
	exit(0)
for x in s:
	if len(x) > 11 or len(x) == 0:
		print('NO')
		exit(0)
	if len(x) - 1 <= 8:
		store.append(file + '.' + x[:1])
		file = x[1:]
	elif len(x) - 2 <= 8:
		store.append(file + '.' + x[:2])
		file = x[2:]
	elif len(x) - 3 <= 8:
		store.append(file + '.' + x[:3])
		file = x[3:]
if len(ending) == 0 or len(ending) > 3 or len(file) == 0 or (len(file) > 8):
	print('NO')
	exit(0)
else:
	store.append(file + '.' + ending)
print('YES')
for x in store:
	print(x)


s = input()
arr = s.split('.')
for i in arr:
	if len(i) == 0:
		print('NO')
		exit(0)
if len(arr) < 2:
	print('NO')
	exit(0)
ans = ['']
ans[0] = arr[0]
for i in range(1, len(arr) - 1, 1):
	ans.append('')
	if len(arr[i]) > 3:
		ans[i - 1] = ans[i - 1] + '.' + arr[i][:3]
		ans[i] = arr[i][3:]
	else:
		ans[i - 1] = ans[i - 1] + '.'
		ans[i] = ''
		if len(arr[i]) == 1:
			ans[i] += arr[i]
		elif len(arr[i]) == 2:
			ans[i - 1] += arr[i][0]
			ans[i] += arr[i][1]
		elif len(arr[i]) == 3:
			ans[i - 1] += arr[i][:2]
			ans[i] += arr[i][2]
ans[len(ans) - 1] += '.' + arr[len(arr) - 1]
for i in ans:
	x = i.split('.')
	if len(x) != 2 or len(x[0]) < 1 or len(x[0]) > 8 or (len(x[1]) < 1) or (len(x[1]) > 3):
		print('NO')
		exit(0)
print('YES')
for i in ans:
	print(i)


s = input()
a = []
for (i, c) in enumerate(s):
	if c == '.':
		a.append(i)
n = len(s)
if not a or not 1 <= a[0] <= 8 or (not 1 <= n - a[-1] - 1 <= 3):
	print('NO')
elif not all((2 <= abs(y - x - 1) <= 11 for (x, y) in zip(a, a[1:]))):
	print('NO')
else:
	print('YES')
	st = 0
	for i in range(len(a) - 1):
		ed = a[i] + (1 if a[i + 1] - a[i] - 1 < 4 else 3) + 1
		print(s[st:ed])
		st = ed
	if st < n:
		print(s[st:])


s = list(input().split('.'))
if len(s) == 1:
	print('NO')
	exit()
x = s[0]
y = ''
ans = []
for i in range(1, len(s) - 1):
	if not 1 <= len(x) <= 8:
		print('NO')
		exit()
	if 2 <= len(s[i]) <= 3:
		y = s[i][:1]
		ans.append(x + '.' + y)
		x = s[i][1:]
	elif 4 <= len(s[i]) <= 11:
		y = s[i][:3]
		ans.append(x + '.' + y)
		x = s[i][3:]
	else:
		print('NO')
		exit()
y = s[-1]
if not (1 <= len(x) <= 8 and 1 <= len(y) <= 3):
	print('NO')
	exit()
else:
	ans.append(x + '.' + y)
print('YES')
print(*ans, sep='\n')


s = input()
s = s.split('.')
f = 0
if (len(s[0]) <= 8 and len(s[0]) >= 1) and (len(s[-1]) <= 3 and len(s[-1]) >= 1):
	pass
else:
	f = 1
if len(s) < 2:
	f = 1
for i in range(1, len(s) - 1):
	if len(s[i]) <= 11 and len(s[i]) > 1:
		pass
	else:
		f = 1
if f == 1:
	print('NO')
else:
	print('YES')
	prev = 0
	last = s[0] + '.'
	for i in range(1, len(s) - 1):
		if len(s[i]) >= 9:
			last += s[i][:len(s[i]) - 8]
			print(last)
			last = s[i][len(s[i]) - 8:] + '.'
		else:
			last += s[i][0]
			print(last)
			last = s[i][1:] + '.'
	print(last + s[-1])


from math import *

def is_even(p):
	n = len(p)
	count = 0
	for i in range(n):
		index = p.index(i, i, n)
		if i == index:
			pass
		else:
			count += 1
			temp = p[i]
			p[i] = p[index]
			p[index] = temp
	if count % 2 == 0:
		return True
	else:
		return False
prime = []

def SieveOfEratosthenes():
	global prime
	prime = [1] * 2000010
	prime[1] = 0
	p = 2
	while p * p <= 2000001:
		if prime[p]:
			for i in range(p * p, 2000002, p):
				prime[i] = 0
lpf = []

def precompute():
	global lpf
	lpf = [0] * 1000001
	for i in range(2, 1000001):
		if not lpf[i]:
			for j in range(i, 1000001, i):
				if not lpf[j]:
					lpf[j] = i

def binpow(a, b):
	res = 1
	while b > 0:
		if b & 1:
			res *= a
		a *= a
		b >>= 1
	return res

def modpow(a, b, x):
	res = 1
	while b > 0:
		if b & 1:
			res *= a
			res %= x
		a *= a
		a %= x
		b >>= 1
	return res
cont = []

def f(x):
	global cont
	total = 0
	for i in cont:
		total += abs(i - x)
	return total

def bs(low, high, target):
	while low + 3 < high:
		mid = (low + high) / 2
		if arr[mid] < target:
			low = mid
		else:
			high = mid - 1
	for i in range(high, low - 1, -1):
		if arr[o] < target:
			return i
	return -1

def ternary_search(l, r):
	while r - l > 10:
		m1 = l + (r - l) / 3
		m2 = r - (r - l) / 3
		f1 = f(m1)
		f2 = f(m2)
		if f1 > f2:
			l = m1
		else:
			r = m2
	mino = f(l)
	for i in range(l, r + 1):
		mino = min(mino, f(i))
	return mino
s = input()
l = s.split('.')
n = len(l)
if n == 0 or n == 1:
	print('NO')
	quit()
glob = []
b = True
if len(l[0]) > 8 or len(l[0]) == 0:
	b = False
if len(l[-1]) > 3 or len(l[-1]) == 0:
	b = False
if n == 1:
	if b:
		print('YES')
		print(s)
		quit()
	else:
		print('NO')
		quit()
glob.append(l[0] + '.')
for i in range(1, n - 1):
	if 2 <= len(l[i]) <= 11:
		if len(l[i]) <= 9:
			glob[i - 1] += l[i][0:1]
			glob.append(l[i][1:] + '.')
		else:
			glob[i - 1] += l[i][0:-8]
			glob.append(l[i][-8:] + '.')
	else:
		b = False
		break
glob[-1] += l[-1]
if b:
	print('YES')
	for a in glob:
		print(a)
else:
	print('NO')


s = input()
if s[0] == '.' or s[-1] == '.':
	print('NO')
	quit()
s = s.split('.')
if len(s) == 1:
	print('NO')
	quit()
if not 1 <= len(s[-1]) <= 3 or not 1 <= len(s[0]) <= 8:
	print('NO')
	quit()
arr = [s[-1]]
s.pop()
n = len(s)
for i in range(n - 1, -1, -1):
	p = len(s[i])
	if i > 0 and (not 2 <= p <= 11):
		print('NO')
		quit()
	for k in range(1, 4):
		if i > 0:
			if 1 <= p - k <= 8:
				arr[-1] = s[i][k:] + '.' + arr[-1]
				arr.append(s[i][:k])
				break
		else:
			arr[-1] = s[0] + '.' + arr[-1]
			break
print('YES')
for item in arr[::-1]:
	print(item)


import math as mt
import sys, string
input = sys.stdin.readline
import random
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
s = input().strip()
if s.count('.') == 0:
	print('NO')
else:
	s = s.split('.')
	if len(s[0]) > 8 or len(s[0]) < 1:
		print('NO')
	elif len(s[-1]) > 3 or len(s[-1]) < 1:
		print('NO')
	else:
		x = []
		for i in range(1, len(s) - 1):
			if len(s[i]) < 2 or len(s[i]) > 11:
				print('NO')
				exit()
			else:
				x.append(str(s[i - 1] + '.' + s[i][:min(3, len(s[i]) - 1)]))
				s[i] = s[i][min(3, len(s[i]) - 1):]
		x.append(s[-2] + '.' + s[-1])
		print('YES')
		for i in x:
			print(i)


def swap():
	global flag, c
	flag ^= 1
	return [8, 3][flag]
s = input() + '  '
if s[0] == '.':
	exit(print('NO'))
(flag, cur, ans, c) = (0, '', [], 8)
for i in range(len(s) - 2):
	if s[i] == '.':
		if s[i + 1] in '. ' or s[i + 2] == '.':
			exit(print('NO'))
		c = swap()
		cur = (cur + '.') * flag
	elif (s[i + 1] == '.' or not c) and flag:
		ans.append(cur)
		cur = s[i]
		c = swap() - (c == 0)
	elif c:
		cur += s[i]
		c -= 1
	else:
		exit(print('NO'))
if '.' not in cur:
	exit(print('NO'))
print('YES', *ans, cur, sep='\n')


b = input()
a = list(b.split('.'))
c = 0
for i in range(len(b)):
	if b[i] == '.':
		c += 1
ans = []
temp = []
w = 1
na = len(a)
for i in range(len(a) - 1):
	if len(a[i]) >= 1 and len(a[i]) <= 8 and (len(a[i + 1]) >= 1) and (len(a[i + 1]) <= 3) and (i + 1 == na - 1):
		temp = a[i] + '.' + a[i + 1]
		a[i + 1] = a[i + 1]
		ans.append(temp)
		break
	if len(a[i + 1]) > 3 and i + 1 == na - 1:
		w = 0
	if len(a[i]) >= 1 and len(a[i]) <= 8 and (len(a[i + 1]) >= 4):
		temp = a[i] + '.' + a[i + 1][:3]
		a[i + 1] = a[i + 1][3:]
		ans.append(temp)
	elif len(a[i]) >= 1 and len(a[i]) <= 8 and (len(a[i + 1]) >= 2):
		temp = a[i] + '.' + a[i + 1][:1]
		a[i + 1] = a[i + 1][1:]
		ans.append(temp)
	else:
		w = 0
if len(a[len(a) - 1]) > 3:
	w = 0
if c == len(ans) and w == 1 and (na != 1):
	print('YES')
	for i in range(len(ans)):
		print(ans[i])
else:
	print('NO')


s = input()
l = []
for i in range(len(s)):
	if s[i] == '.':
		l.append(i)
if len(s) == 1:
	print('NO')
	exit()
if len(l) == 0:
	print('NO')
	exit()
if len(s) - 1 - l[-1] > 3 or len(s) - 1 - l[-1] == 0:
	print('NO')
	exit()
i = 0
t1 = 0
if l[i] == 0:
	print('NO')
	exit()
if len(l) and l[0] > 8:
	print('NO')
	exit()
while i < len(l) - 1:
	if l[i + 1] - l[i] > 12 or l[i + 1] - l[i] <= 2:
		print('NO')
		exit()
	i = i + 1
i = 0
print('YES')
while i < len(l) - 1:
	if l[i + 1] - l[i] > 12:
		print('NO')
		exit()
	elif l[i + 1] - l[i] > 4:
		t = 4
	elif l[i + 1] - l[i] <= 2:
		print('NO')
		exit()
	else:
		t = 2
	str1 = s[t1:l[i]] + '.' + s[l[i] + 1:l[i] + t]
	t1 = l[i] + t
	print(str1)
	i = i + 1
print(s[t1:l[i]] + '.' + s[l[i] + 1:])


s = input()
words = []
n = len(s)
i = 0
j = 0
flag = 1
word = ''
while i < n and j < n and (flag == 1):
	if s[i] != '.':
		word += s[i]
		i += 1
	elif 8 >= i - j >= 1:
		word += '.'
		i += 1
		if i < n - 2 and '.' not in s[i:i + 4]:
			word += s[i:i + 3]
			i += 3
			j = i
		elif i < n - 1 and '.' not in s[i:i + 3]:
			word += s[i:i + 2]
			i += 2
			j = i
		elif i < n and '.' not in s[i:i + 2]:
			word += s[i:i + 1]
			i += 1
			j = i
		else:
			flag = 0
			break
		words.append(word)
		word = ''
	else:
		flag = 0
		break
if flag == 0 or len(word) != 0:
	print('NO')
else:
	print('YES')
	for x in words:
		print(x)


a = input().split('.')
l = [[a[0]]]
for i in a[1:-1]:
	m = min(3, len(i) - 1)
	l[-1] += [i[:m]]
	l += [[i[m:]]]
l[-1] += [a[-1]]
if len(a) < 2 or any((len(i) not in range(1, 9) or len(j) not in range(1, 4) for (i, j) in l)):
	print('NO')
else:
	print('YES')
	print('\n'.join(('.'.join(i) for i in l)))


s = input()
n = len(s)
i = 0
x = []
ans = 1
for j in s:
	if j == '.':
		x.append(i)
	i += 1
if not x:
	print('NO')
elif x[0] == 0 or n - x[-1] - 1 > 3 or x[-1] == n - 1 or (x[0] > 8):
	print('NO')
else:
	a = [s[:x[0] + 1]]
	for i in range(1, len(x)):
		if x[i] - x[i - 1] > 12 or x[i] - x[i - 1] < 3:
			ans = 0
			break
		elif x[i] - x[i - 1] == 3:
			a[-1] += s[x[i - 1] + 1:x[i - 1] + 2]
			a.append(s[x[i - 1] + 2:x[i] + 1])
		elif x[i] - x[i - 1] - 1 == 11:
			a[-1] += s[x[i - 1] + 1:x[i - 1] + 4]
			a.append(s[x[i - 1] + 4:x[i] + 1])
		else:
			a[-1] += s[x[i - 1] + 1:x[i - 1] + 3]
			a.append(s[x[i - 1] + 3:x[i] + 1])
	a[-1] += s[x[-1] + 1:]
	if ans:
		print('YES')
		for i in a:
			print(i)
	else:
		print('NO')


s = input().split('.')
if len(s) == 1:
	print('NO')
	exit()
elif len(s[0]) > 8 or len(s[0]) == 0:
	print('NO')
	exit()
D = []
a = s[0]
for i in range(1, len(s) - 1):
	if len(s[i]) <= 1:
		print('NO')
		exit()
	elif len(s[i]) > 11:
		print('NO')
		exit()
	else:
		b = s[i][:min(len(s[i]) - 1, 3)]
		D.append(a + '.' + b)
		a = s[i][min(len(s[i]) - 1, 3):]
if len(s[-1]) > 3 or len(s[-1]) < 1:
	print('NO')
	exit()
D.append(a + '.' + s[-1])
print('YES')
for i in D:
	print(i)


ar = input().split('.')
if len(ar[0]) > 8 or len(ar[-1]) > 3 or '' in ar or (len(ar) < 2):
	print('NO')
	exit()
for i in range(len(ar)):
	if len(ar[i]) > 11:
		print('NO')
		exit()
out = []
for i in range(len(ar) - 1):
	t = min(len(ar[i + 1]) - 1, 3)
	if t == 0 and i + 1 != len(ar) - 1:
		print('NO')
		exit()
	if i + 1 == len(ar) - 1:
		t = len(ar[i + 1])
	out.append(ar[i] + '.' + ar[i + 1][0:t])
	ar[i + 1] = ar[i + 1][t:]
print('YES')
for i in range(len(out)):
	print(out[i])


mas = list(input().split('.'))
if len(mas) < 2:
	print('NO')
	exit(0)
if len(mas[0]) > 8 or len(mas[0]) < 1:
	print('NO')
	exit(0)
for i in range(1, len(mas) - 1):
	if len(mas[i]) > 11 or len(mas[i]) < 2:
		print('NO')
		exit(0)
if len(mas[len(mas) - 1]) > 3 or len(mas[len(mas) - 1]) < 1:
	print('NO')
	exit(0)
print('YES')
k = 0
z = 0
for i in range(1, len(mas) - 1):
	if len(mas[i]) == 11:
		print(mas[i - 1][k:] + '.' + mas[i][:3])
		k = 3
	elif len(mas[i]) == 10:
		print(mas[i - 1][k:] + '.' + mas[i][:2])
		k = 2
	elif len(mas[i]) == 9:
		print(mas[i - 1][k:] + '.' + mas[i][:1])
		k = 1
	else:
		print(mas[i - 1][k:] + '.' + mas[i][:1])
		k = 1
print(mas[len(mas) - 2][k:] + '.' + mas[len(mas) - 1])


s = input().split('.')
if len(s) > 1:
	if len(s) == 2:
		if 1 <= len(s[0]) <= 8 and 1 <= len(s[-1]) <= 3:
			print('YES')
			print(s[0] + '.' + s[1])
		else:
			print('NO')
	elif 1 <= len(s[0]) <= 8 and 1 < len(min(s[1:len(s) - 1], key=lambda x: len(x))) <= len(max(s[1:len(s) - 1], key=lambda x: len(x))) <= 11 and (1 <= len(s[-1]) <= 3):
		print('YES')
		for i in range(0, len(s) - 1):
			if i == 0:
				name = s[i]
				ext = s[i + 1][:min(3, len(s[i + 1]) - 1)]
			elif i == len(s) - 2:
				name = s[i][len(ext):]
				ext = s[i + 1]
			else:
				name = s[i][len(ext):]
				ext = s[i + 1][:min(3, len(s[i + 1]) - 1)]
			print(name + '.' + ext)
	else:
		print('NO')
else:
	print('NO')


tokens = input().split('.')
if len(tokens) == 1:
	print('NO')
	quit()
if len(tokens[0]) > 8 or len(tokens[0]) == 0:
	print('NO')
	quit()
to_print = []
for token in range(1, len(tokens)):
	if len(tokens[token]) == 0 or len(tokens[token]) > 11:
		print('NO')
		quit()
	elif len(tokens[token]) < 2 and token != len(tokens) - 1:
		print('NO')
		quit()
	elif token == len(tokens) - 1:
		if len(tokens[token]) > 3:
			print('NO')
			quit()
		else:
			to_print.append(tokens[token - 1] + '.' + tokens[token])
	else:
		num = len(tokens[token]) - 1 if len(tokens[token]) <= 3 else 3
		to_print.append(tokens[token - 1] + '.' + tokens[token][:num])
		tokens[token] = tokens[token][num:]
print('YES')
for ans in to_print:
	print(ans)