#include <bits/stdc++.h>
using namespace std;
int a, b, i;
char str[100000];
int main() {
  while (scanf("%d%d", &a, &b) != EOF) {
    cin >> str;
    while (str[i] != '-') {
      i++;
    }
    if ((strlen(str) == a + b + 1) && i == a) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
    i = 0;
    memset(str, 0, strlen(str));
  }
  return 0;
}
