#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  string s1, s2;
  int h = 0;
  int p[5] = {1, 1, 1, 1, 1};
  int q[5] = {1, 1, 1, 1, 1};
  if (s[a] != '-') {
    h = 1;
  } else if (s.length() != a + b + 1) {
    h = 1;
  } else {
    for (int i = 0; i < a; i++) {
      s1[i] = s[i];
    }
    for (int i = 0; i < b; i++) {
      s2[i] = s[i + a + 1];
    }
    for (int i = 0; i < a; i++) {
      for (int j = 0; j < 10; j++) {
        if (s1[i] == j) {
          p[i] = 0;
        }
      }
    }
    for (int i = 0; i < b; i++) {
      for (int j = 0; j < 10; j++) {
        if (s2[i] == j) {
          q[i] = 0;
        }
      }
    }
    sort(p, p + a);
    sort(q, q + b);
    if (p[a - 1] == 1 || q[b - 1] == 1) {
      h = 1;
    }
  }
  if (h == 1) {
    cout << "No" << endl;
  } else {
    cout << "Yes" << endl;
  }
  return 0;
}
