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