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