#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll in() {
  ll a;
  scanf("%lld", &a);
  return a;
}
int main() {
  char s[10];
  int a = in(), b = in();
  bool hoise = 1;
  scanf("%s", s);
  for (int i = 0; i < strlen(s); i++) {
    if (i == a) {
      if (s[i] != '-') hoise = 0;
    } else if (s[i] > '9' || s[i] < '0') {
      hoise = 0;
    }
  }
  if (hoise)
    printf("YES\n");
  else
    printf("NO\n");
}
