#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int M = 1e5 + 5;
unsigned long long pw[67];
void pre() {
  pw[0] = 1;
  for (int i = 1; i < 64; i++) pw[i] = 2 * pw[i - 1];
}
int main() {
  ios_base::sync_with_stdio(false);
  pre();
  int a, b, i;
  char s[50];
  cin >> a >> b;
  cin >> s;
  bool ans = true;
  if (strlen(s) != (a + b + 1)) {
    cout << "NO\n";
    return 0;
  }
  for (i = 0; i < a; i++) {
    if (!(s[i] >= '0' && s[i] <= '9')) ans = false;
  }
  if (s[a] != '-') ans = false;
  for (i = a + 1; i < strlen(s); i++) {
    if (!(s[i] >= '0' && s[i] <= '9')) ans = false;
  }
  if (ans)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
