#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  string S;
  cin >> A >> B >> S;
  string ans = "Yes";
  if (S[A] != '-') ans = "No";
  string first = S.substr(0, A);
  string second = S.substr(A + 1, B);
  for (auto s : first) {
    if (!isdigit(s)) ans = "NO";
  }
  for (auto s : second) {
    if (!isdigit(s)) ans = "NO";
  }
  cout << ans << endl;
}
