#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int MOD = 1e9 + 7;
const int INF = 1e9;
int main() {
  int a, b, i, j = 0;
  cin >> a >> b;
  char s[a + b + 2];
  cin >> s;
  if (s[a] != '-') {
    cout << "NO";
    return 0;
  }
  for (i = 0; i < strlen(s); i++) {
    if (i == a) continue;
    if ((s[i] - '0') >= 0 && (s[i] - '0') <= 9) {
      j++;
    }
  }
  if (j == a + b) {
    cout << "YES";
  } else {
    cout << "NO";
    return 0;
  }
}
