// --https://kenkoooo.com/atcoder/#/table/soma62jp
#include <iostream>
#include <string>
#include <cmath>
#include <sstream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cstring>

using namespace std;

int main(int argc, char* argv[]) {

	int A, B, ans = 1;
	string S;

	cin >> A >> B;
	cin >> S;

	if (S[A] != '-') {
		ans = 0;
	}

	for (int i = 0; i < S.length(); i++) {
		if (i == A)
			continue;
		if (!(S[i] >= '0' && S[i] <= '9')) {
			ans = 0;
		}
	}

	if (ans) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}

	return 0;
