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

#define int ll

//{ PXH612

using namespace std;

#define ll long long

#define db double

#define pp pair<int,int>

#define x first

#define y second



#define false(x) if(!(x))

template<typename A,typename B>bool Min(A &a,B b){if(a<=b) return 0;a=b;return 1;}

template<typename A,typename B>bool Max(A &a,B b){if(a>=b) return 0;a=b;return 1;}

#define in ({ll x=0;int o=0,c=char(),t=0;for(;!isdigit(c)&&t<1000;c=getchar(),t++) o=c=='-';for(;isdigit(c);c=getchar()) x=x*10+c-'0';o?-x:x;})

#define inchar ({char c=getchar();while(c==' '||c=='\n') c=getchar();c;})



#define FOR(i,a,b) for(int i=a,ENDFOR=b;i<=ENDFOR;i++)

#define ROF(i,a,b) for(int i=b,ENDFOR=a;ENDFOR<=i;i--)

#define RR(x,a,b) {cout<<#x<<": ";FOR(_,a,b) cout<<x[_]<<" ";cout<<"\n";}

#define rr(x) " "<<#x<<'='<<(x)<<" "



#define VEC(i,a) for(auto&i:a)

#define pb push_back

#define vn(a) (int)a.size()-1



#define bit(x,i) ((x>>(i-1))&1ll)

#define on(x,i) (x|(1ll<<(i-1)))

#define off(x,i) (x&~(1ll<<(i-1)))

#define mu(x) (1ll<<x)

#define bitnum(x) __builtin_popcountll(x)



#define segg(a,b) (abs(a-b)+1)

#define midd(a,b) (a+(b-(a))/2)

#define mems(x,a) memset(x,a,sizeof x)

#define open(a) freopen(a,"r",stdin)

#define shut(b) freopen(b,"w",stdout)

//}/////////////////////////////////////////////////////}



const int N=1e5+5;

int n;

int a[N],ans[N];

vector<int> e[N],v;



int low(int x){return lower_bound(v.begin(),v.end(),x)-v.begin();}

main()

{

  // open("frequency.inp");

    n=in;

    FOR(i,1,n) a[i]=in;

    FOR(i,1,n) v.pb(a[i]);



    v.pb(0);



    sort(v.begin(),v.end());

    v.erase(unique(v.begin(),v.end()),v.end());

    FOR(i,1,n) e[low(a[i])].pb(i);



    int cnt=0,mn=INT_MAX;

   // cout<<rr(v[0]) rr(v[1]) "\n";

    ROF(i,1,vn(v)) if(e[i].size())

    {

        VEC(j,e[i]) Min(mn,j);

        cnt+=e[i].size();

        ans[mn]+=cnt*(v[i]-v[i-1]);

    }

    FOR(i,1,n) cout<<ans[i]<<"\n";

}


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

 

 using namespace std;

 

 #define int long long

 

 const int N = 1e5 + 5;

 int n, ans[N], a[N];

 vector <pair<int, int>> p;

 

 main() {

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

	cin >> n;

	p.push_back(make_pair(0, n + 1));

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

		cin >> a[i];

		p.push_back(make_pair(a[i], i));

	}

	sort(p.begin(), p.end()); reverse(p.begin(), p.end());

	int cur = p[0].first, mi = p[0].second;

	int pos = 0, cnt = 1;

	while(cur) {

		while(pos + 1 < n && p[pos + 1].first == cur) {

			++pos; ++cnt;

			mi = min(mi, p[pos].second);

		}

		ans[mi] += (cur - p[pos + 1].first) * cnt;

		cur = p[pos + 1].first;

	} 

	for(int i = 1; i <= n; ++i) cout << ans[i] << '\n';

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

#define int ll

//{ PXH612

using namespace std;

#define ll long long

#define db double

#define pp pair<int,int>

#define x first

#define y second



#define false(x) if(!(x))

template<typename A,typename B>bool Min(A &a,B b){if(a<=b) return 0;a=b;return 1;}

template<typename A,typename B>bool Max(A &a,B b){if(a>=b) return 0;a=b;return 1;}

#define in ({ll x=0;int o=0,c=char(),t=0;for(;!isdigit(c)&&t<1000;c=getchar(),t++) o=c=='-';for(;isdigit(c);c=getchar()) x=x*10+c-'0';o?-x:x;})

#define inchar ({char c=getchar();while(c==' '||c=='\n') c=getchar();c;})



