stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include <cstdio>

#include <algorithm>

#include <functional>

#include <set>



int n;

int S[1<<18];



int main(){

  std::multiset<int, std::greater<int> > S, T;

  scanf("%d",&n);

  for(int i=0;i<(1<<n);i++){

    int x;

    scanf("%d",&x);

    S.insert(x);

  }

  T.insert(*(S.begin()));

  S.erase(S.begin());



  for(int i=0;i<n;i++){

    int tmp[1<<18];

    int t=0;

    auto itr = S.begin();

    for(int x: T){

      while(itr != S.end() && *itr == x) ++itr;

      if(itr == S.end()){

        puts("No");

        return 0;

      }

      tmp[t++] = *itr;

      itr = S.erase(itr);

    }

    if(i != n-1) T.insert(tmp, tmp+t);

  }



  puts("Yes");





  return 0;

}


// Optimized solution to the same problem (faster):
#include <unistd.h>

#include <algorithm>

#include <functional>



char ibuf[4000000];

char *ibufe = ibuf-1;



void readall(){

  int k, t = 0;

  while((k=read(STDIN_FILENO, ibuf+t, sizeof(ibuf)-t))>0) t += k;

}



int read_uint(){

  int x=0;

  while(*(++ibufe) <'0');

  do {

    x *= 10;

    x += *ibufe-'0';

  } while(*(++ibufe) >='0');



  return x;

}



int n;

int S[1<<18];

int Q[19];



