s=input() for x in"YEAH":print(s.count(x),end=' ') print(s.count('!'))