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