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