#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
using namespace std;

void b_postal_code(void) {
	int a, b;
	string s;
	string msg = "Yes";
	cin >> a >> b >> s;
	if (s.size() != a + b + 1) msg = "No";
	else if (s[a] != '-') msg = "No";
	else {
		for (int i = 0; i < a + b + 1; i++) {
			if (i == a) continue;

			if (s[i] == '-') {
				msg = "No";
				break;
			}
		}
	}
	cout << msg << endl;
}

int main()
{
	b_postal_code();
    return 0;
}
#include<stdio.h>
 
int main()
{
	int A, B;
	scanf("%d %d", &A, &B);
	int sum = A + B + 1;
	char str[sum];
	scanf("%s", &str);
	int ctr = 0;
	for(int i = 0; i < sum; i++){
		if(i == A){
			if(str[i] != '-'){
				printf("No\n");
				return 0;
			}
		}else{
			if(str[i] >= '0' && str[i] <= '9'){
				++ctr;
			}
		}
	}
	if(ctr == A+B){
		printf("Yes\n");
	}else{
		printf("No\n");
	}
}