#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, x;
  cin >> a >> b;
  string s;
  cin >> s;
  if (s.size() != (a + b + 1)) {
    cout << "No";
    return 0;
  }
  for (long long i = long long(0); i <= long long(a - 1); i++) {
    if (isdigit(s[i]) == false) {
      cout << "No";
      return 0;
    }
    x = i;
  }
  x++;
  if (s[x] != '-') {
    cout << "No";
    return 0;
  }
  for (long long j = long long(x + 1); j <= long long(j < a + b + 1); j++) {
    if (isdigit(s[j]) == false) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
}
