stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 8.118926420683026x):
#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--){

      int x = Q[l];

      Q[l] = a;

      a += x;

    }

    if(a<S[i]){

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

      return 0;

    }

    l++;

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

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

    n -= !Q[n];

  }

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

  return 0;

}
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 1.6560520018046647x):
#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--){

      int x = Q[l];

      Q[l] = a;

      a += x;

    }

    if(a<S[i]){

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

      return 0;

    }

    l++;

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

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

    n -= !Q[n];

  }

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

  return 0;

}
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 1.65377165107201x):
#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--){

      int x = Q[l];

      Q[l] = a;

      a += x;

    }

    if(a<S[i]){

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

      return 0;

    }

    l++;

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

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

    n -= !Q[n];

  }

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

  return 0;

}
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 1.6528251829184566x):
#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--){

      int x = Q[l];

      Q[l] = a;

      a += x;

    }

    if(a<S[i]){

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

      return 0;

    }

    l++;

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

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

    n -= !Q[n];

  }

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

  return 0;

}
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 1.6533670727162164x):
#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--){

      int x = Q[l];

      Q[l] = a;

      a += x;

    }

    if(a<S[i]){

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

      return 0;

    }

    l++;

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

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

    n -= !Q[n];

  }

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

  return 0;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 8.262864607474988x):
#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;

}
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 5.403146026555791x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.280184329949097x):
#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;

}
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 5.332440905122613x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.343965104617235x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.332250206333089x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.279738620757697x):
#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;

}
// Slower C++ solution:
		

	

#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;

}




// Faster C++ solution for the same problem (measured speedup: 5.332250206333089x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.281720624441231x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.328438091511212x):
#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;

}
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 5.382995227099051x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.260492110822595x):
#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;

}
// Slower C++ solution:
#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;

}


// Faster C++ solution for the same problem (measured speedup: 5.312553797358743x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.324035017849693x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.312363809772108x):
#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;

}
// Slower C++ solution:
#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;

}

// Faster C++ solution for the same problem (measured speedup: 5.26004806388435x):
#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;

}