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