Problem:
 Score : 200 points    Problem Statement Takahashi is competing in a sumo tournament.
The tournament lasts for 15 days, during which he performs in one match per day.
If he wins 8 or more matches, he can also participate in the next tournament.  The matches for the first k days have finished.
You are given the results of Takahashi's matches as a string S consisting of o and x .
If the i -th character in S is o , it means that Takahashi won the match on the i -th day; if that character is x , it means that Takahashi lost the match on the i -th day.  Print YES if there is a possibility that Takahashi can participate in the next tournament, and print NO if there is no such possibility.      Constraints  1 \leq k \leq 15  S is a string of length k consisting of o and x .         Input Input is given from Standard Input in the following format:  S       Output Print YES if there is a possibility that Takahashi can participate in the next tournament, and print NO otherwise.        Sample Input 1 oxoxoxoxoxoxox      Sample Output 1 YES  Takahashi has 7 wins and 7 losses before the last match. If he wins that match, he will have 8 wins.       Sample Input 2 xxxxxxxx      Sample Output 2 NO

Solution (Python):
from collections import Counter
ct=Counter(raw_input())
o=ct['o']
x=ct['x']
total=o+x
o += 15-total
if o >= 8:
    print 'YES'
else:
    print 'NO'

Solution (Python):
S = input()
S_len = len(S)
S_arr = list(S)
x_num = S_arr.count("x")

if x_num < 8:
    print("YES")
else:
    print("NO")

Solution (Python):
S = input()

if S.count("x") > 7:
    print("NO")
else:
    print("YES")

Solution (Python):
s=input()
tmp = [i for i in s if i =='x']
print("YES" if len(tmp) < 8 else "NO")

Solution (Python):
s=input()
k=len(s)
if s.count('x')>7:
    print("NO")
else:
    print("YES")

Solution (Python):
mod = 1000000007

def mul(a, b):
    return ((a % mod) * (b % mod)) % mod

def power(x, y):
    if   y == 0     : return 1
    elif y == 1     : return x % mod
    elif y % 2 == 0 : return power(x, y/2)**2 % mod
    else            : return power(x, y/2)**2 * x % mod

def div(a, b):
    return mul(a, power(b, mod-2))































































S = input()






ans = 0
count = 0
for s in S:
    if s == 'x':
        count += 1

if count >= 8:
    print("NO")
else:
    print("YES")

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)


def main():
    s = S()
    c = collections.Counter(s)
    if c['o'] >= 8 - (15-len(s)):
        return 'YES'

    return 'NO'


print(main())

Solution (Python):
s = input().strip()
if s.count('o') + 15 - len(s) >= 8:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input()
counter = 0
for i in s:
    if i == 'x':
        counter += 1

if counter <= 7:
    print('YES')
else:
    print('NO')

Solution (Python):
s = input()

if 15 - len(s) + s.count('o') >= 8:
    print('YES')
else:
    print('NO')

Solution (Python):
S = list(input())
N = len(S)
cnt = 0
for i in S:
    if i == 'o':
        cnt += 1
        
ans = 15-N + cnt
if ans >= 8:
    print('YES')
else:
    print('NO')

Solution (Python):
if input().count("x")>=8:
    print("NO")
else:
    print("YES")

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7

def LI(): return list(map(int,input().split()))
def I(): return int(input())
def LS(): return input().split()
def S(): return input()

def main():
  s=S()
  a=s.count('o')
  if 15-len(s)+a>=8:
    return 'YES'
  else:
    return 'NO'

print(main())

Solution (Python):
S = input()
print("YES" if (15-len(S))+S.count("o")>=8 else "NO")

Solution (Python):
s = input()
cnt = 0
for c in s:
  if c=='x':
    cnt+=1
if cnt<=7:
  print("YES")
else:
  print("NO")

Solution (Python):
s = input()
if s.count("x") < 8:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input()

kor = 0
for i in range(len(s)):
    if s[i] == 'o':
        kor += 1

if kor+(15-len(s)) >=8:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input()

