#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, n, p, q, temp;
  int a, b;
  int t = 0;
  int flag = 0;
  string s;
  cin >> a >> b;
  cin >> s;
  if (s[a] != '-') {
    flag = 1;
  }
  for (i = 0; i < a; ++i) {
    p = s[i] - '0';
    if (p >= 0 && p <= 9) {
      continue;
    } else {
      flag = 1;
      break;
    }
  }
  for (i = a + 1; i < b; ++i) {
    p = s[i] - '0';
    if (p >= 0 && p <= 9) {
      continue;
    } else {
      flag = 1;
      break;
    }
  }
  if (flag == 0) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}
