#include <bits/stdc++.h>
int main() {
  int s = 1, x, i, n, a, b;
  scanf("%d%d", &a, &b);
  char str[100];
  n = a + b + 1;
  for (i = 0; i < n + 1; i++) scanf("%c", &str[i]);
  if (str[a + 1] == '-')
    x = 1;
  else
    x = 0;
  for (i = 1; i < n + 1; i++) {
    s = s * x;
    if (i == a + 1)
      continue;
    else if (str[i] >= '0' && str[i] <= '9')
      x = 1;
    else
      x = 0;
  }
  if (s == 0)
    printf("NO\n");
  else
    printf("YES\n");
}