#define FOR(i,a,b) for(int i=a,ENDFOR=b;i<=ENDFOR;i++)

#define ROF(i,a,b) for(int i=b,ENDFOR=a;ENDFOR<=i;i--)

#define RR(x,a,b) {cout<<#x<<": ";FOR(_,a,b) cout<<x[_]<<" ";cout<<"\n";}

#define rr(x) " "<<#x<<'='<<(x)<<" "



#define VEC(i,a) for(auto&i:a)

#define pb push_back

#define vn(a) (int)a.size()-1



#define bit(x,i) ((x>>(i-1))&1ll)

#define on(x,i) (x|(1ll<<(i-1)))

#define off(x,i) (x&~(1ll<<(i-1)))

#define mu(x) (1ll<<x)

#define bitnum(x) __builtin_popcountll(x)



#define segg(a,b) (abs(a-b)+1)

#define midd(a,b) (a+(b-(a))/2)

#define mems(x,a) memset(x,a,sizeof x)

#define open(a) freopen(a,"r",stdin)

#define shut(b) freopen(b,"w",stdout)

//}/////////////////////////////////////////////////////}



const int N=1e5+5;

int n;

int a[N],ans[N];

vector<int> e[N],v;



int low(int x){return lower_bound(v.begin(),v.end(),x)-v.begin();}

main()

{

  // open("frequency.inp");

    n=in;

    FOR(i,1,n) a[i]=in;

    FOR(i,1,n) v.pb(a[i]);



    v.pb(0);



    sort(v.begin(),v.end());

    v.erase(unique(v.begin(),v.end()),v.end());

    FOR(i,1,n) e[low(a[i])].pb(i);



    int cnt=0,mn=INT_MAX;

   // cout<<rr(v[0]) rr(v[1]) "\n";

    ROF(i,1,vn(v)) if(e[i].size())

    {

        VEC(j,e[i]) Min(mn,j);

        cnt+=e[i].size();

        ans[mn]+=cnt*(v[i]-v[i-1]);

    }

    FOR(i,1,n) cout<<ans[i]<<"\n";

}


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



using namespace std;

#define ll long long

typedef pair<ll , ll> ii;

ll n , kq[100005];

map<ll, ll> m, idx;

vector<ii> t;

int main()

{

    cin >> n;

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

        ll foo; cin >> foo;

        m[foo]++;

        if(!idx.count(foo)) idx[foo] = i;

    }

    for(auto x = m.begin() ; x != m.end(); x++)

        t.push_back({x->first , x->second});

    sort(t.begin(), t.end());

    for(int i = t.size() - 1;i > 0;i--){

        kq[idx[t[i].first]] += (t[i].first - t[i - 1].first) * t[i].second;

        t[i - 1].second += t[i].second;

        idx[t[i - 1].first] = min(idx[t[i - 1].first] , idx[t[i].first]);

    }

    kq[idx[t[0].first]] += t[0].second * t[0].first;

    for(int i = 1;i <= n;i++) cout << kq[i] << "\n";

    return 0;

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

#include <climits>

#include <stack>

#include <queue>

#include <string>

#include <set>

#include <map>

#include <math.h>

#include <algorithm>

#include <vector>

using namespace std;

typedef long long ll;

typedef pair<ll,ll> P;

long long int INF = 1e18;

double Pi = 3.141592653589;

const int mod = 1000000007;

vector<int> G[100005];

std::vector<P> tree[100010];

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

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

#define p(x) cout<<x<<endl;

#define e cout<<endl;

#define pe(x) cout<<x<<" ";

#define re(i,a,b) for(i=a;i<=b;i++)

ll i,j,k,l,ii,jj;

ll n,m;

string s,a[55555];

ll h,w,x,y,ans=0,sum;

ll ite;

int main(){

	cin>>s;

	cin>>ii;

	n=s.length();

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

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

			a[l]=s.substr(k,i);

			l++;

		}

	}

	sort(a,a+l);

	unique(a,a+l);

	p(a[ii-1]);

	system ("pause");

	return 0;

}

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

#include <iostream>

#include <string>

#include <vector>

using namespace std;

int main()

{

    string s;

    int k;

    cin>>s>>k;

	vector<string> v;

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

    {

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

        {

			v.push_back(s.substr(i,j));

		}

	}

	sort(v.begin(),v.end());

	v.erase(unique(v.begin(),v.end()),v.end());

	k--;

	cout<<v[k]<<endl;

	//system ("pause");

	return 0;

}
// Slower C++ solution:
/*

 * ARC097_C.cpp

 *

 *  Created on: May 12, 2018

 *      Author: 13743

 */



