#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  int tmp, tim;
  int len;
  string s;
  string ans = "YES";
  cin >> a >> b;
  cin >> s;
  tim = 0;
  for (int i = 0; i < a; i++) {
    if (s[i] == '-') {
      ans = "NO";
    }
  }
  if (s[a] != '-') {
    ans = "NO";
  }
  for (int i = a + 1; i < a + b; i++) {
    if (s[i] == '-') {
      ans = "NO";
    }
  }
  cout << ans << endl;
  return 0;
}