flg = 0
for i in s:
    if i == "x":
        flg += 1
        
if flg >= 8:
    print("NO")
    
else:
    print("YES")

Solution (Python):
S = input()
print('YES' if S.count('x') <= 7 else 'NO')

Solution (Python):
s = input().strip()
print( 'YES' if 15-len(s)+s.count('o') >= 8 else 'NO' )

Solution (Python):
S = input()
k = len(S)
win = 0
for i in range(k):
    if S[i]=="o":
        win += 1
if win+(15-k)>=8:
    print("YES")
else:
    print("NO")

Solution (Python):
S = input()
k = len(S)
if ((15-k) + S.count("o") >= 8):
    print("YES")
else:
    print("NO")

Solution (Python):
def main():
    s = input()
    a = s.count('o') + 15 - len(s)
    print("YES" if a >= 8 else "NO")

main()

Solution (Python):
s = input()

length = len(s)

print("YES" if s.count("o") + 15 - length >= 8 else "NO")

Solution (Python):
s = input().strip()
oc = 0
for _s in s:
  if _s == 'o':
    oc += 1

if oc + 15-len(s) >= 8:
  print('YES')
else:
  print('NO')

Solution (Python):
n = 15
a = 0
for i in input():
  if i == "o":
    a += 1
  n -= 1
if a+n >= 8:
  print("YES")
else:
  print("NO")

Solution (Python):
s = input()

if s.count("x") > 7:
    print("NO")
else:
    print("YES")

Solution (Python):
S = input()
if 15 - S.count("x") >= 8:
    print("YES")
else:
    print("NO")

Solution (Python):
S = input()
c = 0
for i in S:
    if i == 'x':
        c += 1
if c < 8:
    print("YES")
else:
    print("NO")

Solution (Python):
S = input()

last = 15
win = 0

for c in S:
  last -= 1
  if c == 'o':
    win += 1

if last + win >= 8:
  print("YES")
else:
  print("NO")

Solution (Python):
S = input()
cnt = 0
for s in S:
    if s == "o":
        cnt += 1
if 15 - len(S) >= 8 - cnt:
    print("YES")
else:
    print("NO")

Solution (Python):
s=input()
cnt=0
for i in range(len(s)):
    if s[i]=='x':
        cnt+=1
if cnt>=8:
    print("NO")
else:
    print("YES")

Solution (Python):




S = str(input())
if ((15-len(S))+S.count("o")) >= 8:
  print("YES")
else:
  print("NO")

Solution (Python):
s=input().count("x")
print("YES" if s<=7 else "NO")

Solution (Python):
s = input().strip()
print('YES' if s.count('x') < 8 else 'NO')

Solution (Python):
s = input()
ans = 0
length = len(s)
ans += s.count("o")
tmp = 15 - len(s)

ans += tmp

if ans >= 8:
    print("YES")
else:
    print("NO")

Solution (Python):
s=input()
total=len(s)
win=s.count("o")

print("YES" if 15-total+win>=8 else "NO")

Solution (Python):
S = input()
cnt = S.count("o")
if cnt + 15-len(S) >= 8:
    print("YES")
else:
    print("NO")

Solution (Python):


from sys import stdout
from bisect import bisect_left as binl
from copy import copy, deepcopy
from collections import defaultdict
import math


mod = 1


def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * y) % mod


def gcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


def combination(x, y):
    assert(x >= y)

    ret = math.factorial(x)
    ret = ret // (math.factorial(x - y) * math.factorial(y))

    return ret


