changdu = int(input())
s = input()
if s.count("K")>=1 and s.count("a")>=1 and s.count("t")>=1 and s.count("o")>=3 and s.count("_")>=1 and s.count("S")>=1 and s.count("h")>=1 and s.count("k")>=1:
print("YES",changdu-10)
else:
print("NO")

changdu = int(input())
s = input()
if s.count("K")>=1 and s.count("a")>=1 and s.count("t")>=1 and s.count("o")>=3 and s.count("_")>=1 and s.count("S")>=1 and s.count("h")>=1 and s.count("k")>=1:
print("YES",changdu-10)
else:
print("NO")