#include <bits/stdc++.h>
using namespace std;
void solve(void) {
  int a, b;
  string s;
  cin >> a >> b >> s;
  string ans = "Yes";
  if (s[a] != '-') ans = "No";
  for (long long i = 0; i < (long long)a; ++i) {
    if ('0' <= s[i] && s[i] <= '9')
      continue;
    else
      ans = "No";
  }
  for (int i = b; i < a + b + 1; ++i) {
    if ('0' <= s[i] && s[i] <= '9')
      continue;
    else
      ans = "No";
  }
  cout << ans << endl;
}
int main(void) { solve(); }
