#include <bits/stdc++.h>
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x *= 10;
    x += (ch - '0');
    ch = getchar();
  }
  return x * f;
}
int main() {
  int a = read(), b = read();
  char c[a + b + 1];
  bool flag = 1;
  scanf("%s", &c);
  for (int i = 0; i < a; ++i) {
    if (!isdigit(c[i])) {
      flag = 0;
      break;
    }
  }
  if (!flag) {
    printf("No\n");
    return 0;
  }
  if (c[a + 1] != '-') {
    printf("No\n");
    return 0;
  }
  for (int i = a + 1; i <= a + b; ++i) {
    if (!isdigit(c[i])) {
      flag = 0;
      break;
    }
  }
  printf("%s\n", (flag) ? "Yes" : "No");
  return 0;
}
