#include <bits/stdc++.h>
using namespace std;
int main() {
  int A;
  int B;
  string s;
  int count = 0;
  cin >> A;
  cin >> B;
  cin >> s;
  if (s[A] != '-') {
    cout << "No";
    return 0;
  }
  for (int i = 0; i < B; i++) {
    count++;
    if (i == A) continue;
    int ok = 0;
    for (int j = 0; j < 10; j++)
      if (s[i] == 48 + j) ok++;
    if (ok == 0) {
      cout << "No";
      return 0;
    }
  }
  if (s.size() == A + B + 1)
    cout << "Yes";
  else
    cout << "No";
}
