#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int A, B;
  cin >> A >> B;
  string S;
  cin >> S;
  for (int i = 0; i < A; ++i) {
    if (!(S.at(i) >= '0' && S.at(i) <= '9')) {
      cout << "No" << endl;
      return 0;
    }
  }
  if (S.at(A) != '-') {
    cout << "No" << endl;
    return 0;
  }
  for (int i = A + 1; i < A, B; i++) {
    if (!(S.at(i) >= 0 && S.at(i) <= 9)) {
      cout << "No" << endl;
      return 0;
    }
  }
}
