#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  string S;
  bool ans = true;
  cin >> A >> B >> S;
  for (int i = 0; i < A; i++) {
    if (S[i] == '-') {
      ans = false;
      break;
    }
  }
  if (S[A] == '-') ans = false;
  for (int i = 1; i <= B; i++) {
    if (S[i + A] == '-') {
      ans = false;
      break;
    }
  }
  if (ans)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
