#include <bits/stdc++.h>
static const long long mod = 1000000007;
static const long long INF = 1000000000000000000LL;
using namespace std;
int main() {
  int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  string res = "Yes";
  for (long long i = 0; i < (S.size()); i++) {
    if (i == A - 1) {
      if (S[i] != '-') res = "No";
    } else {
      if (S[i] == '-') res = "No";
    }
  }
  cout << res << endl;
  return 0;
}