#include<iostream>

#include<vector>

#include<algorithm>

#include<queue>

#include<stack>

#include<cmath>



using namespace std;



int seq[30000] = {0};

int seq2[30000];



int powI(int x, int n) {

	int ans = 1;

	while(n--) {

		ans *= x;

	}

	return ans;

}



void quickSort(int l, int r, int* a, int* b) {

	if(l >= r) return;

	int piv = a[r];

	int i = l - 1;

	for(int j=l; j<r; j++) {

		if(a[j] <= piv) {

			i++;

			swap(a[i], a[j]);

			swap(b[i], b[j]);

		}

	}

	swap(a[i+1], a[r]);

	swap(b[i+1], b[r]);

	quickSort(l, i, a, b);

	quickSort(i+2, r, a, b);

}



int main() {

	int k;

	char s[5010];

	cin >> s;

	cin >> k;



	int n=0;

	for(int i=0; s[i]!='\0'; i++) {

		n++;

	}

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

		s[n+i] = 'a'-1;

	}



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

		for(int j=0; j<5; j++) {

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

				seq[5*i+j] += (s[i+k]-'a'+1)*powI(50, 4-k);

			}

		}

	}



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

		seq2[i] = i;

	}



	quickSort(0, 5*n-1, seq, seq2);



	int ii=0;

	int num = -1;

	while(k > 0) {

//		cout << seq[ii] << endl;

		if(num != seq[ii]) {

			k--;

			num = seq[ii];

		}

		ii++;

	}

	ii--;

	int he = seq2[ii] / 5;

	int rem = seq2[ii] - he*5;

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

		if(he+i < n)

			cout << s[he + i];

	}

	cout << endl;

}






// Faster C++ solution for the same problem (measured speedup: 1.100533130656171x):
/*

 * ARC097_C.cpp

 *

 *  Created on: May 14, 2018

 *      Author: 13743

 */



#include<cstring>

#include<iostream>

#include<algorithm>

#include<vector>

#include<stack>

#include<queue>

#include<string>

using namespace std;

typedef long long llong;



#define PB push_back

#define SZ(a) int((a).size())

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

#define FOR(i, a, b) for(int i=(a); i<(b); ++i)

#define REP(i, n) FOR(i,0,n)

#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())



int code[25000];

bool used[25000];



int powI(int x, int n) {

	int ans = 1;

	while(n--) {

		ans *= x;

	}

	return ans;

}



