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