#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  bool flag = true;
  if (S.size() != A + B + 1) {
    cout << "No" << endl;
    return 0;
  }
  for (int i = 0; i < (int)(A); i++) {
    if (S[i] < '0' || S[i] > '9') flag = false;
  }
  if (S[A] != '-') flag = false;
  for (int i = A + 1; i < B; i++) {
    if (S[i] < '0' || S[i] > '9') flag = false;
  }
  if (flag) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
