#include <bits/stdc++.h>
int main() {
  long int n, n2, flag = 0, i, j;
  char a[100];
  scanf("%ld%ld\n", &n, &n2);
  for (i = 0; i <= n + n2; i++) {
    scanf("%c", &a[i]);
  }
  for (i = 0, j = n + 1; i < n - 1 || j < n + n2; i++, j++) {
    if (a[i] < 48 || a[i] > 58 || a[j] < 48 || a[j] > 58) {
      flag = 1;
      break;
    }
  }
  if (a[n] != '-') {
    flag = 1;
  }
  if (flag == 1) {
    printf("No");
  } else {
    printf("Yes");
  }
  return 0;
}
