Language: C++

#define fi first
#define se second
#define ll long long
#define scan(n) ll a[n]; for(ll i = 0 ; i<n ; i++) cin>>a[i]
#define print(a,n) for(int i = 0 ; i < n ; i++) cout<<a[i]<<' '
#define fast ios_base::sync_with_stdio(false); cin.tie(0);cout.tie(0);
#define rep(i,x,y) for(ll i=x;i<y;i++)
//#define int long long
using namespace std;
//typedef vector<int>vi ;
typedef vector<ll>vi ;
typedef vector<vector<ll> >vvl ; 
typedef pair<ll,ll> pll ;
typedef vector<pair<ll,ll> > vpll;
/*vi adj[200005];
ll vis[200005];
ll parent[200005];
ll level[200005];
ll arr[200005];
ll size[200005];*/
//endl mut bhool!!
int main()
{
	fast;
	ll test=1;
	//cin>>test;
	while(test--)
	{
		string s,t;
		cin>>s>>t;
		string s1=t.substr(0,s.size());
		if(s1==s)
		{
			cout<<"Yes";
		}
		else
			cout<<"No";
	}
	return 0;
}
/*
cout<<"YES"<<endl;
cout<<"NO"<<endl;
*/

Compiler output:
a.cc:11:9: error: 'vector' does not name a type
   11 | typedef vector<ll>vi ;
      |         ^~~~~~
a.cc:12:9: error: 'vector' does not name a type
   12 | typedef vector<vector<ll> >vvl ;
      |         ^~~~~~
a.cc:13:9: error: 'pair' does not name a type
   13 | typedef pair<ll,ll> pll ;
      |         ^~~~
a.cc:14:9: error: 'vector' does not name a type
   14 | typedef vector<pair<ll,ll> > vpll;
      |         ^~~~~~
a.cc: In function 'int main()':
a.cc:6:14: error: 'ios_base' has not been declared
    6 | #define fast ios_base::sync_with_stdio(false); cin.tie(0);cout.tie(0);
      |              ^~~~~~~~
a.cc:24:9: note: in expansion of macro 'fast'
   24 |         fast;
      |         ^~~~
a.cc:6:48: error: 'cin' was not declared in this scope
    6 | #define fast ios_base::sync_with_stdio(false); cin.tie(0);cout.tie(0);
      |                                                ^~~
a.cc:24:9: note: in expansion of macro 'fast'
   24 |         fast;
      |         ^~~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #define fi first
a.cc:6:59: error: 'cout' was not declared in this scope
    6 | #define fast ios_base::sync_with_stdio(false); cin.tie(0);cout.tie(0);
      |                                                           ^~~~
a.cc:24:9: note: in expansion of macro 'fast'
   24 |         fast;
      |         ^~~~
a.cc:6:59: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    6 | #define fast ios_base::sync_with_stdio(false); cin.tie(0);cout.tie(0);
      |                                                           ^~~~
a.cc:24:9: note: in expansion of macro 'fast'
   24 |         fast;
      |         ^~~~
a.cc:29:17: error: 'string' was not declared in this scope
   29 |                 string s,t;
      |                 ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #define fi first
a.cc:30:22: error: 's' was not declared in this scope; did you mean 'se'?
   30 |                 cin>>s>>t;
      |                      ^
      |                      se
a.cc:30:25: error: 't' was not declared in this scope
   30 |                 cin>>s>>t;
      |                         ^
a.cc:31:23: error: expected ';' before 's1'
   31 |                 string s1=t.substr(0,s.size());
      |                       ^~~
      |                       ;
a.cc:32:20: error: 's1' was not declared in this scope; did you mean 'se'?
   32 |                 if(s1==s)
      |                    ^~
      |                    se