#include<bits/stdc++.h>
using namespace std;
using i64 = int_fast64_t;
#define rep(i, N) for(int (i) = 0; (i) < (N); (i)++)
#define all(v) (v).begin(), (v).end()
#define eb emplace_back
#define Cout(s) cout << s << endl
string Yes(bool b) {if(b){return "Yes";} else {return "No";}}
string YES(bool b) {if(b){return "YES";} else {return "NO";}}


int main(){
	string S;
	cin >> S;
	string F = "FESTIVAL";
	rep(i, F.size()) S.pop_back();

	Cout(S);
}

#include<iostream>
#include<cstring>
using namespace std;
int main()
{
	char n[10];
	cin>>n;
	for(int i=0;i<strlen(n);i++)
	{
		if(n[i]=='A'&&n[i+1]=='C')
		{
			cout<<"Yes"<<endl;
			return 0;
		}
	}
	cout<<"No"<<endl;
}