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