#include <bits/stdc++.h>
using namespace std;
int a, b;
string s;
int main() {
  int i, j;
  scanf("%d %d", &a, &b);
  cin >> s;
  if (s[a] != '-') {
    cout << "No";
    return 0;
  }
  for (i = 0; i <= a + b; i++) {
    if (i != a) {
      if (s[i] - '0' < 0 && s[i] - '0' > 9) {
        cout << "No";
        return 0;
      }
    }
  }
  cout << "Yes";
  return 0;
}