int main(){

  readall();

  n = read_uint();

  for(int i=0;i<(1<<n);i++) S[i] = read_uint();

  std::sort(S, S+(1<<n), std::greater<int>());

  int k = 0;

  for(int i=0;i<(1<<n);){

    int j = i;

    for(i++; S[i] == S[j]; i++) ;

    S[k++] = i-j;

  }

  Q[n] = 1;

  for(int i=0;i<k;i++){

    int l;

    int a=0;

    for(l=n;l>=0 && a < S[i];l--) a += Q[l];

    if(a<S[i]){

      write(STDOUT_FILENO, "No\n", 3);

      return 0;

    }

    l++;

    for(int t=0;t<l;t++) Q[t] += S[i];

    int b = a-Q[l];

    Q[l] = a-S[i]+b;

    for(n=l+1;b;n++){

      b -= Q[n];

      Q[n] = b;

    }

    n--;

  }

  write(STDOUT_FILENO, "Yes\n", 4);

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <cstdio>

#include <queue>

#include <algorithm>



int n;

int S[1<<18];

std::priority_queue<int> Q;

std::vector<int> buf;



int main(){

  scanf("%d",&n);

  for(int i=0;i<(1<<n);i++) scanf("%d",S+i);

  std::sort(S, S+(1<<n), std::greater<int>());

  int k = 0;

  for(int i=0;i<(1<<n);){

    int j = i;

    for(i++; S[i] == S[j]; i++) ;

    S[k++] = i-j;

  }

  Q.push((1<<(n+1))-1);

  for(int i=0;i<k;i++){

    if(Q.size() < S[i]){

      puts("No");

      return 0;

    }

    for(int j=0;j<S[i];j++){

      int t = Q.top();

      Q.pop();

      for(t>>=1;t;t>>=1){

        buf.push_back(t);

      }

    }

    for(int x: buf) Q.push(x);

    buf.clear();

  }

  puts("Yes");

  return 0;

}


// Optimized solution to the same problem (faster):
#include <unistd.h>

#include <algorithm>

#include <functional>



char ibuf[4000000];

char *ibufe = ibuf-1;



void readall(){

  int k, t = 0;

  while((k=read(STDIN_FILENO, ibuf+t, sizeof(ibuf)-t))>0) t += k;

}



int read_uint(){

  int x=0;

  while(*(++ibufe) <'0');

  do {

    x *= 10;

    x += *ibufe-'0';

  } while(*(++ibufe) >='0');



  return x;

}



int n;

int S[1<<18];

int Q[19];



int main(){

  readall();

  n = read_uint();

  for(int i=0;i<(1<<n);i++) S[i] = read_uint();

  std::sort(S, S+(1<<n), std::greater<int>());

  int k = 0;

  for(int i=0;i<(1<<n);){

    int j = i;

    for(i++; S[i] == S[j]; i++) ;

    S[k++] = i-j;

  }

  Q[n] = 1;

  for(int i=0;i<k;i++){

    int l;

    int a=0;

    for(l=n;l>=0 && a < S[i];l--) a += Q[l];

    if(a<S[i]){

      write(STDOUT_FILENO, "No\n", 3);

      return 0;

    }

    l++;

    for(int t=0;t<l;t++) Q[t] += S[i];

    int b = a-Q[l];

    Q[l] = a-S[i]+b;

    for(n=l+1;b;n++){

      b -= Q[n];

      Q[n] = b;

    }

    n--;

  }

  write(STDOUT_FILENO, "Yes\n", 4);

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <cstdio>

#include <algorithm>

#include <functional>



int n;

int S[1<<18];

int Q[19];





int main(){

  scanf("%d",&n);

  for(int i=0;i<(1<<n);i++) scanf("%d",S+i);

  std::sort(S, S+(1<<n), std::greater<int>());

  int k = 0;

  for(int i=0;i<(1<<n);){

    int j = i;

    for(i++; S[i] == S[j]; i++) ;

    S[k++] = i-j;

  }

  Q[n] = 1;

  for(int i=0;i<k;i++){

    int l;

    int a=0;

    for(l=n;l>=0 && a < S[i];l--) a += Q[l];

    if(a<S[i]){

      puts("No");

      return 0;

    }

    l++;

    for(int t=0;t<l;t++) Q[t] += Q[l]-a+S[i];

    Q[l++] = a-S[i];

    for(; l<n; l++){

      for(int t=0;t<l;t++) Q[t] += Q[l];

      Q[l] = 0;

    }

  }

  puts("Yes");

  return 0;

}


// Optimized solution to the same problem (faster):
#include <unistd.h>

#include <algorithm>

#include <functional>



char ibuf[4000000];

char *ibufe = ibuf-1;



void readall(){

  int k, t = 0;

  while((k=read(STDIN_FILENO, ibuf+t, sizeof(ibuf)-t))>0) t += k;

}



int read_uint(){

  int x=0;

  while(*(++ibufe) <'0');

  do {

    x *= 10;

    x += *ibufe-'0';

  } while(*(++ibufe) >='0');



  return x;

}



int n;

int S[1<<18];

int Q[19];



int main(){

  readall();

  n = read_uint();

  for(int i=0;i<(1<<n);i++) S[i] = read_uint();

  std::sort(S, S+(1<<n), std::greater<int>());

  int k = 0;

  for(int i=0;i<(1<<n);){

    int j = i;

    for(i++; S[i] == S[j]; i++) ;

    S[k++] = i-j;

  }

  Q[n] = 1;

  for(int i=0;i<k;i++){

    int l;

    int a=0;

    for(l=n;l>=0 && a < S[i];l--) a += Q[l];

    if(a<S[i]){

      write(STDOUT_FILENO, "No\n", 3);

      return 0;

    }

    l++;

    for(int t=0;t<l;t++) Q[t] += S[i];

    int b = a-Q[l];

    Q[l] = a-S[i]+b;

    for(n=l+1;b;n++){

      b -= Q[n];

      Q[n] = b;

    }

    n--;

  }

  write(STDOUT_FILENO, "Yes\n", 4);

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <cstdio>

#include <algorithm>

#include <functional>



int n;

int S[1<<18];

int Q[19];





int main(){

  scanf("%d",&n);

  for(int i=0;i<(1<<n);i++) scanf("%d",S+i);

  std::sort(S, S+(1<<n), std::greater<int>());

  int k = 0;

  for(int i=0;i<(1<<n);){

    int j = i;

    for(i++; S[i] == S[j]; i++) ;

    S[k++] = i-j;

  }

  Q[n] = 1;

  for(int i=0;i<k;i++){

//for(int t=0;t<=n;t++) printf("%d ", Q[t]);

//puts("");

    int l;

    int a=0;

    for(l=n;l>=0 && a < S[i];l--) a += Q[l];

    if(a<S[i]){

      puts("No");

      return 0;

    }

    l++;

    for(int t=0;t<l;t++) Q[t] += S[i];

    int b = a-Q[l];

    Q[l] = a-S[i]+b;

    for(int t=l+1;t<=n;t++){

      b -= Q[t];

      Q[t] = b;

    }

  }

  puts("Yes");

  return 0;

}


// Optimized solution to the same problem (faster):
#include <unistd.h>

#include <algorithm>

#include <functional>



char ibuf[4000000];

char *ibufe = ibuf-1;



void readall(){

  int k, t = 0;

  while((k=read(STDIN_FILENO, ibuf+t, sizeof(ibuf)-t))>0) t += k;

}



int read_uint(){

  int x=0;

  while(*(++ibufe) <'0');

  do {

    x *= 10;

    x += *ibufe-'0';

  } while(*(++ibufe) >='0');



  return x;

}



int n;

int S[1<<18];

int Q[19];



int main(){

  readall();

  n = read_uint();

  for(int i=0;i<(1<<n);i++) S[i] = read_uint();

  std::sort(S, S+(1<<n), std::greater<int>());

  int k = 0;

  for(int i=0;i<(1<<n);){

    int j = i;

    for(i++; S[i] == S[j]; i++) ;

    S[k++] = i-j;

  }

  Q[n] = 1;

  for(int i=0;i<k;i++){

    int l;

    int a=0;

    for(l=n;l>=0 && a < S[i];l--) a += Q[l];

    if(a<S[i]){

      write(STDOUT_FILENO, "No\n", 3);

      return 0;

    }

    l++;

    for(int t=0;t<l;t++) Q[t] += S[i];

    int b = a-Q[l];

    Q[l] = a-S[i]+b;

    for(n=l+1;b;n++){

      b -= Q[n];

      Q[n] = b;

    }

    n--;

  }

  write(STDOUT_FILENO, "Yes\n", 4);

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <cstdio>

#include <algorithm>

#include <functional>



int n;

int S[1<<18];

int Q[19];





int main(){

  scanf("%d",&n);

  for(int i=0;i<(1<<n);i++) scanf("%d",S+i);

  std::sort(S, S+(1<<n), std::greater<int>());

  int k = 0;

  for(int i=0;i<(1<<n);){

    int j = i;

    for(i++; S[i] == S[j]; i++) ;

    S[k++] = i-j;

  }

  Q[n] = 1;

  for(int i=0;i<k;i++){

    int l;

    int a=0;

    for(l=n;l>=0 && a < S[i];l--) a += Q[l];

    if(a<S[i]){

      puts("No");

      return 0;

    }

    l++;

    for(int t=0;t<l;t++) Q[t] += S[i];

    int b = a-Q[l];

    Q[l] = a-S[i]+b;

    for(int t=l+1;b;t++){

      b -= Q[t];

      Q[t] = b;

    }

  }

  puts("Yes");

  return 0;

}


// Optimized solution to the same problem (faster):
#include <unistd.h>

#include <algorithm>

#include <functional>



char ibuf[4000000];

char *ibufe = ibuf-1;



void readall(){

  int k, t = 0;

  while((k=read(STDIN_FILENO, ibuf+t, sizeof(ibuf)-t))>0) t += k;

}



int read_uint(){

  int x=0;

  while(*(++ibufe) <'0');

  do {

    x *= 10;

    x += *ibufe-'0';

  } while(*(++ibufe) >='0');



  return x;

}



int n;

int S[1<<18];

int Q[19];



int main(){

  readall();

  n = read_uint();

  for(int i=0;i<(1<<n);i++) S[i] = read_uint();

  std::sort(S, S+(1<<n), std::greater<int>());

  int k = 0;

  for(int i=0;i<(1<<n);){

    int j = i;

    for(i++; S[i] == S[j]; i++) ;

    S[k++] = i-j;

  }

  Q[n] = 1;

  for(int i=0;i<k;i++){

    int l;

    int a=0;

    for(l=n;l>=0 && a < S[i];l--) a += Q[l];

    if(a<S[i]){

      write(STDOUT_FILENO, "No\n", 3);

      return 0;

    }

    l++;

    for(int t=0;t<l;t++) Q[t] += S[i];

    int b = a-Q[l];

    Q[l] = a-S[i]+b;

    for(n=l+1;b;n++){

      b -= Q[n];

      Q[n] = b;

    }

    n--;

  }

  write(STDOUT_FILENO, "Yes\n", 4);

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <cstdio>

#include <algorithm>

#include <functional>



int n;

int S[1<<18];

int Q[19];





int main(){

  scanf("%d",&n);

  for(int i=0;i<(1<<n);i++) scanf("%d",S+i);

  std::sort(S, S+(1<<n), std::greater<int>());

  int k = 0;

  for(int i=0;i<(1<<n);){

    int j = i;

    for(i++; S[i] == S[j]; i++) ;

    S[k++] = i-j;

  }

  Q[n] = 1;

  for(int i=0;i<k;i++){

    int l;

    int a=0;

    for(l=n;l>=0 && a < S[i];l--) a += Q[l];

    if(a<S[i]){

      puts("No");

      return 0;

    }

    l++;

    for(int t=0;t<l;t++) Q[t] += S[i];

    int b = a-Q[l];

    Q[l] = a-S[i]+b;

    for(n=l+1;b;n++){

      b -= Q[n];

      Q[n] = b;

    }

    n--;

  }

  puts("Yes");

  return 0;

}


// Optimized solution to the same problem (faster):
#include <unistd.h>

#include <algorithm>

#include <functional>



char ibuf[4000000];

char *ibufe = ibuf-1;



void readall(){

  int k, t = 0;

  while((k=read(STDIN_FILENO, ibuf+t, sizeof(ibuf)-t))>0) t += k;

}



int read_uint(){

  int x=0;

  while(*(++ibufe) <'0');

  do {

    x *= 10;

    x += *ibufe-'0';

  } while(*(++ibufe) >='0');



  return x;

}



int n;

int S[1<<18];

int Q[19];



int main(){

  readall();

  n = read_uint();

  for(int i=0;i<(1<<n);i++) S[i] = read_uint();

  std::sort(S, S+(1<<n), std::greater<int>());

  int k = 0;

  for(int i=0;i<(1<<n);){

    int j = i;

    for(i++; S[i] == S[j]; i++) ;

    S[k++] = i-j;

  }

  Q[n] = 1;

  for(int i=0;i<k;i++){

    int l;

    int a=0;

    for(l=n;l>=0 && a < S[i];l--) a += Q[l];

    if(a<S[i]){

      write(STDOUT_FILENO, "No\n", 3);

      return 0;

    }

    l++;

    for(int t=0;t<l;t++) Q[t] += S[i];

    int b = a-Q[l];

    Q[l] = a-S[i]+b;

    for(n=l+1;b;n++){

      b -= Q[n];

      Q[n] = b;

    }

    n--;

  }

  write(STDOUT_FILENO, "Yes\n", 4);

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <cstdio>

#include <cstring>

#include <iostream>

#include <string>

#include <cmath>

#include <bitset>

#include <vector>

#include <map>

#include <set>

#include <queue>

#include <deque>

#include <algorithm>

#include <complex>

#include <unordered_map>

#include <unordered_set>

#include <random>

#include <cassert>

#include <fstream>

#include <utility>

#include <functional>

#define popcount __builtin_popcount

using namespace std;

typedef long long int ll;

typedef pair<int, int> P;

vector<int> g[1<<18];

int s[1<<18];

int main()

{

	int n; cin>>n;

	for(int i=0; i<(1<<n); i++) cin>>s[i];

	//sort(s, s+(1<<n), greater<int>());

	vector<int> v;

	v.push_back(0);

	for(int i=0; i<n; i++){

		for(int j=0; j<(1<<i); j++){

			v.push_back(v[j]+(1<<i));

			g[v[j]].push_back(v[j]+(1<<i));

		}

	}

	int d[1<<18];

	for(int i=(1<<n)-1; i>=0; i--){

		d[i]=0;

		for(auto y:g[i]) d[i]=max(d[i], d[y]+1);

	}

	map<int, int> mp;

	for(int i=0; i<(1<<n); i++) mp[s[i]]++;

	priority_queue<P> que;

	que.push({d[0], 0});

	for(auto itr=mp.rbegin(); itr!=mp.rend(); itr++){

		int c=itr->second;

		if(c>que.size()){

			cout<<"No"<<endl;

			return 0;

		}

		vector<int> w;

		for(int i=0; i<c; i++){

			P p=que.top(); que.pop();

			w.push_back(p.second);

		}

		for(auto x:w){

			for(auto y:g[x]) que.push({d[y], y});

		}

	}

	/*queue<int> que;

	que.push(0);

	int t=0;

	int num[1<<18];

	while(!que.empty()){

		int x=que.front(); que.pop();

		num[x]=s[t];

		t++;

		for(auto y:g[x]){

			que.push(y);

		}

	}

	for(int i=0; i<(1<<n); i++){

		for(auto y:g[i]){

			if(num[i]<=num[y]){

				cout<<"No"<<endl;

				return 0;

			}

		}

	}*/

	cout<<"Yes"<<endl;

	return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <cstring>

#include <iostream>

#include <string>

#include <cmath>

#include <bitset>

#include <vector>

#include <map>

#include <set>

#include <queue>

#include <deque>

#include <algorithm>

#include <complex>

#include <unordered_map>

#include <unordered_set>

#include <random>

#include <cassert>

#include <fstream>

#include <utility>

#include <functional>

#define popcount __builtin_popcount

using namespace std;

typedef long long int ll;

typedef pair<int, int> P;

int main()

{

	int n; cin>>n;

	map<int, int> mp;

	for(int i=0; i<(1<<n); i++){

		int s; cin>>s;

		mp[s]++;

	}

	priority_queue<int> que;

	que.push(n);

	for(auto itr=mp.rbegin(); itr!=mp.rend(); itr++){

		int c=itr->second;

		if(c>que.size()){

			cout<<"No"<<endl;

			return 0;

		}

		vector<int> v;

		for(int i=0; i<c; i++){

			int x=que.top(); que.pop();

			v.push_back(x);

		}

		for(auto x:v) for(int y=0; y<x; y++) que.push(y);

	}

	cout<<"Yes"<<endl;

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <cstdlib>

#include <algorithm>

#include <cstring>

using namespace std;



int main()

{

  string s;

  int ok=0,ok1=1,cnt=0;

  cin>>s;

  int len=s.length();

  for(int i=0;i<len;++i)

  {

  	if(s[i]=='C'&&ok1) { ok=1; ok1=0; }

  	if(s[i]=='F'&&ok) { cout<<"Yes"<<endl; system("pause"); return 0; }

  }

  cout<<"No"<<endl;

  system("pause"); 

  return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<cstring>

using namespace std;

char st[106];

int main() {

  scanf("%s",st+1);

  int n=strlen(st+1);

  for (int i=1;i<=n;++i)

  if (st[i]=='C') {

    for (int j=i+1;j<=n;++j)

    if (st[j]=='F') {

      puts("Yes");

      return 0;

    }

  }

  puts("No");

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

int l;

char s[110];

int main()

{

	scanf("%s",s),l=strlen(s);

	for(register int i=0;i<l;i++)

		if(s[i]=='C')

			for(register int j=i+1;j<l;j++)

				if(s[j]=='F')

					printf("Yes\n"),exit(0);

	printf("No\n");

	return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<cstring>

using namespace std;

char st[106];

int main() {

  scanf("%s",st+1);

  int n=strlen(st+1);

  for (int i=1;i<=n;++i)

  if (st[i]=='C') {

    for (int j=i+1;j<=n;++j)

    if (st[j]=='F') {

      puts("Yes");

      return 0;

    }

  }

  puts("No");

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<string>

using namespace std;

string a;

int len,flag;

int main()

{

    cin>>a;

    len=a.length();

    for(int i=0;i<len;i++)

    {

        if(a[i]=='C')

        {

            for(int k=i+1;k<len;k++)

            {

                if(a[k]=='F')

                {

                    flag=1;

                }

            }

        }

    }

    if(flag==1)

    {

        cout<<"Yes";

    }

    else cout<<"No";

    return 0;

}


// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<cstring>

using namespace std;

char st[106];

int main() {

  scanf("%s",st+1);

  int n=strlen(st+1);

  for (int i=1;i<=n;++i)

  if (st[i]=='C') {

    for (int j=i+1;j<=n;++j)

    if (st[j]=='F') {

      puts("Yes");

      return 0;

    }

  }

  puts("No");

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

string a;

bool flag=false;

int main()

{

	cin>>a;

	for(int i=0; i<a.size(); i++)

	{

		if(a[i]=='C')

			flag=true;  

		if(a[i]=='F' && flag)  

		{

			cout<<"Yes"<<endl;

			return 0;

		}

	}

	cout<<"No"<<endl;  

	return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<cstring>

using namespace std;

char st[106];

int main() {

  scanf("%s",st+1);

  int n=strlen(st+1);

  for (int i=1;i<=n;++i)

  if (st[i]=='C') {

    for (int j=i+1;j<=n;++j)

    if (st[j]=='F') {

      puts("Yes");

      return 0;

    }

  }

  puts("No");

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<string>

using namespace std;

string s;

int l;

int main()

{

    cin>>s;

    l=s.size();

    for(int i=0;i<l;i++)

    {

        if(s[i]=='C')

        {

            for(int j=i+1;j<l;j++)

            {

                if(s[j]=='F')

                {

                    cout<<"Yes";

                    return 0;

                }

            }

        }

    }

    cout<<"No";

    return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<cstring>

using namespace std;

char st[106];

int main() {

  scanf("%s",st+1);

  int n=strlen(st+1);

  for (int i=1;i<=n;++i)

  if (st[i]=='C') {

    for (int j=i+1;j<=n;++j)

    if (st[j]=='F') {

      puts("Yes");

      return 0;

    }

  }

  puts("No");

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<cstdio>

#include<cstring>

using namespace std;

int main()

{

	int i,c=0,f=0;

	char a[100];

	scanf("%s",a);

	for(i=0;i<strlen(a);i++)

	{

		if(a[i]=='C')

		{

			c=1;

		}

		if(a[i]=='F'&&c==1)

		{

			printf("Yes");

			f=1;

			break;

		}

	}

	if(c!=1||f!=1)

	{

		printf("No");

	}

	return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<cstring>

using namespace std;

char st[106];

int main() {

  scanf("%s",st+1);

  int n=strlen(st+1);

  for (int i=1;i<=n;++i)

  if (st[i]=='C') {

    for (int j=i+1;j<=n;++j)

    if (st[j]=='F') {

      puts("Yes");

      return 0;

    }

  }

  puts("No");

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
		

	

#include<iostream>

#include<cstdio>

#include<string>

using namespace std;

string s;

int l;

int main()

{

    cin>>s;

    l=s.size();

    for(register int i=0;i<l;i++)

    {

        if(s[i]=='C')

        {

            for(register int j=i+1;j<l;j++)

            {

                if(s[j]=='F')

                {

                    cout<<"Yes";

                    return 0;

                }

            }

        }

    }

    cout<<"No";

    return 0;

}




// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<cstring>

using namespace std;

char st[106];

int main() {

  scanf("%s",st+1);

  int n=strlen(st+1);

  for (int i=1;i<=n;++i)

  if (st[i]=='C') {

    for (int j=i+1;j<=n;++j)

    if (st[j]=='F') {

      puts("Yes");

      return 0;

    }

  }

  puts("No");

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

char s[1000001];

int main(){

	int i;

	scanf("%s",s);

	for(i=0;i<strlen(s);i++)

		if(s[i]=='C')break;

	for(;i<strlen(s);i++)

		if(s[i]=='F'){printf("Yes\n");return 0;}

	printf("No\n");

	return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<cstring>

using namespace std;

char st[106];

int main() {

  scanf("%s",st+1);

  int n=strlen(st+1);

  for (int i=1;i<=n;++i)

  if (st[i]=='C') {

    for (int j=i+1;j<=n;++j)

    if (st[j]=='F') {

      puts("Yes");

      return 0;

    }

  }

  puts("No");

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<string>

using namespace std;

int main()

{

    char c;

    bool flag=false;

    while(cin>>c){if (c=='C') flag=true;if (flag&&c=='F') {cout<<"Yes";return 0;}}

    cout<<"No";

    return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>

#include<cstring>

using namespace std;

char st[106];

int main() {

  scanf("%s",st+1);

  int n=strlen(st+1);

  for (int i=1;i<=n;++i)

  if (st[i]=='C') {

    for (int j=i+1;j<=n;++j)

    if (st[j]=='F') {

      puts("Yes");

      return 0;

    }

  }

  puts("No");

  return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<cstdio>

#include<cmath>

#include<algorithm>

#include<cctype>

#include<cstring>

#include<queue>

#include<iostream>

#include<map>

using namespace std;

typedef long long ll;

typedef double lf;

typedef unsigned un;

typedef int in;

#define mian main

#define maxn 10000+10

#define maxm 10000+10

#define _(a) read(a)

#define non void

#define inf 2147483647

#define bre break

#define con continue

#define prq priority_queue

#define re register

#define bu bool

#define cz char

#define cst const

#define ope operator

#define inl inline

#define upp upper_bound

#define low lower_bound

#define next_per next_permutation

cz obuf[1<<23],*O=obuf,buf[1<<23],*L=buf,*R=buf;

inl cz gc(){return L==R&&(R=(L=buf)+fread(buf,1,100000,stdin),L==R)?EOF:*L++;}

template<typename T>inl T Max(T a,T b){return a>b?a:b;}

template<typename T>inl T Min(T a,T b){return a<b?a:b;}

template<typename T>inl T Abs(T a){return a<0?-a:a;}

template<typename T>inl non read(T &a){a=0;T k=1;char c=gc();while(c<'0'||c>'9')k=c=='-'?-1:k,c=gc();while(c>='0'&&c<='9')a=a*10+(c^48),c=gc();if(c!='.'){a*=k;return;}T t=0.1;while(c<'0'||c>'9')c=gc();while(c>='0'&&c<='9')a+=t*(c^48),c=gc(),t*=0.1;a*=k;}

template<typename T>non print(T x){if(x>9)print(x/10);*O++=x%10+'0';}

template<typename T>non out(T a,cz t='\n'){print(a);*O++=t;}

non fresh(){fwrite(obuf,O-obuf,1,stdout);}

string s;

in n,i;

bu a;

in main()

{

	cin>>s;

	n=s.size();

	for(i=0;i<n;++i)if(s[i]=='C')bre;

	for(;i<n;++i)if(s[i]=='F')a=1;

	if(a)*O++='Y',*O++='e',*O++='s';

	else *O++='N',*O++='o';

	*O++='\n',fresh();

	//freopen("a.in","r",stdin);

	//freopen(".out","w",stdout);

}


// Optimized solution to the same problem (faster):
#include<cstdio>

#include<cstring>

char a[105];

int main(){

	scanf("%s",a);

	for(int i=0;i<=strlen(a)-1;i++){

		if(a[i]=='C')

			for(int j=strlen(a)-1;j>i;j--)

				if(a[j]=='F'){

					printf("Yes");

					return 0;

				}

	}

	printf("No");

	return 0;

}

// Fastest known solution for this problem: