stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

#pragma GCC optimize("Ofast")

#pragma GCC optimize("unroll-loops")

#pragma GCC optimize ("-ffloat-store") // to restrict undesirable precision

#pragma GCC optimize ("-fno-defer-pop")// to pop argument of function as soon as it returns

#define all(a) a.begin(),a.end()

#define ll long long int

#define ld long double

ll power(ll a,ll b,ll m){ if(b==0) return 1; if(b==1) return a%m; ll t=power(a,b/2,m)%m; t=(t*t)%m; if(b&1) t=((t%m)*(a%m))%m; return t;}

ll modInverse(ll a, ll m) { return power(a, m-2, m); }

#define ps push_back

#define fs first

#define takeline cin.ignore();

#define sc second

#define N 3000005

#define endl "\n"

#define mod 1000000007

//((1.0l)*BIG MULTIPLY MAGIC?)

// string to integer stoi()

// string to long long stoll()

// string.substr(position,length);

// integer to string to_string();

//-----------------------------------------------

ll fl[N];

int main(){



	ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

	

	ll i,j,k,l,n;

	cin>>n;

	ll ar[n+1];

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

		cin>>ar[i];

	}

	

	k=0;

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

		if(ar[i]==i){

			if(i+1<=n){

				k++; swap(ar[i],ar[i+1]);

			}

			else{

				k++; swap(ar[i],ar[i-1]);

			}

		}

	}

	cout<<k;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.287281015737831x):
#include<stdio.h>

int a[100005];

int main()

{

    int n;

    int flag=0;

    scanf("%d",&n);

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

        scanf("%d",&a[i]);

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

    {

        if(a[i]==i)

        {

           int t=a[i+1];

           a[i+1]=a[i];

           a[i]=t;

           flag++;

        }

    }

    printf("%d\n",flag);

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



const int N = 1e5;



int n;

int li[N+5];



int main(){

	scanf("%d",&n);

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

		scanf("%d",&li[i]);

	}

	int id = 1;

	int ans = 0;

	while(id <= n){

		if(id != li[id]) {

			id++;

			continue;

		}

		ans++;

		if(id+1 <= n && id+1 == li[id+1]) id+=2;

		else id++;

//		cout << ">> " << id << endl;

	}

	printf("%d\n",ans);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2058679883062915x):
#include<stdio.h>

int a[100005];

int main()

{

    int n;

    int flag=0;

    scanf("%d",&n);

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

        scanf("%d",&a[i]);

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

    {

        if(a[i]==i)

        {

           int t=a[i+1];

           a[i+1]=a[i];

           a[i]=t;

           flag++;

        }

    }

    printf("%d\n",flag);

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



int main() {

    int n; scanf("%d", &n);



    int res = 0;

    int before = 0;

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

        int a; scanf("%d", &a);



        if (i == a) {

            before += 1;

        } else {

            res += (before + 1) / 2;

            before = 0;

        }

    }

    res += (before + 1) / 2;



    printf("%d\n", res);

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.164271054286364x):
#include<stdio.h>

int a[100005];

int main()

{

    int n;

    int flag=0;

    scanf("%d",&n);

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

        scanf("%d",&a[i]);

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

    {

        if(a[i]==i)

        {

           int t=a[i+1];

           a[i+1]=a[i];

           a[i]=t;

           flag++;

        }

    }

    printf("%d\n",flag);

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int n,a[(int)1e5+5],ans = 0;

int main(){

	cin>>n;

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

		cin>>a[i];

	}

	int temp = 0;

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

		if(a[i]==i+1){

//			cout<<a[i]<<" sama "<<ans<<" "<<temp<<"\n";

			temp++;

		}else{

//			cout<<a[i]<<" tidak sama "<<ans<<" "<<temp<<"\n";

			if(temp) ans += max(1,temp/2 + (temp%2));

			temp = 0;

		}

	}

	if(temp) ans += max(1,temp/2 + (temp%2));

	cout<<ans<<"\n";

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2323447209083485x):
#include<stdio.h>

int a[100005];

int main()

{

    int n;

    int flag=0;

    scanf("%d",&n);

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

        scanf("%d",&a[i]);

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

    {

        if(a[i]==i)

        {

           int t=a[i+1];

           a[i+1]=a[i];

           a[i]=t;

           flag++;

        }

    }

    printf("%d\n",flag);

    return 0;

}
// Slower C++ solution:
#include<cstdio>

#include<iostream>

#include<algorithm>

#include<cstring>

#include<cmath>



using namespace std;



typedef long long ll;

const ll mod=1e9+7;

const ll MAXN=1e5+10;

const ll INF=0x7fffffff;



int a[MAXN],n;



void swp(int x,int y){

	int t=a[x];

	a[x]=a[y];

	a[y]=t;

}

//

//void print(){

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

//		cout<<a[i]<<" ";

//	}

//	cout<<endl;

//} 



int main()//所有的循环已改正 

{

	cin>>n;

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

		scanf("%d",&a[i]);

	}

	int ans=0;

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

		if(a[i]==i){

			swp(i,i+1);

			ans++;

//			print();

		}

	}

	cout<<ans<<endl;

	return 0;

}	 


// Faster C++ solution for the same problem (measured speedup: 5.259922981167963x):
#include<cstdio>



int a[100000+5],n;



void swp(int x,int y){

	int t=a[x];

	a[x]=a[y];

	a[y]=t;

}



int main()

{

	scanf("%d",&n);

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

		scanf("%d",&a[i]);

	}

	int ans=0;

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

		if(a[i]==i){

			swp(i,i+1);

			ans++;

		}

	}

	printf("%d",ans);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



long long pw[20];



int main() {

	

	ios::sync_with_stdio(0);

	cin.tie(0), cout.tie(0);

	

	pw[0] = 1;

	for (int i = 1; i < 20; i++) pw[i] = pw[i - 1] * 10;

	

	int K; cin >> K;

	long long now = 0;

	while (K--) {

		now++;

		auto nxt = now, nxt_sum = 0LL;

		{

			auto buf = now;

			while (buf) nxt_sum += buf % 10, buf /= 10;

		}

		for (int i = 1; i < 18; i++) if (now >= pw[i]) {

			auto cur = now / pw[i] * pw[i] + pw[i] - 1;

			auto sum = 0LL, buf = cur;

			while (buf) sum += buf % 10, buf /= 10;

			if ((long long)cur * nxt_sum < (long long)nxt * sum) {

				nxt = cur, nxt_sum = sum;

			}

		}

		now = nxt;

		cout << now << "\n";

	}

	

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.007615219494577x):
#include<stdio.h>

double cal(long long x)

{

    long long sum=0,temp=x;

    while(x)

	{

        sum+=x%10;

        x/=10;

    }

    return (double)temp/sum;

}

int main()

