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