def get_divisors(x):
    retlist = []
    for i in range(1, int(x**0.5) + 3):
        if x % i == 0:
            retlist.append(i)
            retlist.append(x // i)
    return retlist


def get_factors(x):
    retlist = []
    for i in range(2, int(x**0.5) + 3):
        while x % i == 0:
            retlist.append(i)
            x = x // i
    retlist.append(x)
    return retlist


def make_linklist(xylist):
    linklist = {}
    for a, b in xylist:
        linklist.setdefault(a, [])
        linklist.setdefault(b, [])
        linklist[a].append(b)
        linklist[b].append(a)
    return linklist


def calc_longest_distance(linklist, v=1):
    distance_list = {}
    distance_count = 0
    distance = 0
    vlist_previous = []
    vlist = [v]
    nodecount = len(linklist)

    while distance_count < nodecount:
        vlist_next = []
        for v in vlist:
            distance_list[v] = distance
            distance_count += 1
            vlist_next.extend(linklist[v])
        distance += 1
        vlist_to_del = vlist_previous
        vlist_previous = vlist
        vlist = list(set(vlist_next) - set(vlist_to_del))

    max_distance = -1
    max_v = None
    for v, distance in distance_list.items():
        if distance > max_distance:
            max_distance = distance
            max_v = v

    return (max_distance, max_v)


def calc_tree_diameter(linklist, v=1):
    _, u = calc_longest_distance(linklist, v)
    distance, _ = calc_longest_distance(linklist, u)
    return distance


class UnionFind:

    def __init__(self, n):
        self.parent = [i for i in range(n)]

    def root(self, i):
        if self.parent[i] == i:
            return i
        self.parent[i] = self.root(self.parent[i])
        return self.parent[i]

    def unite(self, i, j):
        rooti = self.root(i)
        rootj = self.root(j)
        if rooti == rootj:
            return
        if rooti < rootj:
            self.parent[rootj] = rooti
        else:
            self.parent[rooti] = rootj

    def same(self, i, j):
        return self.root(i) == self.root(j)





def main():
    s = input()

    count = 0
    for c in s:
        if c == 'x':
            count += 1

    if count >= 8:
        print('NO')
    else:
        print('YES')


if __name__ == '__main__':
    main()

Solution (Python):
s = input()
lose = s.count("x")
if lose >= 8:
  print("NO")
else:
  print("YES")

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

S = input()

S = list(S)

maru = 0
batu = 0
for i in S:
	if i == "o":
		maru += 1
	else:
		batu += 1

nokori = 15 - len(S)
if maru + nokori >= 8:
	print("YES")
else:
	print("NO")

Solution (Python):
S = input()

ans = (
    'YES' if S.count('x') <= 7 else
    'NO'
)

print(ans)

Solution (Python):
S = input()
if S.count("x") < 8:
    print("YES")
else:
    print("NO")

Solution (Python):
S = input()

cnt = 0
for s in S:
    if s == "o":
        cnt += 1
c = 15 - len(S)
if cnt + c >= 8:
    print("YES")
else:
    print("NO")

Solution (Python):

S = input()
cnt = 0
for i in S:
    if i == "o":
        cnt += 1
if cnt + (15 - len(S)) >= 8:
    print("YES")
else:
    print("NO")

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007


def A():
    n = I()
    print(180*(n-2))
    return


def B():
    s = S()
    res = 15-len(s)
    k = s.count("o")
    if k+res >= 8:
        print("YES")
    else:
        print("NO")
    return


def C():
    n = I()
    return


def D():
    n = I()
    return


def E():
    n = I()
    return


def F():
    n = I()
    return


if __name__ == "__main__":
    B()

Solution (Python):
s=input()
t=0
for i in range(len(s)):
    if s[i]=="x": t+=1
print("YES" if t<=7 else "NO")

Solution (Python):
import random as rd
s=input()


ans='YES' if s.count('o')+15-len(s)>=8 else 'NO'


print(ans)

Solution (Python):

def main():
    buf = input()
    S = buf
    days = len(S)
    wins = 0
    for i in S:
        if i == 'o':
            wins += 1
    if wins >= days - 7:
        print('YES')
    else:
        print('NO')

if __name__ == '__main__':
    main()

Solution (Python):
s = input()
if 15-len(s)>=8-s.count('o'):
  print("YES")
else:
  print("NO")

Solution (Python):


def main():
    s = raw_input()
    if s.count('x') < 8:
        print 'YES'
    else:
        print 'NO'


if __name__ == '__main__':
    main()

Solution (Python):
S = input()
N = len(S)
if S.count('o') + (15-N) >= 8:
    print('YES')
else:
    print('NO')

Solution (Python):
s = list(input())
n = 15
best = (n - len(s)) + sum([1 for x in s if x == 'o'])

if best >= 8:
  print('YES')
else:
  print('NO')

Solution (Python):
S = input()
l = 0
for i in range(len(S)):
    if S[i] == 'x':
        l += 1
if l >= 8:
    print('NO')
else:
    print('YES')

Solution (Python):

"""
Created on Sat Jun  1 20:46:04 2019

@author: Yamazaki Kenichi
"""

S = input()

t = S.count('x')
if t >= 8:
    print('NO')
else:
    print('YES')

Solution (Python):

from sys import stdin




def _li(): return list(map(int, stdin.readline().split()))
def _li_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def _lf(): return list(map(float, stdin.readline().split()))
def _ls(): return stdin.readline().split()
def _i(): return int(stdin.readline())
def _f(): return float(stdin.readline())
def _s(): return stdin.readline()[:-1]


Total = 15
S = _s()
if S.count('o') + Total - len(S) >= 8:
    print('YES')
else:
    print('NO')

Solution (Python):
s=list(str(input()))
cnt=0
for i in range(len(s)):
    if s[i]=="x":
        cnt+=1
print("YNEOS"[cnt>=8::2])

Solution (Python):
S=input()
if S.count('o') >= len(S)-7:
	print('YES')
else:
	print('NO')

Solution (Python):
s = str(input())
k = s.count("o") + 15 - len(s)
if k >= 8:
    print("YES")
else:
    print("NO")

Solution (Python):
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

sys.setrecursionlimit(2147483647)
INF = float('inf')

if os.getenv('LOCAL'):
    sys.stdin = open('_in.txt')






S = sys.stdin.readline().rstrip() + 'oooooooooooooooooooooooooooooo'
if S[:15].count('o') >=8:
    print('YES')
else:
    print('NO')

Solution (Python):
hoge=input()
ans=hoge.count("o")+(15-len(hoge))
if(ans>=8):
  print("YES")
else:
  print("NO")

Solution (Python):
S = input()
o, x = S.count("o"), S.count("x")
res = 15 - len(S)
print("YES" if o + res > x else "NO")

Solution (Python):
S = input()

if S.count('o') + (15 - len(S)) >= 8:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input()

ans = 15-len(s)
for i in range(len(s)):
    if s[i] == 'o':
        ans += 1

print('YES' if ans >= 8 else 'NO')

Solution (Python):

import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

s = ns()
cnt = 0
for si in s:
    if si == "x":
        cnt += 1

print("YES" if cnt < 8 else "NO")

Solution (Python):
import sys


s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    S = i2s()
    n = len(S)
    mi = 15 - n
    ok = len([s for s in S if s == 'o'])
    if ok + mi >= 8:
        print('YES')
    else:
        print('NO')

main()

Solution (Python):
import sys
from fractions import gcd
from itertools import groupby as gb
from itertools import permutations as perm
from itertools import combinations as comb
from collections import Counter as C
from collections import defaultdict as dd
sys.setrecursionlimit(10**5)
def y(f):
    if f:
        print('Yes')
    else:
        print('No')
def Y(f):
    if f:
        print('YES')
    else:
        print('NO')

s = input()
l = len(s)
t = s + 'o' * (15 - l)
Y(t.count('o') >= 8)

Solution (Python):
from sys import exit, setrecursionlimit, stderr, stdin
from functools import reduce
from itertools import *
from collections import defaultdict, Counter
from bisect import bisect
import functools

def input():
  return stdin.readline().strip()

def read():
  return int(input())

def reads():
  return [int(x) for x in input().split()]

S = input()
k = len(S)
maxwin = sum(c == 'o' for c in S) + (15 - k)
print("YES" if maxwin >= 8 else "NO")

Solution (Python):
S = input()
N = len(S)

X = S.count('o') + (15 - N)
if X >= 8:
    print('YES')
else:
    print('NO')

Solution (Python):
def getN():
    return int(input())

def getMN():
    return list(map(int, input().split()))

def getlist():
    return list(map(int, input().split()))

s = input()
total = len(s)
ans = 0
for c in s:
    if c == "o":
        ans += 1

if 15 - total + ans >= 8:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input()
print('YES' if s.count('x') < 8 else 'NO')

Solution (Python):
s = input()
if s.count('o')+15-len(s)>=8:
    print('YES')
else:
    print('NO')

Solution (Python):
s=input()
make=s.count('x')
if make<=7:
     print('YES')
else:
     print('NO')

Solution (Python):
S = input()
num = 0
for i in range(len(S)):
    if S[i] == 'x':
        num += 1

if num < 8:
    print('YES')
else:
    print('NO')

Solution (Python):
s = input()
if s.count("x")<8:
    print("YES")
else:
    print("NO")

Solution (Python):
S= input()
l = len(S)
cnt = 15-l
cnt += S.count('o')
if cnt >= 8:
    print("YES")
else:
    print("NO")

Solution (Python):
a = input()
if a.count("x") >= 8:
	print("NO")
else:
	print("YES")

Solution (Python):
S = input()
N = len(S)

p = S.count('x')

if p > 7:
    print('NO')
else:
    print('YES')

Solution (Python):
S = input()
if S.count('o') + 15 - len(S) >= 8 :
    print('YES')
else :
    print('NO')

Solution (Python):
s = input()
a = 15 - len(s)
if s.count("o") + a >= 8:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input()
if s.count('x') < 8:
    print('YES')
else:
    print('NO')

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
Max = sys.maxsize
def l():
	return list(map(int,input().split()))
def m():
	return map(int,input().split())
def s(x):
	a = []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa == x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x):
	return " ".join(map(str,x))

