#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B, i;
  cin >> A >> B;
  string S;
  cin >> S;
  int C;
  int No = 0;
  if (S[A] != '-') {
    No = 1;
  }
  while (S[i]) {
    i++;
  }
  if (i != A + B + 1) {
    No = 10;
  }
  for (i = 0; i < A; i++) {
    C = int(S[i] - '0');
    if (C >= 9 || C <= 0) {
      No = 2;
    }
  }
  for (i = 0; i < B; i++) {
    C = int(S[i + A + 1] - '0');
    if (C >= 9 || C <= 0) {
      No = 5;
    }
  }
  if (No == 0) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  cout << No;
  return 0;
}
