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