#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int a, b, c = 0, count = 0;
  cin >> a >> b;
  cin >> s;
  for (int i = 0; i <= a + b; i++) {
    if (i == a && s[i] == '-') {
      count++;
      continue;
    }
    if (count == 1 && s[i] == '-') {
      count++;
      continue;
    }
  }
  if (count == 1)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
