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