#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int a, b;
  string s;
  cin >> a >> b >> s;
  bool ans = true;
  for (int i = 0; i < (int)(a); i++) {
    if (s.at(i) == '-') {
      ans = false;
      break;
    }
  }
  if (s.at(a) != '-') {
    ans = false;
  }
  for (int i = a + 1; i < b; i++) {
    if (s.at(i) == '-') {
      ans = false;
      break;
    }
  }
  if (ans)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