int main() {

	cin.tie(0);

	ios::sync_with_stdio(false);



	char str[5010];

	int K;

	cin >> str;

	cin >> K;



	int sLen = strlen(str);

	REP(i, sLen) {

		REP(j, 5) {

			REP(k, j+1) {

				if(i+k < sLen) {

					code[5*i+j] += (str[i+k]-'a'+1)*powI(50, 4-k);

				}

			}

		}

	}

	int minI = -1;

	while(K--) {

		int minS = 1<<30;

		REP(i, 5*sLen) {

			if(!used[i] && code[i]<minS) {

				minS = code[i];

				minI = i;

			}

		}

		REP(i, 5*sLen) {

			if(code[i] == minS) {

				used[i] = true;

			}

		}

	}

	int s = minI / 5;

	int t = minI % 5;

	REP(i, t+1) {

		cout << str[s+i];

	}

	cout << endl;

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

using namespace std;



int main()

{

    int a,b;

    char str[105];

    scanf("%d %d %s",&a,&b,str);

    if(strlen(str)<(a+b+1))

    {

        puts("No");

        exit(0);

    }

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

    {

        if(str[i]>='0' && str[i]<='9')  continue;

        else

        {

            puts("No");

            exit(0);

        }

    }

    if(str[a]!='-')

    {

        puts("No");

        exit(0);

    }

    for(int i=(a+1); i<(a+b+1); i++)

    {

        if(str[i]>='0' && str[i]<='9')  continue;

        else

        {

            puts("No");

            exit(0);

        }

    }

    puts("Yes");

    return  0;

}


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

#include <string.h>

int main(){

	int a, b;

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

	getchar();



	char str[a+b+1];

	scanf("%s", &str);

	int length = strlen(str);

	int flag = 0;



	

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

	{

		if(str[i] >= '0' && str[i] <= '9')

		{

			continue;		//kl ada yg bukan angka, di skip

		}

		else if ('0' > str[i] || str[i] > '9')

		{

			if (i==a) //kalo dia bukan angka tp ternyata di indeks ke a, di okin

			{

				flag = 1;

				continue;

			}

			else if(i !=a)

			{

				flag = 0;

				break;

			}

		}

	}

	

	flag ? printf("Yes\n") : printf("No\n");

	

	return 0;

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

using namespace std;

int a,b,n;

int main()

{

    string s;

    cin>>a>>b;

    n=a+b;

    bool flag=false;

    cin>>s;

    if(s[a]!='-') flag=true;

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

    {

        if(i==a) continue;

        if(!(s[i]>='0' && s[i]<='9')) flag=true;

    }

    if(!flag) cout<<"Yes"<<endl;

    else cout<<"No"<<endl;

    return 0;

}


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

#include <string.h>

int main(){

	int a, b;

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

	getchar();



	char str[a+b+1];

	scanf("%s", &str);

	int length = strlen(str);

	int flag = 0;



	

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

	{

		if(str[i] >= '0' && str[i] <= '9')

		{

			continue;		//kl ada yg bukan angka, di skip

		}

		else if ('0' > str[i] || str[i] > '9')

		{

			if (i==a) //kalo dia bukan angka tp ternyata di indeks ke a, di okin

			{

				flag = 1;

				continue;

			}

			else if(i !=a)

			{

				flag = 0;

				break;

			}

		}

	}

	

	flag ? printf("Yes\n") : printf("No\n");

	

	return 0;

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

using namespace std;



int main()

{

    int a,b;

    char str[105];

    scanf("%d %d %s",&a,&b,str);

    if(strlen(str)<(a+b+1))

    {

        puts("No");

        exit(0);

    }

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

    {

        if(str[i]>='0' && str[i]<='9')  continue;

        else

        {

            puts("No");

            exit(0);

        }

    }

    if(str[a]!='-')

    {

        puts("No");

        exit(0);

    }

    for(int i=(a+1); i<(a+b+1); i++)

    {

        if(str[i]>='0' && str[i]<='9')  continue;

        else

        {

            puts("No");

            exit(0);

        }

    }

    puts("Yes");

    return  0;

}


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



int main()

{

    int A, B;

    scanf("%d %d", &A, &B);

    int total = A + B + 1;

    

    char str[100];

    scanf("%s", str);

    

    int i, count = 0;

    

    if (str[A] == '-')

    {

        for (i = 0; i < total; i++)

        {

            if (str[i] >= '0' && str[i] <= '9')

            {

                count++;

            }

        }

        

        if (count == total - 1)

        {

            printf("Yes\n");

        }

        

        else

        {

            printf("No\n");

        }

    }

    

    else

    {

        printf("No\n");

    }

    

    return 0;

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

using namespace std;

int a,b,n;

int main()

{

    string s;

    cin>>a>>b;

    n=a+b;

    bool flag=false;

    cin>>s;

    if(s[a]!='-') flag=true;

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

    {

        if(i==a) continue;

        if(!(s[i]>='0' && s[i]<='9')) flag=true;

    }

    if(!flag) cout<<"Yes"<<endl;

    else cout<<"No"<<endl;

    return 0;

}


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



int main()

{

    int A, B;

    scanf("%d %d", &A, &B);

    int total = A + B + 1;

    

    char str[100];

    scanf("%s", str);

    

    int i, count = 0;

    

    if (str[A] == '-')

    {

        for (i = 0; i < total; i++)

        {

            if (str[i] >= '0' && str[i] <= '9')

            {

                count++;

            }

        }

        

        if (count == total - 1)

        {

            printf("Yes\n");

        }

        

        else

        {

            printf("No\n");

        }

    }

    

    else

    {

        printf("No\n");

    }

    

    return 0;

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

using namespace std;



int main()

{

    int a,b;

    char str[105];

    scanf("%d %d %s",&a,&b,str);

    if(strlen(str)<(a+b+1))

    {

        puts("No");

        exit(0);

    }

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

    {

        if(str[i]>='0' && str[i]<='9')  continue;

        else

        {

            puts("No");

            exit(0);

        }

    }

    if(str[a]!='-')

    {

        puts("No");

        exit(0);

    }

    for(int i=(a+1); i<(a+b+1); i++)

    {

        if(str[i]>='0' && str[i]<='9')  continue;

        else

        {

            puts("No");

            exit(0);

        }

    }

    puts("Yes");

    return  0;

}


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

int main()

{

int A, B;

scanf("%d %d", &A, &B);

int size = A + B + 1;

char str[100];

scanf("%s", str);

int i, count = 0;

if (str[A] == '-')

{

    for (i = 0; i < size; i++)

    {

        if (str[i] >= '0' && str[i] <= '9')

        {

            count++;

        }

    }

        

    if (count + 1 == size)

    {

        printf("Yes\n");

    }

        

    else

    {

        printf("No\n");

    }

}

else

{

    printf("No\n");

}

return 0;

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

using namespace std;

int a,b,n;

int main()

{

    string s;

    cin>>a>>b;

    n=a+b;

    bool flag=false;

    cin>>s;

    if(s[a]!='-') flag=true;

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

    {

        if(i==a) continue;

        if(!(s[i]>='0' && s[i]<='9')) flag=true;

    }

    if(!flag) cout<<"Yes"<<endl;

    else cout<<"No"<<endl;

    return 0;

}


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

int main()

{

int A, B;

scanf("%d %d", &A, &B);

int size = A + B + 1;

char str[100];

scanf("%s", str);

int i, count = 0;

if (str[A] == '-')

{

    for (i = 0; i < size; i++)

    {

        if (str[i] >= '0' && str[i] <= '9')

        {

            count++;

        }

    }

        

    if (count + 1 == size)

    {

        printf("Yes\n");

    }

        

    else

    {

        printf("No\n");

    }

}

else

{

    printf("No\n");

}

return 0;

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

using namespace std;



int main()

{

    int a,b;

    char str[105];

    scanf("%d %d %s",&a,&b,str);

    if(strlen(str)<(a+b+1))

    {

        puts("No");

        exit(0);

    }

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

    {

        if(str[i]>='0' && str[i]<='9')  continue;

        else

        {

            puts("No");

            exit(0);

        }

    }

    if(str[a]!='-')

    {

        puts("No");

        exit(0);

    }

    for(int i=(a+1); i<(a+b+1); i++)

    {

        if(str[i]>='0' && str[i]<='9')  continue;

        else

        {

            puts("No");

            exit(0);

        }

    }

    puts("Yes");

    return  0;

}


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

int main(){

	int A, B;

	int mark =0;

	scanf("%d %d", &A, &B);

	char in[A+B+1];

	scanf("%s", in);

	int ctr = 0;

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

		if(in[i] == '-' && i == A){

			mark = 1;

		}else if(in[i] >= '0' && in[i] <= '9' ){

			++ctr;

		}

	}

	if( mark == 1 && ctr == A+B){

		printf("Yes\n");

	}else{

		printf("No\n");

	}

	

	return 0;

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

using namespace std;

int a,b,n;

int main()

{

    string s;

    cin>>a>>b;

    n=a+b;

    bool flag=false;

    cin>>s;

    if(s[a]!='-') flag=true;

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

    {

        if(i==a) continue;

        if(!(s[i]>='0' && s[i]<='9')) flag=true;

    }

    if(!flag) cout<<"Yes"<<endl;

    else cout<<"No"<<endl;

    return 0;

}


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

int main(){

	int A, B;

	int mark =0;

	scanf("%d %d", &A, &B);

	char in[A+B+1];

	scanf("%s", in);

	int ctr = 0;

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

		if(in[i] == '-' && i == A){

			mark = 1;

		}else if(in[i] >= '0' && in[i] <= '9' ){

			++ctr;

		}

	}

	if( mark == 1 && ctr == A+B){

		printf("Yes\n");

	}else{

		printf("No\n");

	}

	

	return 0;

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

using namespace std;



int main()

{

    int a,b;

    char str[105];

    scanf("%d %d %s",&a,&b,str);

    if(strlen(str)<(a+b+1))

    {

        puts("No");

        exit(0);

    }

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

    {

        if(str[i]>='0' && str[i]<='9')  continue;

        else

        {

            puts("No");

            exit(0);

        }

    }

    if(str[a]!='-')

    {

        puts("No");

        exit(0);

    }

    for(int i=(a+1); i<(a+b+1); i++)

    {

        if(str[i]>='0' && str[i]<='9')  continue;

        else

        {

            puts("No");

            exit(0);

        }

    }

    puts("Yes");

    return  0;

}


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

#include <string.h>



int main() {

    int A,B;

    char S[20];

    int C, counts = 0;

    scanf("%d %d", &A, &B);

    scanf("%s", S);

    C = strlen(S);

    

    if(!(S[A] == '-')){

        printf("No");

        return 0;

    }

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

        if(S[i] == '-'){

            counts++;

        }

    }

    if(counts > 1){

        printf("No");

        return 0;

    }

    

    printf("Yes");

            

return 0;

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

using namespace std;

int a,b,n;

int main()

{

    string s;

    cin>>a>>b;

    n=a+b;

    bool flag=false;

    cin>>s;

    if(s[a]!='-') flag=true;

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

    {

        if(i==a) continue;

        if(!(s[i]>='0' && s[i]<='9')) flag=true;

    }

    if(!flag) cout<<"Yes"<<endl;

    else cout<<"No"<<endl;

    return 0;

}


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

#include <string.h>



int main() {

    int A,B;

    char S[20];

    int C, counts = 0;

    scanf("%d %d", &A, &B);

    scanf("%s", S);

    C = strlen(S);

    

    if(!(S[A] == '-')){

        printf("No");

        return 0;

    }

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

        if(S[i] == '-'){

            counts++;

        }

    }

    if(counts > 1){

        printf("No");

        return 0;

    }

    

    printf("Yes");

            

return 0;

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

using namespace std;



int main()

{

    int a,b;

    char str[105];

    scanf("%d %d %s",&a,&b,str);

    if(strlen(str)<(a+b+1))

    {

        puts("No");

        exit(0);

    }

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

    {

        if(str[i]>='0' && str[i]<='9')  continue;

        else

        {

            puts("No");

            exit(0);

        }

    }

    if(str[a]!='-')

    {

        puts("No");

        exit(0);

    }

    for(int i=(a+1); i<(a+b+1); i++)

    {

        if(str[i]>='0' && str[i]<='9')  continue;

        else

        {

            puts("No");

            exit(0);

        }

    }

    puts("Yes");

    return  0;

}


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



int main(){

	int a,b;

	char str[20];

	bool valids = true;

	

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

	scanf("%s",str);

	

	if(str[a]!='-'){

	 valids = false;	

	}

	

	for (int i=0;str[i] !='\0';i++){

		if(i != a){

			if(str[i]<'0'){

				valids = false;

				break;

			}

		}

	}

	(valids) ? puts("Yes") : puts ("No");

	

	

	return 0;

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

using namespace std;

int a,b,n;

int main()

{

    string s;

    cin>>a>>b;

    n=a+b;

    bool flag=false;

    cin>>s;

    if(s[a]!='-') flag=true;

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

    {

        if(i==a) continue;

        if(!(s[i]>='0' && s[i]<='9')) flag=true;

    }

    if(!flag) cout<<"Yes"<<endl;

    else cout<<"No"<<endl;

    return 0;

}


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



int main(){

	int a,b;

	char str[20];

	bool valids = true;

	

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

	scanf("%s",str);

	

	if(str[a]!='-'){

	 valids = false;	

	}

	

	for (int i=0;str[i] !='\0';i++){

		if(i != a){

			if(str[i]<'0'){

				valids = false;

				break;

			}

		}

	}

	(valids) ? puts("Yes") : puts ("No");

	

	

	return 0;

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

using namespace std;



string pial[] = {"No", "Yes"};



int main() {

    int a, b;

    cin >> a >> b;

	string s;

	cin >> s;

	int ans = 1, pos = -1;

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

	    if(s[i] < '0' || s[i] > '9') {

	        ans = 0;

	        break;

	    }

	}

	if(s[a] != '-')

	    ans = 0;

	for(int i = a + 1; i < s.size(); i++) {

	    if(s[i] < '0' || s[i] > '9') {

	        ans = 0;

	        break;

	    }

	}

	cout << pial[ans] << endl;

	

	return 0;

}

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



int main() {

	int a,b;

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

	char s[255];

	scanf("%s", s);

	int angka = 0;

	for(int i = 0; s[i] != '\0'; i++){

		if(s[a] != '-'){

			puts("No");

			return 0;

		}

		if(s[i] >= '0' && s[i] <= '9'){

			angka++;

		}

	}

	if(angka == a+b){

		puts("Yes");

	}else{

		puts("No");

	}

	return 0;

}