#include <bits/stdc++.h>
using namespace std;
char a[5000];
bool isNum(char ch) {
  if (ch >= '0' && ch <= '9') return true;
  return false;
}
int main() {
  int A, B;
  bool flag;
  while (scanf("%d%d", &A, &B) == 2) {
    flag = true;
    scanf("%s", a);
    if (strlen(a) != A + B + 1) {
      flag = false;
    }
    if (flag) {
      for (int i = 0; i < A; i++) {
        if (isNum(a[i]) == false) {
          flag = false;
          break;
        }
      }
      if (a[A] != '-') {
        flag = false;
      }
      for (int i = A + 1; i < B; i++) {
        if (isNum(a[i]) == false) {
          flag = false;
          break;
        }
      }
    }
    printf("%s\n", flag ? "Yes" : "No");
  }
  return 0;
}
