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