S = eval(input())

print(('YES' if 7-len(S)>=-sum([c=='o' for c in S]) else 'NO'))
print(('YES' if sum([c=='x' for c in eval(input())])<8 else 'NO'))
S = eval(input())
print(("YES" if 7 - len(S) >= -sum([c == "o" for c in S]) else "NO"))

print(("YES" if sum([c == "x" for c in eval(input())]) < 8 else "NO"))

-S = eval(input()) -print(("YES" if 7 - len(S) >= -sum([c == "o" for c in S]) else "NO")) +print(("YES" if sum([c == "x" for c in eval(input())]) < 8 else "NO"))