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