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