s=eval(input())

if "C"in s and "F"in s:

  if s.find("C")<s.rfind("F"):print("Yes")

  else:print("No")

else:print("No")
s=eval(input())

if "C"not in s:print("No")

elif s.find("C",0)<s.find("F",s.find("C",0)+1):print("Yes")

else:print("No")
s = eval(input())
if "C" in s and "F" in s:
    if s.find("C") < s.rfind("F"):
        print("Yes")
    else:
        print("No")
else:
    print("No")

s = eval(input())
if "C" not in s:
    print("No")
elif s.find("C", 0) < s.find("F", s.find("C", 0) + 1):
    print("Yes")
else:
    print("No")

-if "C" in s and "F" in s: -    if s.find("C") < s.rfind("F"): -        print("Yes") -    else: -        print("No") +if "C" not in s: +    print("No") +elif s.find("C", 0) < s.find("F", s.find("C", 0) + 1): +    print("Yes")