{

	long long num=0,bot=1,temp1,temp2;

    int k;

    scanf("%d",&k);

    while(1)

	{

        while(1)

		{

			temp1=num+bot;

			temp2=num+bot*10;

			if(cal(temp1)<=cal(temp2))break;

            else bot=temp2-num;

        }

        num+=bot;

        printf("%lld\n",num);

        k--;

        if(!k)break;

    }

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;



int main() {

	ios::sync_with_stdio(0); cin.tie(0);

	string s, t; cin >> s >> t;

	s += t[t.size()-1];

	cout << ((s==t)?"Yes":"No") << '\n';

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.397788593730395x):
#include <stdio.h>

#include <string.h>

int main(){

	char s[400],t[400];

	scanf("%s",s);

	getchar();

	scanf("%s",t);

	getchar();

	int len = strlen(s);

	t[len] = '\0';

	if (strcmp (s,t) == 0){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <iomanip>

#include <algorithm>

#include <string>

#include <cstring>

#include <cstdio>

#include <cmath>

#include <map>

#include <set>

#include <stack>

#include <queue>

#include <sstream>

#include <vector>

#define INF 0x3f3f3f3f

using namespace std;



typedef long long ll;

const int mod = 1e9 + 7;

const int maxn = 10005;

const double pi = acos(-1.0);



string s,t;



int main()

{

    while(cin >> s)

    {

        cin >> t;

        int len = s.length();

        int flag = 0;

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

        {

            if(s[i] != t[i])

            {

                flag = 1;

                cout << "No" << endl;

                break;

            }

        }

        if(flag == 0)

            cout << "Yes" << endl;

    }

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 5.328890668585649x):
#include <stdio.h>

#include <string.h>

int main(){

	char s[400],t[400];

	scanf("%s",s);

	getchar();

	scanf("%s",t);

	getchar();

	int len = strlen(s);

	t[len] = '\0';

	if (strcmp (s,t) == 0){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	return 0;

}
// Slower C++ solution:
#include <string> 

#include <iostream>



using namespace std;



int main()

{

    string a,b;

    cin >> a >> b;

    for (int i=a.size();i>=0;i--)

    {

         if (a[0]==b[0]&&i==0)

        {

            cout << "Yes";

            break;

        }

        else if (a[i]!=b[i] && i!=a.size())

        {

            cout << "No";

            break;

        }

    }



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.354151046624463x):
#include <stdio.h>

#include <string.h>

int main(){

	char s[400],t[400];

	scanf("%s",s);

	getchar();

	scanf("%s",t);

	getchar();

	int len = strlen(s);

	t[len] = '\0';

	if (strcmp (s,t) == 0){

		printf("Yes\n");

	}

	else{

		printf("No\n");

	}

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



using ll = long long;

using ull = unsigned long long;

using ld = long double;



#define MOD 1000000007



#define rep(i, n) for(ll (i) = 0LL;(i) < (ll)(n);(i)++)

#define rep2(i, s, e) for(ll (i) = (ll)(s);(i) < (ll)(e);(i)++)

#define repi(i, n) for(ll (i) = 0LL;(i) <= (ll)(n);(i)++)

#define repi2(i, s, e) for(ll (i) = (ll)(s);(i) <= (ll)(e);(i)++)

#define per(i, n) for(ll (i) = (ll)(n) - 1LL;(i) >= 0LL;(i)--)

#define per2(i, s, e) for(ll (i) = (ll)(s) - 1LL;(i) >= (ll)(e);(i)--)

#define peri(i, n) for(ll (i) = (ll)(n);(i) >= 0LL;(i)--)

#define peri2(i, s, e) for(ll (i) = (ll)(s);(i) >= (ll)(e);(i)--)

#define iter(i, it) for(auto &(i): (it))



template<typename T, typename U> ostream& operator<<(ostream &s, const pair<T, U> m) {

    cout << "(" << m.first << ", " << m.second << ")";

    return s;

}

template<typename T, typename U> ostream& operator<<(ostream &s, const map<T, U> m) {

    ll c = 0;

    cout << "{ ";

    iter(i, m) cout << i << (c++ == m.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}

template<typename T> ostream& operator<<(ostream &s, const vector<T> &v) {

    cout << "{ ";

    rep(i, v.size()) cout << v[i] << (i == v.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}

template<typename T> ostream& operator<<(ostream &s, const list<T> &v) {

    ll c = 0;

    cout << "{ ";

    iter(i, v) cout << i << (c++ == v.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}



int main(void) {

    string S;

    string T;

    cin >> S >> T;

    if(string(T.begin(), T.begin() + S.size()) == S) cout << "Yes" << endl;

    else cout << "No" << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.376094784258587x):
#include<stdio.h>

#include<string.h>



int main(void){

    char s[11], t[11];

    scanf("%s %s", s, t);

    puts(strncmp(s, t, strlen(s)) == 0 ? "Yes" : "No");

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



using ll = long long;

using ull = unsigned long long;

using ld = long double;



#define MOD 1000000007



#define rep(i, n) for(ll (i) = 0LL;(i) < (ll)(n);(i)++)

#define rep2(i, s, e) for(ll (i) = (ll)(s);(i) < (ll)(e);(i)++)

#define repi(i, n) for(ll (i) = 0LL;(i) <= (ll)(n);(i)++)

#define repi2(i, s, e) for(ll (i) = (ll)(s);(i) <= (ll)(e);(i)++)

#define per(i, n) for(ll (i) = (ll)(n) - 1LL;(i) >= 0LL;(i)--)

#define per2(i, s, e) for(ll (i) = (ll)(s) - 1LL;(i) >= (ll)(e);(i)--)

#define peri(i, n) for(ll (i) = (ll)(n);(i) >= 0LL;(i)--)

#define peri2(i, s, e) for(ll (i) = (ll)(s);(i) >= (ll)(e);(i)--)

#define iter(i, it) for(auto &(i): (it))



template<typename T, typename U> ostream& operator<<(ostream &s, const pair<T, U> m) {

    cout << "(" << m.first << ", " << m.second << ")";

    return s;

}

template<typename T, typename U> ostream& operator<<(ostream &s, const map<T, U> m) {

    ll c = 0;

    cout << "{ ";

    iter(i, m) cout << i << (c++ == m.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}

template<typename T> ostream& operator<<(ostream &s, const vector<T> &v) {

    cout << "{ ";

    rep(i, v.size()) cout << v[i] << (i == v.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}

template<typename T> ostream& operator<<(ostream &s, const list<T> &v) {

    ll c = 0;

    cout << "{ ";

    iter(i, v) cout << i << (c++ == v.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}



int main(void) {

    string S;

    string T;

    cin >> S >> T;

    T.pop_back();

    if(T == S) cout << "Yes" << endl;

    else cout << "No" << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.376031569607127x):
#include<stdio.h>

#include<string.h>



int main(void){

    char s[11], t[11];

    scanf("%s %s", s, t);

    puts(strncmp(s, t, strlen(s)) == 0 ? "Yes" : "No");

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



using ll = long long;

using ull = unsigned long long;

using ld = long double;



#define MOD 1000000007



#define rep(i, n) for(ll (i) = 0LL;(i) < (ll)(n);(i)++)

#define rep2(i, s, e) for(ll (i) = (ll)(s);(i) < (ll)(e);(i)++)

#define repi(i, n) for(ll (i) = 0LL;(i) <= (ll)(n);(i)++)

#define repi2(i, s, e) for(ll (i) = (ll)(s);(i) <= (ll)(e);(i)++)

#define per(i, n) for(ll (i) = (ll)(n) - 1LL;(i) >= 0LL;(i)--)

#define per2(i, s, e) for(ll (i) = (ll)(s) - 1LL;(i) >= (ll)(e);(i)--)

#define peri(i, n) for(ll (i) = (ll)(n);(i) >= 0LL;(i)--)

#define peri2(i, s, e) for(ll (i) = (ll)(s);(i) >= (ll)(e);(i)--)

#define iter(i, it) for(auto &(i): (it))



template<typename T, typename U> ostream& operator<<(ostream &s, const pair<T, U> m) {

    cout << "(" << m.first << ", " << m.second << ")";

    return s;

}

template<typename T, typename U> ostream& operator<<(ostream &s, const map<T, U> m) {

    ll c = 0;

    cout << "{ ";

    iter(i, m) cout << i << (c++ == m.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}

template<typename T> ostream& operator<<(ostream &s, const vector<T> &v) {

    cout << "{ ";

    rep(i, v.size()) cout << v[i] << (i == v.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}

template<typename T> ostream& operator<<(ostream &s, const list<T> &v) {

    ll c = 0;

    cout << "{ ";

    iter(i, v) cout << i << (c++ == v.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}



int main(void) {

    string S;

    string T;

    cin >> S >> T;

    if(string(T.begin(), T.begin() + S.size()) == S) cout << "Yes" << endl;

    else cout << "No" << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.375655982016893x):
#include<stdio.h>

#include<string.h>



int main(void){

    char s[11], t[11];

    scanf("%s %s", s, t);

    puts(strncmp(s, t, strlen(s)) ? "No" : "Yes");

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



using ll = long long;

using ull = unsigned long long;

using ld = long double;



#define MOD 1000000007



#define rep(i, n) for(ll (i) = 0LL;(i) < (ll)(n);(i)++)

#define rep2(i, s, e) for(ll (i) = (ll)(s);(i) < (ll)(e);(i)++)

#define repi(i, n) for(ll (i) = 0LL;(i) <= (ll)(n);(i)++)

#define repi2(i, s, e) for(ll (i) = (ll)(s);(i) <= (ll)(e);(i)++)

#define per(i, n) for(ll (i) = (ll)(n) - 1LL;(i) >= 0LL;(i)--)

#define per2(i, s, e) for(ll (i) = (ll)(s) - 1LL;(i) >= (ll)(e);(i)--)

#define peri(i, n) for(ll (i) = (ll)(n);(i) >= 0LL;(i)--)

#define peri2(i, s, e) for(ll (i) = (ll)(s);(i) >= (ll)(e);(i)--)

#define iter(i, it) for(auto &(i): (it))



template<typename T, typename U> ostream& operator<<(ostream &s, const pair<T, U> m) {

    cout << "(" << m.first << ", " << m.second << ")";

    return s;

}

template<typename T, typename U> ostream& operator<<(ostream &s, const map<T, U> m) {

    ll c = 0;

    cout << "{ ";

    iter(i, m) cout << i << (c++ == m.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}

template<typename T> ostream& operator<<(ostream &s, const vector<T> &v) {

    cout << "{ ";

    rep(i, v.size()) cout << v[i] << (i == v.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}

template<typename T> ostream& operator<<(ostream &s, const list<T> &v) {

    ll c = 0;

    cout << "{ ";

    iter(i, v) cout << i << (c++ == v.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}



int main(void) {

    string S;

    string T;

    cin >> S >> T;

    T.pop_back();

    if(T == S) cout << "Yes" << endl;

    else cout << "No" << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.375592772525075x):
#include<stdio.h>

#include<string.h>



int main(void){

    char s[11], t[11];

    scanf("%s %s", s, t);

    puts(strncmp(s, t, strlen(s)) ? "No" : "Yes");

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



using ll = long long;

using ull = unsigned long long;

using ld = long double;



#define MOD 1000000007



#define rep(i, n) for(ll (i) = 0LL;(i) < (ll)(n);(i)++)

#define rep2(i, s, e) for(ll (i) = (ll)(s);(i) < (ll)(e);(i)++)

#define repi(i, n) for(ll (i) = 0LL;(i) <= (ll)(n);(i)++)

#define repi2(i, s, e) for(ll (i) = (ll)(s);(i) <= (ll)(e);(i)++)

#define per(i, n) for(ll (i) = (ll)(n) - 1LL;(i) >= 0LL;(i)--)

#define per2(i, s, e) for(ll (i) = (ll)(s) - 1LL;(i) >= (ll)(e);(i)--)

#define peri(i, n) for(ll (i) = (ll)(n);(i) >= 0LL;(i)--)

#define peri2(i, s, e) for(ll (i) = (ll)(s);(i) >= (ll)(e);(i)--)

#define iter(i, it) for(auto &(i): (it))



template<typename T, typename U> ostream& operator<<(ostream &s, const pair<T, U> m) {

    cout << "(" << m.first << ", " << m.second << ")";

    return s;

}

template<typename T, typename U> ostream& operator<<(ostream &s, const map<T, U> m) {

    ll c = 0;

    cout << "{ ";

    iter(i, m) cout << i << (c++ == m.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}

template<typename T> ostream& operator<<(ostream &s, const vector<T> &v) {

    cout << "{ ";

    rep(i, v.size()) cout << v[i] << (i == v.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}

template<typename T> ostream& operator<<(ostream &s, const list<T> &v) {

    ll c = 0;

    cout << "{ ";

    iter(i, v) cout << i << (c++ == v.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}



int main(void) {

    string S;

    string T;

    cin >> S >> T;

    if(string(T.begin(), T.begin() + S.size()) == S) cout << "Yes" << endl;

    else cout << "No" << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.375155974093687x):
#include<stdio.h>

#include<string.h>



int main(void){

    char s[11], t[12];

    scanf("%s %s", s, t);

    puts(strncmp(s, t, strlen(s)) ? "No" : "Yes");

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



using ll = long long;

using ull = unsigned long long;

using ld = long double;



#define MOD 1000000007



#define rep(i, n) for(ll (i) = 0LL;(i) < (ll)(n);(i)++)

#define rep2(i, s, e) for(ll (i) = (ll)(s);(i) < (ll)(e);(i)++)

#define repi(i, n) for(ll (i) = 0LL;(i) <= (ll)(n);(i)++)

#define repi2(i, s, e) for(ll (i) = (ll)(s);(i) <= (ll)(e);(i)++)

#define per(i, n) for(ll (i) = (ll)(n) - 1LL;(i) >= 0LL;(i)--)

#define per2(i, s, e) for(ll (i) = (ll)(s) - 1LL;(i) >= (ll)(e);(i)--)

#define peri(i, n) for(ll (i) = (ll)(n);(i) >= 0LL;(i)--)

#define peri2(i, s, e) for(ll (i) = (ll)(s);(i) >= (ll)(e);(i)--)

#define iter(i, it) for(auto &(i): (it))



template<typename T, typename U> ostream& operator<<(ostream &s, const pair<T, U> m) {

    cout << "(" << m.first << ", " << m.second << ")";

    return s;

}

template<typename T, typename U> ostream& operator<<(ostream &s, const map<T, U> m) {

    ll c = 0;

    cout << "{ ";

    iter(i, m) cout << i << (c++ == m.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}

template<typename T> ostream& operator<<(ostream &s, const vector<T> &v) {

    cout << "{ ";

    rep(i, v.size()) cout << v[i] << (i == v.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}

template<typename T> ostream& operator<<(ostream &s, const list<T> &v) {

    ll c = 0;

    cout << "{ ";

    iter(i, v) cout << i << (c++ == v.size() - 1 ? " " : ", ");

    cout << "}";

    return s;

}



int main(void) {

    string S;

    string T;

    cin >> S >> T;

    T.pop_back();

    if(T == S) cout << "Yes" << endl;

    else cout << "No" << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.375092770481198x):
#include<stdio.h>

#include<string.h>



int main(void){

    char s[11], t[12];

    scanf("%s %s", s, t);

    puts(strncmp(s, t, strlen(s)) ? "No" : "Yes");

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>



using namespace std;

int g[1005][1005];

int main()

{

    int n,m;cin>>n>>m;

    int q;cin>>q;

    int i=0,j=0;

    int dir=0;

    for(int k=1;k<=q;k++)

    {

        int x;

        scanf("%d",&x);

        while(x--)

        {

            g[i][j]=k;

            if(!dir)

            {

                j++;

                if(j>=m)

                {

                    dir=!dir;

                    i++;

                    j=m-1;

                }

            }

            else

            {

                j--;

                if(j<0)

                {

                    dir=!dir;

                    i++;

                    j=0;

                }

            }

        }

    }



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

    {

        for(int j=0;j<m;j++)

        {

            if(j!=0)printf(" ");

            printf("%d",g[i][j]);

        }

        printf("\n");

    }



}


// Faster C++ solution for the same problem (measured speedup: 5.201929559456004x):
#include<cstdio>

using namespace std;

int temp,tot,n,m,q;

int a[11000];

int map[150][150];

bool f[150][150];

int dx[5]={0,0,1,0,-1};

int dy[5]={0,1,0,-1,0};

void dfs(int x,int y)

{

    map[x][y]=a[temp];

    f[x][y]=1;

    temp++;

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

    {

        int nx,ny;

        nx=x+dx[i];

        ny=y+dy[i];

        if(nx>=1&&nx<=n&&ny>=1&&ny<=m&&!f[nx][ny])

        dfs(nx,ny);

    }

}

int main()

{

    scanf("%d%d",&n,&m);

    scanf("%d",&q);

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

    {

        int x;

        scanf("%d",&x);

        for(int j=1;j<=x;j++)

        {

            tot++;

            a[tot]=i;

        }

    }

    temp=1;

    dfs(1,1);

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

    {

        for(int j=1;j<=m-1;j++)

            printf("%d ",map[i][j]);

        printf("%d\n",map[i][m]);

    }

    for(int i=1;i<=m-1;i++)

        printf("%d ",map[n][i]);

    printf("%d",map[n][m]);

}