#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <iomanip>
#include <algorithm>
#include <sstream>
#include <string>
#include <math.h>
#include <set>
#include <deque>
#include <queue>
using namespace std;
typedef long long ll;
const int mod = 1000000007;

int main() {
    ios::sync_with_stdio(false);
    int a, b;
    string s;
    cin >> a >> b >> s;
    for (int i = 0 ; i < a ; i++) {
    	if (s[i] < '0' || s[i] > '9') {
    		cout << "No";
    		return 0;
		}
	}
	if (s[a] != '-') {
		cout << "No";
		return 0;
	}
	for (int i = a + 1 ; i < s.length() ; i++) {
		if (s[i] < '0' || s[i] > '9') {
    		cout << "No";
    		return 0;
		}
	}
	cout << "Yes";
}
#include <stdio.h>

int main () {
	int a, b;
	scanf("%d %d", &a, &b);
	int flag = 0;
	char str [a+b+1];
	scanf("%s", str);
	int atr = 0;
	
	for ( int i = 0 ; i < a+b+1 ; i++) {
		if (str[i] == '-' && i == a ) {
			flag = 1;
		}
		if (str[i] >= '0' && str[i] <= '9') {
			++atr;
		}
	}
	int total = a+b; 
	if (flag == 1 && atr == total) {
		printf("Yes\n");
	} else {
		printf("No\n");
	}
	return 0;
}