#include <bits/stdc++.h>
using namespace std;
int A, B;
char S[10 + 1];
int main(void) {
  scanf("%d %d\n%s", &A, &B, S);
  if (S[A] != '-') {
    printf("No");
    return 0;
  } else {
    for (int i = 0; i < A; ++i) {
      if (S[i] < '0' || '9' < S[i]) {
        printf("No");
        return 0;
      }
    }
    for (int i = A + 1; i <= B; ++i) {
      if (S[i] < '0' || '9' < S[i]) {
        printf("No");
        return 0;
      }
    }
    printf("Yes");
  }
  return 0;
};