n = list(input())

if n.count("x") < 8:
	print("YES")
else:
	print("NO")

Solution (Python):
s = input()
k = len(s)
t = 0
for i in s:
    if i == 'o':
        t += 1

if t + (15-k) >= 8:
    print("YES")
else:
    print("NO")

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

S = input()
make = 0
for s in S:
    if s == 'x':
        make += 1

if make >= 8:
    print('NO')
else:
    print('YES')

Solution (Python):
s = input()
ans = 0
for i in range(15):
	if(i >= len(s) or s[i] == 'o'): ans += 1
if ans >= 8:
	print("YES")
else:
	print("NO")

Solution (Python):


def main():
    
    
    data = list(input())
    
    if data.count('x') >= 8:
        print('NO')
    else:
        print('YES')



if __name__ == '__main__':
    main()

Solution (Python):
s = input()
cnt = 0
for c in s:
    if c == 'x':
        cnt += 1
if cnt <=7:
    print('YES')
else:
    print('NO')

Solution (Python):
S = str(input())

if S.count('x') <= 7:
    print('YES')
else:
    print('NO')

Solution (Python):
s = input()
a = s.count("o")
b = len(s)
if a + 15-b >= 8:
    print("YES")
else:
    print("NO")

Solution (Python):
s=input()
cnt=s.count('x')
print('YES' if cnt<8 else 'NO')

Solution (Python):
S = input()
n = len(S)
S += "o" * (15-n)
if S.count("o") >= 8:
    print("YES")
else:
    print("NO")

Solution (Python):
S=input()
k=len(S)
T=S+"o"*(15-k)
if T.count("o")>=8:
    print("YES")
else:
    print("NO")

Solution (Python):
s = input()
if s.count('x')<=7:
    print('YES')
else:
    print('NO')

Solution (Python):
s = input()
n = len(s)
a = sum(c == 'o' for c in s)
print('YES' if ((15 - n) + a) >= 8 else 'NO')

Solution (Python):
S = input()
if S.count("x") <= 7:
    print("YES")
else:
    print("NO")

Solution (Python):
S=input()
if S.count('o')+15-len(S)>=8:
    print('YES')
else:
    print('NO')

Solution (Python):
print("YES" if input().count("x") <= 7 else "NO")